|User's Guide: A Framework for Object Persistency for GNAT; Version 0.6.1; Document Revision $Revision: 1.17 $|
|Prev||Chapter 12. ODB.Classes||Next|
type Factory_Access is access function return Reference ; Invalid_Attribute_ID : exception;
this pointer referes to the Factory function belonging to a certain class.
function Register_Factory( Name : in Tag; Creator : in Factory_Access ) return Natural;
Register the factory with the given class name.
- Class is not yet registered
- Factory will return a valid value
function Factory( Name : in Tag ) return Factory_Access;
Find the factory and return the pointer to the factory function.
- Factory has been registered for the given given persistent class
function Attribute( This : in Tag; Id : in Natural ) return String ;
Returns the attribute name for a given attribute id.
- Function returns attribute name
procedure Attribute( This : in Natural; Name : in String; Id : in Natural );
Associate an attribute name and a id with the class id as it has been returned by Register_Factory.
- Factory has been registered for the given given persistent class - Attrbiute has not been defined before.
function Attribute( This : in Tag; Name : in String ) return Natural; end ODB.Classes;
Translate a attribute name into a attribute id.
- Package class has been registered
- Return 0 if not found
- Returns id if the attribute has been associated with Attute.