Any object according to HL7 must have (at least) the following states:
The status qualities of the object can be seen by the member functions named `is<quality>()'. However, modifying a status flag does not always make sense. Thus the `present' quality can only be set, and the `null' quality can only be cleared, by a class which is permitted to modify the components of the object (i.e. the object itself including derived objects). On the other hand, unset() and nullify() which makes an object not present or null respectively, may be called from any context which has an instance of an HL7 object.
There are two other status flags, which are not defined in HL7, but are useful as a method to test the integrity of the Object. These qualities are
A `broken' object is one that was not initialized correctly. Normally a broken condition should end up in an exception, because it is always the result of a programming fault, however exception handling is currently not supported by some C++ compilers. Until then, it could make sense to use the broken bit.
The status of a `zombie' means, that an object was destroyed before: either because it was explicitly deleted or that it went off the scope. Such an object is likely to contain damaged values. If an object is accessed via pointers and it happens that the zombie flag is set, there is a programming fault. These events should result in an error exit (with a core dump).
Finally there is a bit, which shows whether an object is atomic or a repeated object. This bit logically belongs to the class of the object, which is presented below (see section Repetition and optionality).