API Reference

type Factory_Access is access function return Reference

   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

   function Register_Factory(  
      Name    : in Tag; 
      Creator : in Factory_Access ) return Natural; 
 

Description

Register the factory with the given class name.

Preconditions

- Class is not yet registered

Postconditions

- Factory will return a valid value

Exceptions

None

function Factory

   function Factory(  
      Name : in Tag ) return Factory_Access; 
 

Description

Find the factory and return the pointer to the factory function.

Preconditions

- Factory has been registered for the given given persistent class

Postconditions

None

Exceptions

None

function Attribute

   function Attribute(  
      This   : in Tag; 
      Id     : in Natural ) return String ; 
 

Description

Returns the attribute name for a given attribute id.

Preconditions

- Function returns attribute name

Postconditions

None

Exceptions

None

procedure Attribute

   procedure Attribute(  
      This : in Natural; 
      Name : in String; 
      Id   : in Natural ); 
 

Description

Associate an attribute name and a id with the class id as it has been returned by Register_Factory.

Preconditions

- Factory has been registered for the given given persistent class - Attrbiute has not been defined before.

Postconditions

None

Exceptions

None

function Attribute

   function Attribute(  
      This   : in Tag; 
      Name   : in String ) return Natural; 
 
end ODB.Classes; 

Description

Translate a attribute name into a attribute id.

Preconditions

- Package class has been registered

Postconditions

- Return 0 if not found

- Returns id if the attribute has been associated with Attute.

Exceptions

None