Attributes Array Class. More...
Public Member Functions | |
| imAttribArray (int count) | |
| ~imAttribArray () | |
| int | Count () const |
| void | RemoveAll () |
| void | CopyFrom (const imAttribArray &table) |
| void | Set (int index, const char *name, int data_type, int count, const void *data) |
| const void * | Get (int index, char *name=0, int *data_type=0, int *count=0) const |
| void | ForEach (void *user_data, imAttribTableCallback attrib_func) const |
| imAttribArray::imAttribArray | ( | int | count | ) | [inline] |
Creates an empty array.
| imAttribArray::~imAttribArray | ( | ) | [inline] |
Destroys the array and all the attributes.
| int imAttribArray::Count | ( | ) | const [inline] |
Returns the number of elements in the array.
| void imAttribArray::RemoveAll | ( | ) | [inline] |
Removes all the attributes in the array
| void imAttribArray::CopyFrom | ( | const imAttribArray & | table | ) | [inline] |
Copies the contents of the given table into this table.
| void imAttribArray::Set | ( | int | index, | |
| const char * | name, | |||
| int | data_type, | |||
| int | count, | |||
| const void * | data | |||
| ) | [inline] |
Inserts one attribute into the array. The attribute data is a simple array of data_type elements of count length.
Data is duplicated if not NULL, else data is initialized with zeros. When NULL is specified use the Get method to retrieve a pointer to the data so you can initialize it with other values. See also imDataType.
| const void* imAttribArray::Get | ( | int | index, | |
| char * | name = 0, |
|||
| int * | data_type = 0, |
|||
| int * | count = 0 | |||
| ) | const [inline] |
Finds one attribute in the array. Returns the attribute if found, NULL otherwise. See also imDataType.
| void imAttribArray::ForEach | ( | void * | user_data, | |
| imAttribTableCallback | attrib_func | |||
| ) | const [inline] |
For each attribute calls the user callback. If the callback returns 0 the function returns.
1.7.1