#include <freXMLStringMultiMap.h>


Public Types | |
| typedef unsigned int | ElementIndexType |
Public Member Functions | |
| ElementIndexType | Size () const |
| ElementIndexType | AddElement (const std::string &sXMLTag, const std::string &sData) |
| void | DeleteElement (const ElementIndexType &index) |
| ElementIndexType | GetElementData (const std::string &sXMLTag, std::string &sData) const |
| ElementIndexType | GetElementData (const std::string &sXMLTag, std::string &sData, ElementIndexType &nextIndex) const |
| bool | GetElementData (const ElementIndexType &index, std::string &sData) const |
| bool | GetElementTag (const ElementIndexType &index, std::string &sXMLTag) const |
| void | SetElementData (const ElementIndexType &index, const std::string &sData) |
| virtual void | Reset () |
| virtual XMLStringMultiMap & | operator= (const XMLStringMultiMap &rXMLStringMultiMap) |
| XMLStringMultiMap (const std::string sXMLTag) | |
| XMLStringMultiMap (const XMLStringMultiMap &rXMLStringMultiMap) | |
| virtual | ~XMLStringMultiMap () |
Protected Member Functions | |
| virtual void | SubElementLoadProcessing (const std::string &rsXMLSubTag, const std::string &rsXMLSubElement, const std::string &rsXMLSubData) |
| virtual std::string | SaveData (const unsigned int &iDepth, bool &bHasSubElements) const |
Private Attributes | |
| STLStringVector | m_Keys |
| STLStringVector | m_Datas |
XMLStringMultiMap parses the data of a xml element a stores the sub elements with their values keyed by their tag. Like in a std::mulitmap the keyes have not to be unique. The sequence of the vector elements is the order of occurance within the xml element Attributes of xml sub elements will be ignored and not stored, also plain text parts will be skipped.
Definition at line 44 of file freXMLStringMultiMap.h.
| typedef unsigned int FREE::XMLStringMultiMap::ElementIndexType |
Reimplemented in FREE::CtrlProfile::ProfileInheritance.
Definition at line 47 of file freXMLStringMultiMap.h.
| FREE::XMLStringMultiMap::XMLStringMultiMap | ( | const std::string | sXMLTag | ) |
Default constructor
Definition at line 144 of file freXMLStringMultiMap.cxx.
| FREE::XMLStringMultiMap::XMLStringMultiMap | ( | const XMLStringMultiMap & | rXMLStringMultiMap | ) |
Copy constructor
Definition at line 149 of file freXMLStringMultiMap.cxx.
| FREE::XMLStringMultiMap::~XMLStringMultiMap | ( | ) | [virtual] |
destructor
Definition at line 155 of file freXMLStringMultiMap.cxx.
References Reset().

