Talk:Main Page

From Code Synthesis Wiki

(Difference between revisions)
Jump to: navigation, search

AWang (Talk | contribs)
(dynamically determine C++ object type like C# reflection or meta-programming.)
Next diff →

Revision as of 09:13, 30 December 2009

Hi, all

I'm a newer of XSD. Here, I have a question about xml data binding. The question is how to dynamically determine C++ object type like C# reflection or meta-programming. Simply speaking, I want to know which members are included in the c++ object, and then I can determine that which element I can add or remove. Is it clear? thanks

class SCL: public ::SCL::tBaseElement

 {
   public:
   // Header
   // 
   typedef ::SCL::tHeader Header_type;
   typedef ::xsd::cxx::tree::traits< Header_type, wchar_t > Header_traits;
   const Header_type&
   Header () const;
   Header_type&
   Header ();
   void
   Header (const Header_type& x);
   void
   Header (::std::auto_ptr< Header_type > p);
   // Substation
   // 
   typedef ::SCL::tSubstation Substation_type;
   typedef ::xsd::cxx::tree::sequence< Substation_type > Substation_sequence;
   typedef Substation_sequence::iterator Substation_iterator;
   typedef Substation_sequence::const_iterator Substation_const_iterator;
   typedef ::xsd::cxx::tree::traits< Substation_type, wchar_t > Substation_traits;
   const Substation_sequence&
   Substation () const;
   Substation_sequence&
   Substation ();
   void
   Substation (const Substation_sequence& s);
   // Communication
   // 
   typedef ::SCL::tCommunication Communication_type;
   typedef ::xsd::cxx::tree::optional< Communication_type > Communication_optional;
   typedef ::xsd::cxx::tree::traits< Communication_type, wchar_t > Communication_traits;
   const Communication_optional&
   Communication () const;
   Communication_optional&
   Communication ();
   void
   Communication (const Communication_type& x);
   void
   Communication (const Communication_optional& x);
   void
   Communication (::std::auto_ptr< Communication_type > p);
   // IED
   // 
   typedef ::SCL::tIED IED_type;
   typedef ::xsd::cxx::tree::sequence< IED_type > IED_sequence;
   typedef IED_sequence::iterator IED_iterator;
   typedef IED_sequence::const_iterator IED_const_iterator;
   typedef ::xsd::cxx::tree::traits< IED_type, wchar_t > IED_traits;
   const IED_sequence&
   IED () const;
   IED_sequence&
   IED ();
   void
   IED (const IED_sequence& s);
   // DataTypeTemplates
   // 
   typedef ::SCL::tDataTypeTemplates DataTypeTemplates_type;
   typedef ::xsd::cxx::tree::optional< DataTypeTemplates_type > DataTypeTemplates_optional;
   typedef ::xsd::cxx::tree::traits< DataTypeTemplates_type, wchar_t > DataTypeTemplates_traits;
   const DataTypeTemplates_optional&
   DataTypeTemplates () const;
   DataTypeTemplates_optional&
   DataTypeTemplates ();
   void
   DataTypeTemplates (const DataTypeTemplates_type& x);
   void
   DataTypeTemplates (const DataTypeTemplates_optional& x);
   void
   DataTypeTemplates (::std::auto_ptr< DataTypeTemplates_type > p);
   // version
   // 
   typedef ::SCL::tSclVersion version_type;
   typedef ::xsd::cxx::tree::traits< version_type, wchar_t > version_traits;
   const version_type&
   version () const;
   version_type&
   version ();
   void
   version (const version_type& x);
   void
   version (::std::auto_ptr< version_type > p);
   static const version_type&
   version_default_value ();
   // revision
   // 
   typedef ::SCL::tSclRevision revision_type;
   typedef ::xsd::cxx::tree::traits< revision_type, wchar_t > revision_traits;
   const revision_type&
   revision () const;
   revision_type&
   revision ();
   void
   revision (const revision_type& x);
   void
   revision (::std::auto_ptr< revision_type > p);
   static const revision_type&
   revision_default_value ();
   // Constructors.
   //
   SCL (const Header_type&);
   SCL (::std::auto_ptr< Header_type >&);
   SCL (const ::xercesc::DOMElement& e,
        ::xml_schema::flags f = 0,
        ::xml_schema::container* c = 0);
   SCL (const SCL& x,
        ::xml_schema::flags f = 0,
        ::xml_schema::container* c = 0);
   virtual SCL*
   _clone (::xml_schema::flags f = 0,
           ::xml_schema::container* c = 0) const;
   virtual 
   ~SCL ();
   // Implementation.
   //
   protected:
   void
   parse (::xsd::cxx::xml::dom::parser< wchar_t >&,
          ::xml_schema::flags);
   protected:
   ::xsd::cxx::tree::one< Header_type > Header_;
   Substation_sequence Substation_;
   Communication_optional Communication_;
   IED_sequence IED_;
   DataTypeTemplates_optional DataTypeTemplates_;
   ::xsd::cxx::tree::one< version_type > version_;
   static const version_type version_default_value_;
   ::xsd::cxx::tree::one< revision_type > revision_;
   static const revision_type revision_default_value_;
 };
Personal tools