Conf4CStor
Conf4CStor - A collection of Conf4CValue instances representing a specific section-type instance
Synopsis
#include "conf4cvalue.h"
#include "conf4cvector.h"
struct Conf4CStor;
Conf4CStor * conf4c_stor_new (const char *name,
const int initial_capacity);
int conf4c_stor_add_conf4cvalue (Conf4CStor *cs,
Conf4CValue *cv);
char * conf4c_stor_get_name (const Conf4CStor *cs);
int conf4c_stor_get_value_count (const Conf4CStor *cs);
char * conf4c_stor_get_value_name (const Conf4CStor *cs,
int index);
Conf4CValue * conf4c_stor_get_value_by_name (const Conf4CStor *cs,
const char *name);
Conf4CValue * conf4c_stor_get_value_by_index (const Conf4CStor *cs,
const unsigned int index);
int conf4c_stor_get_value_index (const Conf4CStor *cs,
const char *name);
Description
Sections of a configuration file are recognized as name / value pairs existing between '<section_type instance_name></section_type>' pairs. A Conf4CStor maintains the name / value pairs which exist between the opening and closing section tags and is identified by 'instance_name'.
Details
struct Conf4CStor
struct Conf4CStor;
This should not be accessed directly. Use the accessor functions below.
conf4c_stor_new ()
Conf4CStor * conf4c_stor_new (const char *instance_name, const int initial_capacity);
Creates a new Conf4CStor struct.
conf4c_stor_add_conf4cvalue ()
int conf4c_stor_add_conf4cvalue (Conf4CStor *cs, Conf4CValue cv);
Add a Conf4CValue to an instance of Conf4CStor.
| | cs: the Conf4CStor instance to add the Conf4CValue to
cv: a Conf4CValue
Returns: an int value indicating success or failure; 1 = success and 0 = failure
|
conf4c_stor_get_name ()
char * conf4c_stor_get_name (const Conf4CStor *cs);
Return the 'instance_name' of the Conf4CStor.
| | cs: a Conf4CStor
Returns: the 'instance_name' of the specified Conf4CStor
|
conf4c_stor_get_value_count ()
int conf4c_stor_get_value_count (const Conf4CStor *cs);
Returns the number of name / value pairs contained in the Conf4CStor.
| | cs: a Conf4CStor
Returns: the number of stored Conf4CValue instances
|
conf4c_stor_get_value_name ()
char * conf4c_stor_get_value_name (const Conf4CStor *cs, int index);
Fetch the name of a Conf4CValue instance contained within a Conf4CStor
| | cs: a Conf4CStor
index: an integer identifying which Conf4CValue instance to reference
Returns: the name of the specified Conf4CValue or NULL if the index is invalid
|
conf4c_stor_get_value_by_index ()
Conf4CValue * conf4c_stor_get_value_by_index (const Conf4CStor *cs, const unsigned int index);
Retrieve the Conf4CValue located at index 'index'.
| | cs: a Conf4CStor
index: an integer identifying which Conf4CValue instance to return
Returns: the Conf4CValue located at 'index' or NULL if the index is invalid
|
conf4c_stor_get_value_by_name ()
Conf4CValue * conf4c_stor_get_value_by_name (const Conf4CStor *cs, const char *name);
Retrieve the Conf4CValue named 'name'.
| | cs : a Conf4CStor
name : the 'name' portion of a name / value pair
Returns : a Conf4CValue instance or NULL if no Conf4CValue is found with name 'name'.
|
conf4c_stor_get_value_index ()
int conf4c_stor_get_value_index (const Conf4CStor *cs, const char *name);
Obtain the index of the Conf4CValue identified by 'name'.
| | cs: a Conf4CStor
name: the 'name' portion of a name / value pair
Returns: the index of the specified Conf4CValue or -1 if the Conf4CValue is not found
|
This document was generated on October, 29 2004 using texi2html 1.70.