Package OpenCAGE.Pixmap_Tables.Attributes.ID_Maps.Dynamic_Bit_Vectors

This package can used to generate ID's of Attribute Names in dynamic way. There are an attribute Counter. He counts the different used Attribute Names. It means that every time you use a new Attribute he will increase at one. But, of cause, there is an limit. It is fixed by Max_Attrib_Count. Check, that 2^Max_Attrib_Count < Max_Int. If exist more as Max_Attrib_Count attributes, all attributes which are the "higher as max_attrib_counts", will get Not_Genereted_ID as ID. Not_Generated_ID is a "Zero_ID" like null for access values. The used numbers of ID's are 2 potentials. It guarantees that the number for a set of attributes, you can generated this by addition of IDs of the attributes, is also unique. (Note: this is only unique in state of unsorted use. F.e. {2,1} has the same number as {1,2}.

Class Dynamic_Bit_Vector

extends OpenCAGE.Pixmap_Tables.Attributes.ID_Maps.ID_Map

Attributes

private Natural Attrib_Count 

How much different Attributes are handled?

private OpenCAGE.Pixmap_Tables.Attributes.ID_Maps.Dynamic_Bit_Vectors.Attrib_ID_Tables.Mapping Attrib_IDs 

Hash Table which contains the ID's of Attrib Names

private Natural Max_Attrib_Count 

How much Attributes are represented maximaly?

Operations

public OpenCAGE.Pixmap_Tables.Attributes.ID_Maps.Dynamic_Bit_Vectors.Dynamic_Bit_Vector Create( Natural Max_Attrib_Count);

public Integer Get_Attribute_ID( Ada.Strings.Unbounded.Unbounded_String Name);

returns the corresponding ID of an Attribute Name [This description is adopted from 'OpenCAGE.Pixmap_Tables.Attributes.ID_Maps.ID_Map'.]

public Integer Get_Attribute_List_ID( OpenCAGE.General.String_List.List Attributes);

returns the ID of the Set of Attributes represented by Attribute List [This description is adopted from 'OpenCAGE.Pixmap_Tables.Attributes.ID_Maps.ID_Map'.]

public Initialize( Natural Max_Attrib_Count);