C++ Code Generated for XSD Global Elements

Special classes called control classesare generated for global elements that are not referenced by any other type definitions. These are global elements that are not used in any other type definitions via the refattribute (for example, <complexType name="SomeType" ref="SomeGlobalElement"/>).

The purpose of a control class is to act as a control interface for encoding or decoding complete XML documents or messages. This class allows a message buffer or stream object to be associated with an XSD type class. Once this association is made, methods can be invoked from within the class to serialize data to and from the type class and the buffer or stream.

A sample global element section is as follows:

   /**************************************************************/
   /*                                                            */
   /*  personnelRecord                                           */
   /*                                                            */
   /**************************************************************/
   class EXTERN personnelRecord_CC : public OSXSDGlobalElement {
   protected:
      PersonnelRecord* mpValue;
      personnelRecord_CC& operator= (const personnelRecord_CC&);

   public:
      personnelRecord_CC (PersonnelRecord* pvalue=0);
      personnelRecord_CC (PersonnelRecord& value);
      personnelRecord_CC
          (OSRTMessageBufferIF& msgbuf, PersonnelRecord* pvalue=0);
      personnelRecord_CC (OSRTMessageBufferIF& msgbuf,
PersonnelRecord& value);
      ~personnelRecord_CC();

      // standard encode/decode methods (defined in base class):
      // int encode ();
      // int decode ();

      // stream encode/decode methods:
      int encodeTo (OSRTMessageBufferIF& msgbuf);
      int decodeFrom (OSRTMessageBufferIF& msgbuf);

      // stream validate method:
      int validateFrom (OSRTMessageBufferIF& msgbuf);

      inline PersonnelRecord* getValue() { return mpValue; }
      inline void setValue (PersonnelRecord* pvalue) { mpValue = pvalue; }

      void print (const char* name);
   } ;