
Binary String Types
The type of structure used depends on whether or not a length facet is applied to the type. If a length facet is not used, or the length is a very large value (> 32K), a built-in type containing a pointer to a dynamic memory buffer is used to hold the binary data. The definition of this type in rtxSysTypes.h is as follows:
typedef struct OSDynOctStr { OSUINT32 numocts; const OSOCTET* data; } OSDynOctStr;class OSDynOctStrClass : public OSDynOctStr, public OSBaseType { public: ... } ;This class allows the base members to be accessed just as they were in the C case, but provides initialization through constructors and other utility methods as well.
If a length facet is used that restricts the size of the binary string to a value less than 32K, a custom type is generated that contains a static array to hold the data. The general form of this type is as follows:
typedef struct TypeName { OSUINT32 numocts; OSOCTET data[length]; } TypeName;In this case, TypeName would be the name of the type defined in the XSD specification and length would be the value of the length facet.
class TypeName : public OSBaseType { OSUINT32 numocts; OSOCTET data[length]; ... } ;
| Copyright © Objective Systems
2002-2005 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. 102 Pickering Way, Suite #506 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 |