dmIPropertyList Class Reference

Implement methods for acessing structured properties. More...

#include <CCI_PropertyList.h>

Inherits dmINotify.

List of all members.

Public Member Functions

dm_param Open (CONST char_t *uri, CONST char_t *section=NULL)
void Close (dm_param key)
const char_t * GetPropertyStr (dm_param key, const char_t *section, const char_t *property, const char_t *dflt=NULL)
long GetPropertyLong (dm_param key, const char_t *section, const char_t *property, long dflt)
dm_real GetPropertyReal (dm_param key, const char_t *section, const char_t *property, dm_real dflt)
bool GetPropertyBool (dm_param key, const char_t *section, const char_t *property, bool dflt)
bool CheckProperty (dm_param key, const char_t *section, const char_t *property)
bool GetSeq (dm_param key, const char_t *section)
bool NewSeq (dm_param key, const char_t *section)
bool AddSeq (dm_param key)
bool NextSeq (dm_param key)
bool EndSeq (dm_param key)
bool SetProperty (dm_param key, const char_t *section, const char_t *property, const char_t *value)
bool GetPropertyList (dm_param key, const char_t *section, const char_t *property, cci_object *stringlist)
bool SetPropertyLong (dm_param key, const char_t *section, const char_t *property, long value)
bool SetPropertyReal (dm_param key, const char_t *section, const char_t *property, dm_real value)


Detailed Description

Implement methods for acessing structured properties.

The PropertyList interface expose methods for accessing external or local ressources in structured way. Resources can be either external XML files or user-built ressources (in which case it is a "local" resources )

Properties are specified as a list of '/' separated sections which references a node in the resource.

Sequences can be specified, a sequence is a list of unnamed nodes that are sibling to a specific section.


Member Function Documentation

bool dmIPropertyList::AddSeq dm_param  key  )  [inline]
 

Add a new item to the sequence opened by GetSeq() or NewSeq()

bool dmIPropertyList::CheckProperty dm_param  key,
const char_t *  section,
const char_t *  property
[inline]
 

Check if the property exists or not.

void dmIPropertyList::Close dm_param  key  )  [inline]
 

Close the session initiated by the Open() method.

bool dmIPropertyList::EndSeq dm_param  key  )  [inline]
 

Terminate an acess to a sequence opened by GetSeq() or NewSeq()

bool dmIPropertyList::GetPropertyBool dm_param  key,
const char_t *  section,
const char_t *  property,
bool  dflt
[inline]
 

Return a boolean value associated to the property parameter. see GetPropertyStr() for parameters.

bool dmIPropertyList::GetPropertyList dm_param  key,
const char_t *  section,
const char_t *  property,
cci_object *  stringlist
[inline]
 

Return a list of all values for the given property in a sequence associated to the section section. stringlist must expose a valid dmIStringList interface.

long dmIPropertyList::GetPropertyLong dm_param  key,
const char_t *  section,
const char_t *  property,
long  dflt
[inline]
 

Return a long value associated to the property parameter. see GetPropertyStr() for parameters.

dm_real dmIPropertyList::GetPropertyReal dm_param  key,
const char_t *  section,
const char_t *  property,
dm_real  dflt
[inline]
 

Return a real (floating point) value associated to the property parameter. see GetPropertyStr() for parameters.

const char_t* dmIPropertyList::GetPropertyStr dm_param  key,
const char_t *  section,
const char_t *  property,
const char_t *  dflt = NULL
[inline]
 

Return a string value associated to the property parameter.

Parameters:
key the key returned by Open()
section the section (or node) you are interested in (can be null if already specified in Open().
property the name of the property.
dflt a default value to be returned if the property is not found or has no value associated to it.
Returns:
The string value of the property.

bool dmIPropertyList::GetSeq dm_param  key,
const char_t *  section
[inline]
 

Start a sequence at the section section Return false if there is no sequence associated to the specified section

bool dmIPropertyList::NewSeq dm_param  key,
const char_t *  section
[inline]
 

Create a new sequence associated to the section section. Note that the section will be created if it does not exists.

bool dmIPropertyList::NextSeq dm_param  key  )  [inline]
 

Move to the next item in a sequence

dm_param dmIPropertyList::Open CONST char_t *  uri,
CONST char_t *  section = NULL
[inline]
 

Open a property list resource from located at uri

Parameters:
uri the name of the resource. See named_res for more infos on named resources.
section the section that you are interested in. Can be NULL if you plan to inspect muliple sections.
Returns:
An access key, this value should be used in subsequent call to methods that require a key as input parameter. The key should always be released with the Close() method.

bool dmIPropertyList::SetProperty dm_param  key,
const char_t *  section,
const char_t *  property,
const char_t *  value
[inline]
 

Set a property value at section section. section can be set to NULL if has been already specified in Open().

bool dmIPropertyList::SetPropertyLong dm_param  key,
const char_t *  section,
const char_t *  property,
long  value
[inline]
 

Set a long int property value at section section. section can be set to NULL if has been already specified in Open().

bool dmIPropertyList::SetPropertyReal dm_param  key,
const char_t *  section,
const char_t *  property,
dm_real  value
[inline]
 

Set a floating point value at section section. section can be set to NULL if has been already specified in Open().


Generated on Tue May 9 12:34:57 2006 for Daim Library Module Set by  doxygen 1.4.6-NO