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

Conf4CFileAttrib

Conf4CFileAttrib - A collection of configuration file attributes

Synopsis

enum Conf4CDelimType;

struct Conf4CFileAttrib;

Conf4CFileAttrib *	conf4c_fileattrib_new			(const char *fname,
								 const char *comment,
								 const char *delim,
								 Conf4CDelimType dtype);
char *			conf4c_fileattrib_get_filename		(Conf4CFileAttrib *c4cfattrib);
char * 			conf4c_fileattrib_get_commentmarker	(Conf4CFileAttrib *c4cfattrib);
char *			conf4c_fileattrib_get_delimiter		(Conf4CFileAttrib *c4cfattrib);
Conf4CDelimType		conf4c_fileattrib_get_delimiter_type	(Conf4CFileAttrib *c4cfattrib);

Description

The Conf4CFileAttrib maintains a list of attributes about a configuration file such as what denotes a comment, the delimiter which divides a name from a value, and how the delimiter should be treated. The Conf4CFileAttrib also maintains the filename of the configuration file.

Details

enum Conf4CDelimType

typedef enum 
{
	DELIM_STRICT = 1,
	DELIM_LAZY
} Conf4CDelimType;
The delimiter type informs the parser of how the delimiter is to be treated. A value of DELIM_STRICT will require that the entire delimiter value be found in its entirity between a name / value pair. A value of DELIM_LAZY will find the first occurrence of a character specified within the delimiter string and continue until a character not within the delimieter 'set' is found.

Conf4CFileAttrib

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

conf4c_fileattrib_new ()

Conf4CFileAttrib * conf4c_fileattrib_new	(const char *fname,
						 const char *comment,
						 const char *delimiter,
						 Conf4CDelimType dtype);
Creates a new instance of Conf4CFileAttrib.

 
fname : the filename of the configuration file
comment : the string which specifies a comment
delimiter : the string which specifies the seperation between name and value
dtype : how the delimiter is to be interpreted

conf4c_fileattrib_get_filename ()

char * conf4c_fileattrib_get_filename (Conf4CFileAttrib *c4cfattrib);
Returns the filename stored within the Conf4CFileAttrib.

 
c4cfattrib : a Conf4CFileAttrib

conf4c_fileattrib_get_commentmarker

char * conf4c_fileattrib_get_commentmarker (Conf4CFileAttrib *c4cfattrib);
Returns the comment string which indicates the start of a comment within the configuration file.

 
c4cfattrib : a Conf4CFileAttrib

conf4c_fileattrib_get_delimiter ()

char * conf4c_fileattrib_get_delimiter (Conf4CFileAttrib *c4cfattrib);
Returns the delimiter string.

 
c4cfattrib : a Conf4CFileAttrib

conf4c_fileattrib_get_delimiter_type ()

Conf4CDelimType conf4c_fileattrib_get_delimiter_type (Conf4CFileAttrib *c4cfattrib);
Returns the stored delimiter type.

 
c4cfattrib : a Conf4CFileAttrib

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

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