| XMLStringMultiMap::ElementIndexType FREE::XMLStringMultiMap::Size | ( | ) | const |
Size of the vector
Implementation of FREE::XMLStringMultiMap ////////////////////////////
Definition at line 35 of file freXMLStringMultiMap.cxx.
References m_Keys.
Referenced by FREE::CtrlProfile::ProfileInheritance::GetParent(), FREE::CtrlProfile::ProfileInheritance::IndexOfAncestor(), operator=(), and FREE::CtrlProfile::ProfileOption::ProfileMatchesOption().
| XMLStringMultiMap::ElementIndexType FREE::XMLStringMultiMap::AddElement | ( | const std::string & | sXMLTag, | |
| const std::string & | sData | |||
| ) |
Adds an element with tag and data to the vector.
| [in] | sXMLTag | The xml tag of the sub element |
| [in] | sData | The data of the added sub element |
Definition at line 42 of file freXMLStringMultiMap.cxx.
References m_Datas, and m_Keys.
Referenced by FREE::CtrlProfile::ProfileInheritance::AddAncestor(), operator=(), and SubElementLoadProcessing().
| void FREE::XMLStringMultiMap::DeleteElement | ( | const ElementIndexType & | index | ) |
Deletes a sub element within the vector, specified by the index.
| [in] | index | The indexs of the sub element within the vector. If index is out of range, no element will be deleted. |
Definition at line 94 of file freXMLStringMultiMap.cxx.
| XMLStringMultiMap::ElementIndexType FREE::XMLStringMultiMap::GetElementData | ( | const std::string & | sXMLTag, | |
| std::string & | sData | |||
| ) | const |
Retrieves the data of a sub element, specified by the tag.
| [in] | sXMLTag | The xml tag of the wanted sub element |
| [out] | sData | The data of the specified sub element |
Definition at line 51 of file freXMLStringMultiMap.cxx.
Referenced by FREE::CtrlProfile::ProfileInheritance::GetAncestor(), FREE::CtrlProfile::ProfileInheritance::GetParent(), FREE::CtrlProfile::ProfileInheritance::IndexOfAncestor(), and operator=().
| XMLStringMultiMap::ElementIndexType FREE::XMLStringMultiMap::GetElementData | ( | const std::string & | sXMLTag, | |
| std::string & | sData, | |||
| ElementIndexType & | nextIndex | |||
| ) | const |
Retrieves the data of a sub element, specified by the tag. With the help of nextIndex multiple occurance of one tag can be found within the vector. When calling the function, nextIndex specifies the starting point of the tag search within the vector. After the return of the function it contains the index+1 of the finding. Or is -1 if there was no finding, so when the return is false.
| [in] | sXMLTag | The xml tag of the wanted sub element |
| [out] | sData | The data of the specified sub element |
| [out] | nextIndex | Specifies the current position for the search within the vector. |
Definition at line 59 of file freXMLStringMultiMap.cxx.
| bool FREE::XMLStringMultiMap::GetElementData | ( | const ElementIndexType & | index, | |
| std::string & | sData | |||
| ) | const |
Retrieves the data of a sub element, specified by the index within the vector.
| [in] | index | The indexs of the sub element within the vector. If index is out of range, the return is false. |
| [out] | sData | The data of the specified sub element |
Definition at line 75 of file freXMLStringMultiMap.cxx.
References m_Datas.
| bool FREE::XMLStringMultiMap::GetElementTag | ( | const ElementIndexType & | index, | |
| std::string & | sXMLTag | |||
| ) | const |
Retrieves the tag of a sub element, specified by the index within the vector.
| [in] | index | The indexs of the sub element within the vector. If index is out of range, the return is false. |
| [out] | sXMLTag | The tag of the specified sub element |
Definition at line 104 of file freXMLStringMultiMap.cxx.
References m_Keys.
Referenced by operator=().
| void FREE::XMLStringMultiMap::SetElementData | ( | const ElementIndexType & | index, | |
| const std::string & | sData | |||
| ) |
Sets the data of a sub element within the vector, specified by the index.
| [in] | index | The indexs of the sub element within the vector. |
| [in] | sData | The new data to be set. |
Definition at line 85 of file freXMLStringMultiMap.cxx.
References m_Datas.
Referenced by FREE::CtrlProfile::ProfileInheritance::AddAncestor().
| void FREE::XMLStringMultiMap::Reset | ( | ) | [virtual] |
Resets the object to default/initial state
Reimplemented from FREE::XMLStreamObject.
Definition at line 114 of file freXMLStringMultiMap.cxx.
References m_Datas, m_Keys, and FREE::XMLStreamObject::Reset().
Referenced by operator=(), FREE::CtrlProfile::ControllerProfileBase::Reset(), and ~XMLStringMultiMap().

| XMLStringMultiMap & FREE::XMLStringMultiMap::operator= | ( | const XMLStringMultiMap & | rXMLStringMultiMap | ) | [virtual] |
Assignment operator.
Definition at line 123 of file freXMLStringMultiMap.cxx.
References AddElement(), GetElementData(), GetElementTag(), Reset(), and Size().
Referenced by FREE::CtrlProfile::ProfileInheritance::operator=().

| void FREE::XMLStringMultiMap::SubElementLoadProcessing | ( | const std::string & | rsXMLSubTag, | |
| const std::string & | rsXMLSubElement, | |||
| const std::string & | rsXMLSubData | |||
| ) | [protected, virtual] |
Reimplementation
Reimplemented from FREE::XMLStreamObject.
Definition at line 162 of file freXMLStringMultiMap.cxx.
References AddElement(), and FREE::XMLStreamObject::cXML_Text.

| std::string FREE::XMLStringMultiMap::SaveData | ( | const unsigned int & | iDepth, | |
| bool & | bHasSubElements | |||
| ) | const [protected, virtual] |
Reimplementation
Reimplemented from FREE::XMLStreamObject.
Definition at line 169 of file freXMLStringMultiMap.cxx.
References FREE::XMLStreamObject::AddSubElement(), FREE::XMLStreamObject::cXML_Text, m_Datas, and m_Keys.

Definition at line 119 of file freXMLStringMultiMap.h.
Referenced by AddElement(), DeleteElement(), GetElementData(), GetElementTag(), Reset(), SaveData(), and Size().
Definition at line 120 of file freXMLStringMultiMap.h.
Referenced by AddElement(), DeleteElement(), GetElementData(), Reset(), SaveData(), and SetElementData().
1.5.3 written by Dimitri van Heesch,
© 1997-2000