NDAttributeList.h.
More...
#include <NDAttributeList.h>
NDAttributeList.h.
Mark Rivers University of Chicago October 18, 2013 NDAttributeList class; this is a linked list of attributes.
◆ NDAttributeList()
NDAttributeList::NDAttributeList |
( |
| ) |
|
◆ ~NDAttributeList()
NDAttributeList::~NDAttributeList |
( |
| ) |
|
◆ add() [1/2]
Adds an attribute to the list.
This is a convenience function for adding attributes to a list. It first searches the list to see if there is an existing attribute with the same name. If there is it just changes the properties of the existing attribute. If not, it creates a new attribute with the specified properties. IMPORTANT: This method is only capable of creating attributes of the NDAttribute base class type, not derived class attributes. To add attributes of a derived class to a list the NDAttributeList::add(NDAttribute*) method must be used.
- Parameters
-
[in] | pName | The name of the attribute to be added. |
[in] | pDescription | The description of the attribute. |
[in] | dataType | The data type of the attribute. |
[in] | pValue | A pointer to the value for this attribute. |
◆ add() [2/2]
Adds an attribute to the list.
If an attribute of the same name already exists then the existing attribute is deleted and replaced with the new one.
- Parameters
-
[in] | pAttribute | A pointer to the attribute to add. |
◆ clear()
int NDAttributeList::clear |
( |
| ) |
|
Deletes all attributes from the list.
◆ copy()
Copies all attributes from one attribute list to another.
It is efficient so that if the attribute already exists in the output list it just copies the properties, and memory allocation is minimized. The attributes are added to any existing attributes already present in the output list.
- Parameters
-
[out] | pListOut | A pointer to the output attribute list to copy to. |
◆ count()
int NDAttributeList::count |
( |
| ) |
|
Returns the total number of attributes in the list of attributes.
- Returns
- Returns the number of attributes.
◆ find()
NDAttribute * NDAttributeList::find |
( |
const char * |
pName | ) |
|
Finds an attribute by name; the search is now case sensitive (R1-10)
- Parameters
-
[in] | pName | The name of the attribute to be found. |
- Returns
- Returns a pointer to the attribute if found, NULL if not found.
◆ next()
Finds the next attribute in the linked list of attributes.
- Parameters
-
[in] | pAttributeIn | A pointer to the previous attribute in the list; if NULL the first attribute in the list is returned. |
- Returns
- Returns a pointer to the next attribute if there is one, NULL if there are no more attributes in the list.
◆ remove()
int NDAttributeList::remove |
( |
const char * |
pName | ) |
|
Removes an attribute from the list.
- Parameters
-
[in] | pName | The name of the attribute to be deleted. |
- Returns
- Returns ND_SUCCESS if the attribute was found and deleted, ND_ERROR if the attribute was not found.
◆ report()
int NDAttributeList::report |
( |
FILE * |
fp, |
|
|
int |
details |
|
) |
| |
Reports on the properties of the attribute list.
- Parameters
-
[in] | fp | File pointer for the report output. |
[in] | details | Level of report details desired; if >10 calls NDAttribute::report() for each attribute. |
◆ updateValues()
int NDAttributeList::updateValues |
( |
| ) |
|
The documentation for this class was generated from the following files: