00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __freXMLKeyedCollectionBase_txx
00024 #define __freXMLKeyedCollectionBase_txx
00025
00026 #include "freXMLKeyedCollectionBase.h"
00027
00028 namespace FREE
00029 {
00030
00031
00032 template <class TKey, class TXMLElement, class TIdentifierClass>
00033 void
00034 XMLKeyedCollectionBase< TKey,TXMLElement,TIdentifierClass >::Reset()
00035 {
00036 XMLStreamObject::Reset();
00037 KeyedCollectionBase<TKey,TXMLElement,TIdentifierClass>::Reset();
00038 };
00039
00040 template <class TKey, class TXMLElement, class TIdentifierClass>
00041 XMLKeyedCollectionBase< TKey,TXMLElement,TIdentifierClass >&
00042 XMLKeyedCollectionBase< TKey,TXMLElement,TIdentifierClass >::
00043 operator = (const XMLKeyedCollectionBase& rCollection)
00044 {
00045 if ( this == &rCollection) return *this;
00046
00047 this->LoadFromString(rCollection.SaveToString());
00048 return *this;
00049 };
00050
00051
00052 template <class TKey, class TXMLElement, class TIdentifierClass>
00053 XMLKeyedCollectionBase< TKey,TXMLElement,TIdentifierClass >&
00054 XMLKeyedCollectionBase< TKey,TXMLElement,TIdentifierClass >::
00055 operator + (const XMLKeyedCollectionBase& rCollection)
00056 {
00057 return KeyedCollectionBase< TKey,TXMLElement,TIdentifierClass >::operator + (rCollection);
00058 };
00059
00060 template <class TKey, class TXMLElement, class TIdentifierClass>
00061 std::string
00062 XMLKeyedCollectionBase< TKey,TXMLElement,TIdentifierClass >::
00063 SaveData(const unsigned int& iDepth, bool& bHasSubElements) const
00064 {
00065 std::string result;
00066 for (typename ElementVectorType::const_iterator pos = this->m_Elements.begin(); pos!=this->m_Elements.end(); pos++)
00067 {
00068 AddSubElement(result,(*pos),iDepth);
00069 };
00070
00071 bHasSubElements = this->m_Elements.size()!=0;
00072
00073 return result;
00074 };
00075
00076 }
00077
00078 #endif