imAttribArray Class Reference
[Utilities]
Attributes Table.
More...
Detailed Description
- Same as imAttribTable, but uses an array of fixed size.
Constructor & Destructor Documentation
imAttribArray::imAttribArray |
( |
int |
count |
) |
[inline] |
Creates an empty array.
00082 { ptable = imAttribArrayCreate(count); }
imAttribArray::~imAttribArray |
( |
|
) |
[inline] |
Destroys the array and all the attributes.
00086 { imAttribTableDestroy(ptable); ptable = 0; }
Member Function Documentation
int imAttribArray::Count |
( |
|
) |
const [inline] |
Returns the number of elements in the array.
00090 { return imAttribTableCount(ptable); }
void imAttribArray::RemoveAll |
( |
|
) |
[inline] |
Removes all the attributes in the array
00094 { imAttribTableRemoveAll(ptable); }
void imAttribArray::CopyFrom |
( |
const imAttribArray & |
table |
) |
[inline] |
Copies the contents of the given table into this table.
00098 { imAttribArrayCopyFrom(ptable, table.ptable); }
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.
00107 { imAttribArraySet(ptable, index, name, data_type, count, data); }
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.
00113 { return imAttribArrayGet(ptable, index, name, data_type, count); }
For each attribute calls the user callback. If the callback returns 0 the function returns.
00117 { imAttribTableForEach(ptable, user_data, attrib_func); }
The documentation for this class was generated from the following file: