CAttributeList Class

# CAttributeList Class Reference

[CADIHash.h Index] [CADIHash.h Hierarchy]

a simple class destined to contain attribute-value pairs in an More...

`#include <../libInvertedFile/include/CAttributeList.h>`

Inherits: map, CMagic

## Public Members

- CAttributeList (const char* const * const inAttributeList)
- CAttributeList (const list<pair <string,string> >& inAttributes)
- CAttributeList (const CAttributeList& inList)
- const_iterator find (string inString) const
- void add (const string& inFirst, const string& inSecond)
- void add (const string& inAttribute,long inValue)
- void add (const string& inAttribute,double inValue)
- pair<bool,bool> boolReadAttribute (const string& inAttribute)
- pair<bool,long> longReadAttribute (const string& inAttribute)
- pair<bool,double> doubleReadAttribute (const string& inAttribute)
- virtual pair<bool,string> stringReadAttribute (const string& inAttribute)
- void CAttributeList::toXML (string& outString)

## Detailed Description

a simple class destined to contain attribute-value pairs in an

## CAttributeList(const char* const * const inAttributeList)

from expat

## CAttributeList(const list<pair <string,string> >& inAttributes)

from other c++

## CAttributeList(const CAttributeList& inList)

copy constructor

## const_iterator find(string inString) const

finding in this

## void add(const string& inFirst, const string& inSecond)

adding an attribute

## void add(const string& inAttribute,long inValue)

adding an attribute for integers using the function for strings

## void add(const string& inAttribute,double inValue)

adding an attribute for doubles using using the function for strings

## pair<bool,bool> boolReadAttribute(const string& inAttribute)

reading an attribute for booleans using stringReadAttributeit supports several pairs: yes/no true/false y/n

## pair<bool,long> longReadAttribute(const string& inAttribute)

reading an attribute for integers using stringReadAttribute

## pair<bool,double> doubleReadAttribute(const string& inAttribute)

reading an attribute for doubles using stringReadAttribute

## virtual pair<bool,string> stringReadAttribute(const string& inAttribute)

reading an attribute for strings All the attribute functions implement a primitive version of inheritance: We look also at the parents of this, if we do not find a given attribute in this.

this is virtual in order to plug in other methods of inheritance

## void CAttributeList::toXML(string& outString)

Outputting a string to XML

| Kdoc