[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Conf4CSection

Conf4CSection - A container which manages instances of a Section type

Synopsis

#include "conf4cstor.h"
#include "conf4cvector.h"

struct Conf4CSection;

Conf4CSection *	conf4c_section_new 			(const char *type,
				    	 	 	 const int initial_capacity);
int		conf4c_section_add_stor 		(Conf4CSection *csect,
					 	 	 Conf4CStor *cs);
Conf4CStor *	conf4c_section_get_stor_by_name		(const Conf4CSection *csect,
						 	 const char *name);
Conf4CStor *	conf4c_section_get_stor_by_index	(const Conf4CSection *csect,
							 const unsigned int index);
int 		conf4c_section_get_stor_count		(const Conf4CSection *csect);
char *		conf4c_section_get_type			(const Conf4CSection *csect);
char *		conf4c_section_get_stor_name 		(const Conf4CSection *csect, 
							 const int index);
int		conf4c_section_get_stor_index		(const Conf4CSection *csect,
							 const char *name);

Description

Conf4CSection contains all instances of a specific section type. A Conf4CSection is also identified by it's type.

Details

struct Conf4CSection

struct Conf4CSection;
This should not be accessed directly. Use the accessor functions below.

conf4c_section_new ()

Conf4CSection *	conf4c_section_new	(const char *type,
				 	 const int initial_capacity);

 
type : A string indicating the section-type
initial_capacity : The number of Conf4CStor instances to allocate for, initially
Returns : a Conf4CSection

conf4c_section_add_stor ()

int	conf4c_section_add_stor (Conf4CSection csect, Conf4CStor *cs);
Add a Conf4CStor to a Conf4CSection.

 
csect : a Conf4CSection
cs : the Conf4CStor to add
Returns : an int indicating success or failure; 1 = success, 0 = failure

conf4c_section_get_stor_by_name ()

Conf4CStor * conf4c_section_get_stor_by_name (const Conf4CSection *csect, const char *name);
Retrieve a Conf4CStor by the stor's name.

 
csect: a Conf4CSection
name: the name of the Conf4CStor instance
Returns: NULL if the named Conf4CStor is not found

conf4c_section_get_stor_by_index ()

Conf4CStor * conf4c_section_get_stor_by_index (const Conf4CSection *csect, const unsigned int index);
Retrieve a Conf4CStor by the stor's index.

 
csect: a Conf4CSection
index: the index of the Conf4CStor instance within the collection
Returns: NULL if the index is invalid

conf4c_section_get_stor_count ()

int conf4c_section_get_stor_count (const Conf4CSection *csect);

 
csect: a Conf4CSection
Returns: the number of Conf4CStor instances stored within the Conf4CSection

conf4c_section_get_type ()

char * conf4c_section_get_type (const Conf4CSection *csect);

 
csect : a Conf4CSection
Returns : the type of the Conf4CSection

conf4c_section_get_stor_name ()

char * conf4c_section_get_stor_name (const Conf4CSection *csect, const int index);

 
csect: a Conf4CSection
index: the index of a Conf4CStor within the collection
Returns: the name of the indicated Conf4CStor instance or NULL if index is invalid

conf4c_section_get_stor_index ()

int conf4c_section_get_stor_index (const Conf4CSection *csect, const char *name);

 
csect: a Conf4CSection
name: the name of the Conf4CStor instance
Returns: the index of the named Conf4CStor or -1 if the instance is not found

[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated on October, 29 2004 using texi2html 1.70.