[xsd-users] Customizing a type with a typedef
Ray Lischner
rlischner at proteus-technologies.com
Thu May 17 12:23:59 EDT 2007
I want to implement a custom type with a typedef, but I can't because Code Synthesis generates a forward class declaration.
Specifically, I am implementing a type that acts like an integer, but allows C-style string values, e.g., 0x42. Thus, in the schema, I define the type CUnsignedByte as a restriction of string, but I also provide a completely custom type--one that derives from fundamental_base<uint8_t, char, simple_type>. I implement the DOM functions to parse C-style strings.
I want to implement CUnsignedByte, CUnsignedShort, CUnsignedInt, and CUnsignedLong. Naturally, I implemented a single template, CUnsigned<T>, and want to define the specific types as typedefs:
typedef CUnsigned<uint8_t> CUnsignedByte;
and so on.
So, my question is, how can I do this? I don't need CUnsignedByte, etc., in the generated header. I don't want the forward class declaration. Is there a way to turn it off?
--
Ray Lischner, Proteus Technologies
More information about the xsd-users
mailing list