Properties which are common to all HL7 objects are inherited from the class HL7Object. The HL7Object contains abstract functions that must be provided by any class that can have instances. In addition, the class HL7Object knows about the type of object of the inheriting class. The "type of object" is expressed as a pair. First there is the subclass that tells the abstract class that an object belongs to. For example, the ACK message has the subclass "message". The type tells what exact type an object is, i.e. whether it is an NM data type or an MSH segment, etc.
HL7Object::subclass_t HL7Object::subclass() const
int HL7Object::type() const
bool HL7Object::ispresent() const
SUCCESS. Actually the unset() function should be declared
result output(ostream&) const
Finally there are the operators
<< defined, which
input or output a HL7Object respectively. These are declared as friend
functions to the HL7Object and don't do much more than calling the
output() function respectively.