Integrity Checks
Server offers a number of functions to check the integrity of dynamically-built objects. These functions are member functions of the class IlsModel.
The integrity of an object structure is respected as long as these rules are satisfied:
A call to the following static function dynamically initiates an integrity check:
IlsModel::SetIntegrityChecked();
Note
The member function SetIntegrityChecked assigns a Boolean flag which tells Server to check the model integrity each time the model is modified. Because this function performs a lot of costly checks, it is recommended to use this primitive only during the development phase. |
This function terminates an integrity check:
IlsModel::SetIntegrityChecked(IlsFalse);
This function indicates whether the integrity check is being performed:
IlsBoolean IlsModel::IsIntegrityChecked();
The integrity check reports two types of problem:
-
Any attempt to create cycles in ownership relations. When such a problem is detected, the exception IlsOwnershipCycle is thrown.
-
Any attempt to create use relations pointing to objects which are neither the targets of ownership relations nor entities. When such a problem is detected, the exception IlsUnOwnedUse is thrown.