TOC PREV NEXT INDEX


Atomic Simple Types


Atomic simple types include boolean, integer, double, decimal, and types derived from these base types. The classes generated for these types include a value member that can be assigned to directly. They also include a parameterized constructor that allows assignment through construction and an assignment operator that makes it possible to do assignment directly through the `=' sign without having to use the value member. This makes assignment compatible with the C case.
For example, the following simple integer type declaration:

   <xsd:simpleType name="EmployeeNumber">
 
      <xsd:restriction base="xsd:integer"/>
 
   </xsd:simpleType>
 

causes a class with the following constructors and assignment operator to be generated:

class EmployeeNumber : public OSBaseType {
 
public:
 
   OSINT32 value;
 
   EmployeeNumber ();
 
   EmployeeNumber (OSINT32 value);
 
   EmployeeNumber& operator= (OSINT32 value);
 

 
This makes it possible to assign an employee number in any of the following ways:

EmployeeNumber empno (33);
 

or

EmployeeNumber empno;
 
empno.value = 33;
 

or

EmployeeNumber empno;
 
empno = 33;
 



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
TOC PREV NEXT INDEX