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
HL7Object::primtype
HL7Object::composite
HL7Object::repfld
HL7Object::segment
HL7Object::group
HL7Object::repstrc
HL7Object::anyseg
HL7Object::message
HL7Object::delimiters
int HL7Object::type() const
bool HL7Object::ispresent() const
result HL7Object::unset()
SUCCESS
. Actually the unset() function should be declared
void
.(2)
result input(istream&)
result output(ostream&) const
Finally there are the operators >>
and <<
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
input()
or output()
function respectively.