[xsd-users] Help me: How to find out what is the type of a class

James Mei jxmei3 at gmail.com
Fri Oct 23 04:50:10 EDT 2009


Hi Boris

May I know how to get the text value of the Enum from the generated class ?
With the following class, I want to get GSSE and GOOSE as text.

 class tGSEControlTypeEnum: public ::xml_schema::name
  {
    public:
    enum value
    {
      GSSE,
      GOOSE
    };

    tGSEControlTypeEnum (value v);

    tGSEControlTypeEnum (const char* v);

    tGSEControlTypeEnum (const ::std::string& v);

    tGSEControlTypeEnum (const ::xml_schema::name& v);

 .......
}

Regards
James

On Thu, Oct 22, 2009 at 8:44 PM, Boris Kolpackov <boris at codesynthesis.com>wrote:

> Hi James,
>
> James Mei <jxmei3 at gmail.com> writes:
>
> > The sample code below works with normal pointer to a class. But when it
> is a
> > TreeNode->Data is "const sequence <tDataSet> &", then the following code
> > crashed.
>
> sequence (and other containers) are not derived from xml_schema::type so
> this won't work. Only C++ classes corresponding to XML Schema types are
> derived from xml_schema::type. If you need to store a pointer to sequence
> then you will need to invent your own type information.
>
> Boris
>


More information about the xsd-users mailing list