IM: imAttribArray Class Reference

IM - An Imaging Tool

imAttribArray Class Reference
[Utilities]


Detailed Description

Same as imAttribTable, but uses an array of fixed size.


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

Constructor & Destructor Documentation

imAttribArray::imAttribArray int  count  )  [inline]
 

Creates an empty array.

00080     { ptable = imAttribArrayCreate(count); }

imAttribArray::~imAttribArray  )  [inline]
 

Destroys the array and all the attributes.

00084     { imAttribTableDestroy(ptable); ptable = 0; }


Member Function Documentation

int imAttribArray::Count  )  const [inline]
 

Returns the number of elements in the array.

00088     { return imAttribTableCount(ptable); }

void imAttribArray::RemoveAll  )  [inline]
 

Removes all the attributes in the array

00092     { imAttribTableRemoveAll(ptable); }

void imAttribArray::CopyFrom const imAttribArray table  )  [inline]
 

Copies the contents of the given table into this table.

00096     { imAttribArrayCopyFrom(ptable, table.ptable); }

void imAttribArray::Set int  index,
const char *  name,
int  data_type,
int  count,
const void *  data
[inline]
 

Inserts an attribute into the array.
Data is duplicated if not NULL, else data is initialized with zeros.

00101     { 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 an attribute in the array. Returns the attribute if found, NULL otherwise.

00106     { return imAttribArrayGet(ptable, index, name, data_type, count); }

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.

00110     { imAttribTableForEach(ptable, user_data, attrib_func); }


The documentation for this class was generated from the following file: