| User's Guide: A Framework for Object Persistency for GNAT; Version 0.6.1; Document Revision $Revision: 1.17 $ | ||
|---|---|---|
| Prev | Chapter 19. ODB.Storage_Header | Next |
procedure Register_Attribute(
This : in out Object;
Name : in Unbounded_String;
Offset : in Natural );
procedure Register_Attribute(
This : in out Object;
Id : in Natural;
Offset : in Natural;
Cls : in Tag );
Unknown_Attribute : exception;
Resgister the attrbute based on the field id as it is registered in the class it self.
C.1 - Object is valid.
C.2 - Tag references an object derived from ODB.Persistent.Object
Exceptions:
function Lookup_Attribute(
This : in Object;
Name : in String ) return Natural;
Return the offset for the named attribute in the header.
C.1 - The attribute Name has been registered via Register_Attribute
P.1 - Returns offset
Unknown_Attribute : C.1 violated
function Attributes(
This : in Object ) return String_Array.Handle;
Return all attribute names which are registered in the header.
C.1 - Object is valid
P.1 - Returns null if the header is empty P.2 - Returns the point to a string array.
Notes:
The string array has to be destroyed by means of the operation Free in Util.String_Array.
procedure Clear(
This : in out Object );
function Class_Name(
This : in Object ) return String ;
procedure Class_Name(
This : in out Object;
Value : in String );
Clear the header.
C.1 - Object is valid
P.1 - All attributes are removed from the header.
Notes: