26 #ifndef _XMLIterableAdapter_h
27 #define _XMLIterableAdapter_h
77 const char * mElementsName;
99 bool isXMLElement=
false)
102 mElementsName = elementName;
105 bool isXMLElement=
false)
106 :
BasicXMLable(name, isXMLElement), mAdaptee(const_cast<T&>(anAdaptee))
108 mElementsName = elementName;
112 CLAM_ASSERT(
false,
"You should never call XMLIterableAdapter::GetClassName");
151 if (!LoadLeaveOrComponent(store, elem,
155 mAdaptee.push_back(elem);
164 const char * separator =
"";
165 std::stringstream stream;
166 for (; it!=end; it++) {
167 stream << separator << *it;
170 std::string content=stream.str();
171 XMLAdapter<std::string> adapter(content);
172 store.
Store(adapter);
174 void StoreLeaveOrComponent (Storage& store,
StaticFalse* isLeave)
const
178 for (; it!=end; it++) {
179 XMLComponentAdapter adapter(*it,mElementsName,
true);
180 store.Store(adapter);
185 XMLAdapter<t_adapteeValues> adapter(value);
186 return store.Load(adapter);
190 XMLComponentAdapter adapter(value,mElementsName,
true);
191 return store.Load(adapter);
194 std::string ContentLeaveOrComponent(
StaticFalse* )
const
199 std::string ContentLeaveOrComponent(
StaticTrue* )
const
202 std::stringstream stream;
206 for (; it!=end; it++) {
207 if (first) first=
false;
216 bool ContentLeaveOrComponent(
StaticFalse* isLeave, std::istream &is)
223 bool ContentLeaveOrComponent(
StaticTrue* isLeave, std::istream &str)
230 if (str) mAdaptee.push_back(contained);
245 return super::FulfilsInvariant();
250 #endif//_XMLIterableAdapter_h