TOC PREV NEXT INDEX


Character String Types


Character string types are derived from the built-in base class OSXMLStringClass. This class is in turn derived from the OSXMLSTRING C struct type which contains a value member character pointer variable.
An example of the constructors and assignment operators generated for a character string type is shown for the following definition:

   <xsd:simpleType name="Date">
      <xsd:restriction base="xsd:string"/>
   </xsd:simpleType>

The C++ constructors and assignment operators generated for this definition are as follows:

class EXTERN Date : public OSXMLStringClass {
public:
   Date ();
   Date (const OSUTF8CHAR* value);
   Date (const char* value);
   Date& operator= (const OSUTF8CHAR* value);
   Date& operator= (const char* value);

Note that constructors and operators are available that allow strings to be specified as either standard C character strings or as UTF-8 strings.
Assignment of strings always causes a deep-copy of the character data to be done.


Copyright © Objective Systems 2002-2007
This document may be distributed in any form, electronic or otherwise, provided that it is distributed in its entirety and that the copyright and this notice are included.

Objective Systems, Inc.

55 Dowlin Forge Road
Exton, Pennsylvania 19341
http://www.obj-sys.com
Phone: (484) 875-9841
Toll-free: (877) 307-6855 (US only)
Fax: (484) 875-9830
info@obj-sys.com

TOC PREV NEXT INDEX