libaegis/attribute.h File Reference

#include <libaegis/common.h>

Go to the source code of this file.

Functions

attributes_tyattributes_list_find (attributes_list_ty *alp, const char *name)
bool attributes_list_find_boolean (attributes_list_ty *alp, const char *name, bool default_value=false)
double attributes_list_find_real (attributes_list_ty *alp, const char *name, double default_value=0)
long attributes_list_find_integer (attributes_list_ty *alp, const char *name, long default_value=0)
attributes_tyattributes_list_extract (attributes_list_ty *alp, const char *name)
void attributes_list_remove (attributes_list_ty *alp, const char *name)
void attributes_list_insert (attributes_list_ty *alp, const char *name, const char *value)
void attributes_list_append (attributes_list_ty *alp, const char *name, const char *value)
void attributes_list_append_unique (attributes_list_ty *alp, const char *name, string_ty *value)
void attributes_list_append_unique (attributes_list_ty *alp, const char *name, const char *value)


Function Documentation

void attributes_list_append ( attributes_list_ty alp,
const char *  name,
const char *  value 
)

The attributes_list_append function is used to add a specific attribute name and value pair to the end of an attribute list. It is possible to get duplicate attributes with the same name by using this function; use attributes_list_insert function if you don't want duplicates.

Parameters:
alp The attribute list to be searched.
name The name of the attribute to append; not case sensitive.
value The value of the attribute to be set.

void attributes_list_append_unique ( attributes_list_ty alp,
const char *  name,
const char *  value 
)

The attributes_list_append_unique function is used to add a specific attribute name and value pair to the end of an attribute list if that name and value pair is not already present. It is possible to get duplicate attributes with the same name by using this function; use the attributes_list_insert function if you don't want duplicates.

Parameters:
alp The attribute list to be searched.
name The name of the attribute to append; not case sensitive.
value The value of the attribute to be set.

void attributes_list_append_unique ( attributes_list_ty alp,
const char *  name,
string_ty value 
)

The attributes_list_append_unique function is used to add a specific attribute name and value pair to the end of an attribute list if that name and value pair is not already present. It is possible to get duplicate attributes with the same name by using this function; use the attributes_list_insert function if you don't want duplicates.

Parameters:
alp The attribute list to be searched.
name The name of the attribute to append; not case sensitive.
value The value of the attribute to be set.

attributes_ty* attributes_list_extract ( attributes_list_ty alp,
const char *  name 
)

The attributes_list_extract function is used to find a specific attribute in an attribute list, and remove it.

Parameters:
alp The attribute list to be searched.
name The name of the attribute to search for; not case sensitive.
Returns:
NULL if the attribute is not present, otherwise it returns a pointer to the attribute removed from the list.

attributes_ty* attributes_list_find ( attributes_list_ty alp,
const char *  name 
)

The attributes_list_find function is used to find a specific attribute in an attribute list.

Parameters:
alp The attribute list to be searched.
name The name of the attribute to search for; not case sensitive.

bool attributes_list_find_boolean ( attributes_list_ty alp,
const char *  name,
bool  default_value = false 
)

The attributes_list_find_boolean function is used to find a specific attribute in an attribute list.

Parameters:
alp The attribute list to be searched.
name The name of the attribute to search for; not case sensitive.
default_value The value to use of the attribute is not present.
Returns:
bool; the value of the attribute as a boolean (it understands "yes", "no", "true" and "false"), or the default value if not present or indecipherable.

long attributes_list_find_integer ( attributes_list_ty alp,
const char *  name,
long  default_value = 0 
)

The attributes_list_find_integer function is used to find a specific attribute in an attribute list.

Parameters:
alp The attribute list to be searched.
name The name of the attribute to search for; not case sensitive.
default_value The value to use of the attribute is not present.
Returns:
long; the value of the attribute as an integer number, or the default value if not present or indecipherable.

double attributes_list_find_real ( attributes_list_ty alp,
const char *  name,
double  default_value = 0 
)

The attributes_list_find_read function is used to find a specific attribute in an attribute list.

Parameters:
alp The attribute list to be searched.
name The name of the attribute to search for; not case sensitive.
default_value The value to use of the attribute is not present.
Returns:
double; the value of the attribute as a floating point(real) number, or the default value if not present or indecipherable.

void attributes_list_insert ( attributes_list_ty alp,
const char *  name,
const char *  value 
)

The attributes_list_insert function is used to find a specific attribute in an attribute list, and replace its value with the one given. If there is not attribute with the given name, this name and value will be appended.

Parameters:
alp The attribute list to be searched.
name The name of the attribute to modify; not case sensitive.
value The value of the attribute to be set.

void attributes_list_remove ( attributes_list_ty alp,
const char *  name 
)

The attributes_list_remove function is used to find a specific attribute in an attribute list, and remove it.

Parameters:
alp The attribute list to be searched.
name The name of the attribute to search for; not case sensitive.


Generated on Wed Mar 12 23:37:37 2008 for Aegis by  doxygen 1.5.5