17 #ifndef IGNITION_RENDERING_BASE_BASESTORAGE_HH_ 18 #define IGNITION_RENDERING_BASE_BASESTORAGE_HH_ 24 #include <ignition/common/Console.hh> 33 template <
class T,
class U>
45 typedef typename UMap::iterator UIter;
47 typedef typename UMap::const_iterator ConstUIter;
53 public:
virtual unsigned int Size()
const;
61 public:
virtual TPtr
GetByIndex(
unsigned int _index)
const;
67 public:
virtual void Remove(TPtr _value);
75 protected:
virtual bool IsValidIter(ConstUIter _iter)
const;
81 template <
class T,
class U>
93 typedef typename UStore::iterator UIter;
95 typedef typename UStore::const_iterator ConstUIter;
101 public:
virtual unsigned int Size()
const;
103 public:
virtual bool Contains(ConstTPtr _object)
const;
105 public:
virtual bool ContainsId(
unsigned int _id)
const;
107 public:
virtual bool ContainsName(
const std::string &_name)
const;
109 public:
virtual TPtr GetById(
unsigned int _id)
const;
111 public:
virtual TPtr GetByName(
const std::string &_name)
const;
113 public:
virtual TPtr
GetByIndex(
unsigned int _index)
const;
115 public:
virtual bool Add(TPtr _object);
117 public:
virtual TPtr
Remove(TPtr _object);
119 public:
virtual TPtr RemoveById(
unsigned int _id);
121 public:
virtual TPtr RemoveByName(
const std::string &_name);
123 public:
virtual TPtr RemoveByIndex(
unsigned int _index);
127 public:
virtual void Destroy(TPtr _object);
129 public:
virtual void DestroyById(
unsigned int _id);
131 public:
virtual void DestroyByName(
const std::string &_name);
133 public:
virtual void DestroyByIndex(
unsigned int _index);
135 public:
virtual void DestroyAll();
137 public:
virtual UPtr DerivedById(
unsigned int _id)
const;
139 public:
virtual UPtr DerivedByName(
const std::string &_name)
const;
143 public:
virtual bool AddDerived(UPtr _object);
145 public:
virtual UPtr RemoveDerived(UPtr _object);
147 public:
virtual UPtr RemoveDerivedById(
unsigned int _id);
149 public:
virtual UPtr RemoveDerivedByName(
const std::string &_name);
151 public:
virtual UPtr RemoveDerivedByIndex(
unsigned int _index);
153 protected:
virtual ConstUIter ConstIter(ConstTPtr _object)
const;
155 protected:
virtual ConstUIter ConstIterById(
unsigned int _id)
const;
157 protected:
virtual ConstUIter ConstIterByName(
160 protected:
virtual ConstUIter ConstIterByIndex(
unsigned int _index)
const;
162 protected:
virtual UIter Iter(ConstTPtr _object);
164 protected:
virtual UIter IterById(
unsigned int _id);
166 protected:
virtual UIter IterByName(
const std::string &_name);
168 protected:
virtual UIter IterByIndex(
unsigned int _index);
170 protected:
virtual bool AddImpl(UPtr _object);
172 protected:
virtual UPtr RemoveImpl(UIter _iter);
174 protected:
virtual void DestroyImpl(UIter _iter);
176 protected:
virtual bool IsValidIter(ConstUIter _iter)
const;
178 protected:
virtual UIter RemoveConstness(ConstUIter _iter);
200 typedef typename TStoreList::iterator TStoreIter;
206 public:
virtual unsigned int Size()
const;
208 public:
virtual bool Contains(ConstTPtr _object)
const;
210 public:
virtual bool ContainsId(
unsigned int _id)
const;
212 public:
virtual bool ContainsName(
const std::string &_name)
const;
214 public:
virtual TPtr GetById(
unsigned int _id)
const;
216 public:
virtual TPtr GetByName(
const std::string &_name)
const;
218 public:
virtual TPtr
GetByIndex(
unsigned int _index)
const;
220 public:
virtual bool Add(TPtr _object);
222 public:
virtual TPtr
Remove(TPtr _object);
224 public:
virtual TPtr RemoveById(
unsigned int _id);
226 public:
virtual TPtr RemoveByName(
const std::string &_name);
228 public:
virtual TPtr RemoveByIndex(
unsigned int _index);
232 public:
virtual void Destroy(TPtr _object);
234 public:
virtual void DestroyById(
unsigned int _id);
236 public:
virtual void DestroyByName(
const std::string &_name);
238 public:
virtual void DestroyByIndex(
unsigned int _index);
240 public:
virtual void DestroyAll();
242 public:
virtual unsigned int GetStoreCount()
const;
244 public:
virtual bool ContainsStore(ConstTStorePtr _store)
const;
246 public:
virtual TStorePtr GetStore(
unsigned int _index)
const;
248 public:
virtual bool AddStore(TStorePtr _store);
250 public:
virtual TStorePtr RemoveStore(TStorePtr _store);
252 public:
virtual TStorePtr RemoveStore(
unsigned int _index);
254 public:
virtual TStorePtr RemoveStoreImpl(TStoreIter _iter);
260 template <
class T,
class U>
280 public:
virtual unsigned int Size()
const;
282 public:
virtual bool Contains(ConstTPtr _object)
const;
284 public:
virtual bool ContainsId(
unsigned int _id)
const;
286 public:
virtual bool ContainsName(
const std::string &_name)
const;
288 public:
virtual TPtr GetById(
unsigned int _id)
const;
290 public:
virtual TPtr GetByName(
const std::string &_name)
const;
292 public:
virtual TPtr
GetByIndex(
unsigned int _index)
const;
294 public:
virtual bool Add(TPtr _object);
296 public:
virtual TPtr
Remove(TPtr _object);
298 public:
virtual TPtr RemoveById(
unsigned int _id);
300 public:
virtual TPtr RemoveByName(
const std::string &_name);
302 public:
virtual TPtr RemoveByIndex(
unsigned int _index);
306 public:
virtual void Destroy(TPtr _object);
308 public:
virtual void DestroyById(
unsigned int _id);
310 public:
virtual void DestroyByName(
const std::string &_name);
312 public:
virtual void DestroyByIndex(
unsigned int _index);
314 public:
virtual void DestroyAll();
326 class IGNITION_RENDERING_VISIBLE BaseSceneStore :
332 class IGNITION_RENDERING_VISIBLE BaseNodeStore :
338 class IGNITION_RENDERING_VISIBLE BaseLightStore :
344 class IGNITION_RENDERING_VISIBLE BaseSensorStore :
350 class IGNITION_RENDERING_VISIBLE BaseVisualStore :
356 class IGNITION_RENDERING_VISIBLE BaseGeometryStore :
362 class IGNITION_RENDERING_VISIBLE BaseSubMeshStore :
368 class IGNITION_RENDERING_VISIBLE BaseMaterialMap :
374 template <
class T,
class U>
380 template <
class T,
class U>
386 template <
class T,
class U>
393 template <
class T,
class U>
400 template <
class T,
class U>
403 for (
auto pair : this->
map)
405 if (pair.second == _value)
return true;
412 template <
class T,
class U>
420 template <
class T,
class U>
428 template <
class T,
class U>
433 ignerr <<
"Cannot store item with empty key" <<
std::endl;
439 ignerr <<
"Cannot store null pointer value" <<
std::endl;
445 ignerr <<
"Item already registered with key: " << _key <<
std::endl;
453 ignerr <<
"Cannot add item created by another render-engine" 459 this->
map[_key] = derived;
464 template <
class T,
class U>
467 auto iter = this->
map.
find(_key);
476 template <
class T,
class U>
483 if (iter->second == _value)
494 template <
class T,
class U>
501 template <
class T,
class U>
505 auto iter = this->
map.
find(_key);
506 return (this->
IsValidIter(iter)) ? iter->second :
nullptr;
510 template <
class T,
class U>
514 if (_index >= this->
Size())
516 ignerr <<
"Invalid index: " << _index <<
std::endl;
526 template <
class T,
class U>
529 return _iter != this->
map.
end();
533 template <
class T,
class U>
539 template <
class T,
class U>
545 template <
class T,
class U>
548 return this->store.size();
552 template <
class T,
class U>
555 auto iter = this->ConstIter(_object);
560 template <
class T,
class U>
563 auto iter = this->ConstIterById(_id);
568 template <
class T,
class U>
571 auto iter = this->ConstIterByName(_name);
576 template <
class T,
class U>
580 return this->DerivedById(_id);
584 template <
class T,
class U>
588 return this->DerivedByName(_name);
592 template <
class T,
class U>
600 template <
class T,
class U>
605 ignerr <<
"Cannot add null pointer" <<
std::endl;
613 ignerr <<
"Cannot add item created by another render-engine" 619 return this->AddImpl(derived);
623 template <
class T,
class U>
627 auto iter = this->Iter(_object);
628 return this->RemoveImpl(iter);
632 template <
class T,
class U>
636 return this->RemoveDerivedById(_id);
640 template <
class T,
class U>
644 return this->RemoveDerivedByName(_name);
648 template <
class T,
class U>
652 return this->RemoveDerivedByIndex(_index);
656 template <
class T,
class U>
663 template <
class T,
class U>
666 auto iter = this->Iter(_object);
667 this->DestroyImpl(iter);
671 template <
class T,
class U>
674 auto iter = this->IterById(_id);
675 this->DestroyImpl(iter);
679 template <
class T,
class U>
682 auto iter = this->IterByName(_name);
683 this->DestroyImpl(iter);
687 template <
class T,
class U>
690 auto iter = this->IterByIndex(_index);
691 this->DestroyImpl(iter);
695 template <
class T,
class U>
698 unsigned int i = this->
Size();
702 this->DestroyByIndex(--i);
707 template <
class T,
class U>
711 auto iter = this->ConstIterById(_id);
712 return (this->
IsValidIter(iter)) ? iter->second :
nullptr;
716 template <
class T,
class U>
720 auto iter = this->ConstIterByName(_name);
721 return (this->
IsValidIter(iter)) ? iter->second :
nullptr;
725 template <
class T,
class U>
729 auto iter = this->ConstIterByIndex(_index);
730 return (this->
IsValidIter(iter)) ? iter->second :
nullptr;
734 template <
class T,
class U>
739 ignerr <<
"Cannot add null pointer" <<
std::endl;
743 return this->AddImpl(_object);
747 template <
class T,
class U>
751 auto iter = this->Iter(_object);
752 return this->RemoveImpl(iter);
756 template <
class T,
class U>
760 auto iter = this->IterById(_id);
761 return this->RemoveImpl(iter);
765 template <
class T,
class U>
769 auto iter = this->IterByName(_name);
770 return this->RemoveImpl(iter);
774 template <
class T,
class U>
778 auto iter = this->IterByIndex(_index);
779 return this->RemoveImpl(iter);
783 template <
class T,
class U>
784 typename BaseStore<T, U>::ConstUIter
787 auto begin = this->store.begin();
788 auto end = this->store.end();
790 for (
auto iter = begin; iter != end; ++iter)
792 if (iter->second == _object)
802 template <
class T,
class U>
803 typename BaseStore<T, U>::ConstUIter
806 auto begin = this->store.begin();
807 auto end = this->store.end();
809 for (
auto iter = begin; iter != end; ++iter)
811 if (iter->second->Id() == _id)
821 template <
class T,
class U>
822 typename BaseStore<T, U>::ConstUIter
825 return this->store.find(_name);
829 template <
class T,
class U>
830 typename BaseStore<T, U>::ConstUIter
833 if (_index >= this->
Size())
835 ignerr <<
"Invalid index: " << _index <<
std::endl;
836 return this->store.end();
839 auto iter = this->store.begin();
845 template <
class T,
class U>
846 typename BaseStore<T, U>::UIter
849 auto iter = this->ConstIter(_object);
850 return this->RemoveConstness(iter);
854 template <
class T,
class U>
855 typename BaseStore<T, U>::UIter
858 auto iter = this->ConstIterById(_id);
859 return this->RemoveConstness(iter);
863 template <
class T,
class U>
864 typename BaseStore<T, U>::UIter
867 auto iter = this->ConstIterByName(_name);
868 return this->RemoveConstness(iter);
872 template <
class T,
class U>
873 typename BaseStore<T, U>::UIter
876 auto iter = this->ConstIterByIndex(_index);
877 return this->RemoveConstness(iter);
881 template <
class T,
class U>
884 unsigned int id = _object->Id();
887 if (this->ContainsId(
id))
889 ignerr <<
"Another item already exists with id: " <<
id <<
std::endl;
893 if (this->ContainsName(name))
895 ignerr <<
"Another item already exists with name: " << name
900 this->store[
name] = _object;
905 template <
class T,
class U>
915 this->store.erase(_iter);
920 template <
class T,
class U>
924 if (result) result->Destroy();
928 template <
class T,
class U>
931 return _iter != this->store.end();
935 template <
class T,
class U>
936 typename BaseStore<T, U>::UIter
940 this->store.erase(_iter, _iter) : this->store.end();
959 unsigned int size = 0;
961 for (
auto store : this->stores)
963 size += store->Size();
973 for (
auto store : this->stores)
975 if (store->Contains(_object))
return true;
985 for (
auto store : this->stores)
987 if (store->ContainsId(_id))
return true;
997 for (
auto store : this->stores)
999 if (store->ContainsName(_name))
return true;
1010 for (
auto store : this->stores)
1012 TPtr object = store->GetById(_id);
1013 if (
object)
return object;
1024 for (
auto store : this->stores)
1026 TPtr object = store->GetByName(_name);
1027 if (
object)
return object;
1038 unsigned int origIndex = _index;
1040 for (
auto store : this->stores)
1042 unsigned int size = store->Size();
1044 return store->GetByIndex(_index);
1048 ignerr <<
"Invalid index: " << origIndex <<
std::endl;
1056 ignerr <<
"Adding to BaseCompositeStore not supported" <<
std::endl;
1067 for (
auto store : this->stores)
1069 TPtr temp = store->Remove(_object);
1070 if (!result) result = temp;
1083 for (
auto store : this->stores)
1085 TPtr temp = store->RemoveById(_id);
1086 if (!result) result = temp;
1099 for (
auto store : this->stores)
1101 TPtr temp = store->RemoveByName(_name);
1102 if (!result) result = temp;
1115 for (
auto store : this->stores)
1117 TPtr temp = store->RemoveByIndex(_index);
1118 if (!result) result = temp;
1128 for (
auto store : this->stores)
1138 for (
auto store : this->stores)
1140 store->Destroy(_object);
1148 for (
auto store : this->stores)
1150 store->DestroyById(_id);
1158 for (
auto store : this->stores)
1160 store->DestroyByName(_name);
1168 for (
auto store : this->stores)
1170 store->DestroyByIndex(_index);
1178 for (
auto store : this->stores)
1180 store->DestroyAll();
1188 return this->stores.size();
1195 auto begin = this->stores.begin();
1196 auto end = this->stores.end();
1197 auto iter =
std::find(begin, end, _store);
1206 if (_index >= this->GetStoreCount())
1208 ignerr <<
"Invalid store index: " << _index <<
std::endl;
1212 return this->stores[_index];
1221 ignerr <<
"Cannot all null store pointer" <<
std::endl;
1225 if (this->ContainsStore(_store))
1227 ignerr <<
"Store has already been added" <<
std::endl;
1231 this->stores.push_back(_store);
1240 auto begin = this->stores.begin();
1241 auto end = this->stores.end();
1242 auto iter =
std::find(begin, end, _store);
1243 return this->RemoveStoreImpl(iter);
1251 if (_index >= this->GetStoreCount())
1253 ignerr <<
"Invalid store index: " << _index <<
std::endl;
1257 auto iter = this->stores.begin();
1259 return this->RemoveStoreImpl(iter);
1267 if (_iter == this->stores.end())
1273 this->stores.erase(_iter);
1278 template <
class T,
class U>
1285 template <
class T,
class U>
1291 template <
class T,
class U>
1294 return this->
store->Size();
1298 template <
class T,
class U>
1302 return this->
store->Contains(derived);
1306 template <
class T,
class U>
1309 return this->
store->ContainsId(_id);
1313 template <
class T,
class U>
1316 return this->
store->ContainsName(_name);
1320 template <
class T,
class U>
1324 return this->
store->GetById(_id);
1328 template <
class T,
class U>
1332 return this->
store->GetByName(_name);
1336 template <
class T,
class U>
1340 return this->
store->GetByIndex(_index);
1344 template <
class T,
class U>
1348 return this->
store->Add(derived);
1352 template <
class T,
class U>
1357 return this->
store->Remove(derived);
1361 template <
class T,
class U>
1365 return this->
store->RemoveById(_id);
1369 template <
class T,
class U>
1373 return this->
store->RemoveByName(_name);
1377 template <
class T,
class U>
1381 return this->
store->RemoveByIndex(_index);
1385 template <
class T,
class U>
1388 this->
store->RemoveAll();
1392 template <
class T,
class U>
1396 this->
store->Destroy(derived);
1400 template <
class T,
class U>
1403 this->
store->DestroyById(_id);
1407 template <
class T,
class U>
1410 this->
store->DestroyByName(_name);
1414 template <
class T,
class U>
1417 this->
store->DestroyByIndex(_index);
1421 template <
class T,
class U>
1424 this->
store->DestroyAll();
Represents a collection of Store objects, collectively working as a single composite store...
Definition: Storage.hh:224
virtual ~BaseMap()
Definition: BaseStorage.hh:381
UStorePtr store
Definition: BaseStorage.hh:316
virtual UPtr Derived(const std::string &_key) const
Definition: BaseStorage.hh:503
virtual bool Add(TPtr _object)
Add given element. If the element has already been added or its name or ID conflict with other existi...
Definition: BaseStorage.hh:601
Definition: BaseStorage.hh:185
virtual TStorePtr GetStore(unsigned int _index) const
Get store at the given index. If no such store exists NULL will be returned.
Definition: BaseStorage.hh:1204
virtual UIter RemoveConstness(ConstUIter _iter)
Definition: BaseStorage.hh:937
virtual bool ContainsId(unsigned int _id) const
Determine if store contains the element with the given ID.
Definition: BaseStorage.hh:1307
virtual unsigned int Size() const
Get number of elements in this store.
Definition: BaseStorage.hh:546
virtual UIter IterByIndex(unsigned int _index)
Definition: BaseStorage.hh:874
virtual bool Contains(ConstTPtr _object) const
Determine if store contains the given element.
Definition: BaseStorage.hh:971
virtual bool ContainsName(const std::string &_name) const
Determine if store contains the element with the given name.
Definition: BaseStorage.hh:1314
BaseStoreWrapper(UStorePtr _store)
Definition: BaseStorage.hh:1279
virtual UPtr RemoveImpl(UIter _iter)
Definition: BaseStorage.hh:907
virtual TPtr Remove(TPtr _object)
Remove given element. If the given element does not exists in this store, then no work will be done...
Definition: BaseStorage.hh:625
virtual void DestroyByIndex(unsigned int _index)
Remove and destroy element at the given index. If the specified element does not exists in this store...
Definition: BaseStorage.hh:1166
virtual void DestroyById(unsigned int _id)
Remove and destroy element with the given ID. If the specified element does not exists in this store...
Definition: BaseStorage.hh:1401
virtual TPtr GetByIndex(unsigned int _index) const
Get the element at the given index.
Definition: BaseStorage.hh:422
virtual void DestroyById(unsigned int _id)
Remove and destroy element with the given ID. If the specified element does not exists in this store...
Definition: BaseStorage.hh:672
virtual TPtr Remove(TPtr _object)
Remove given element. If the given element does not exists in this store, then no work will be done...
Definition: BaseStorage.hh:1063
virtual UPtr DerivedByName(const std::string &_name) const
Definition: BaseStorage.hh:718
virtual UIter IterById(unsigned int _id)
Definition: BaseStorage.hh:856
Definition: BaseStorage.hh:34
virtual bool ContainsValue(ConstTPtr _value) const
Determine if the given element exists in this map.
Definition: BaseStorage.hh:401
virtual TPtr Remove(TPtr _object)
Remove given element. If the given element does not exists in this store, then no work will be done...
Definition: BaseStorage.hh:1354
virtual TPtr RemoveById(unsigned int _id)
Remove element with the given ID. If the specified element does not exists in this store...
Definition: BaseStorage.hh:1363
virtual ConstUIter ConstIterById(unsigned int _id) const
Definition: BaseStorage.hh:804
virtual bool ContainsName(const std::string &_name) const
Determine if store contains the element with the given name.
Definition: BaseStorage.hh:995
virtual TPtr GetByIndex(unsigned int _index) const
Get element at the given index.
Definition: BaseStorage.hh:1036
virtual ConstUIter ConstIterByName(const std::string &_name) const
Definition: BaseStorage.hh:823
BaseMap()
Definition: BaseStorage.hh:375
Definition: BaseStorage.hh:82
virtual void RemoveAll()
Remove all elements from store.
Definition: BaseStorage.hh:1386
virtual bool IsValidIter(ConstUIter _iter) const
Definition: BaseStorage.hh:929
virtual TPtr GetByIndex(unsigned int _index) const
Get element at the given index.
Definition: BaseStorage.hh:594
virtual void DestroyByIndex(unsigned int _index)
Remove and destroy element at the given index. If the specified element does not exists in this store...
Definition: BaseStorage.hh:1415
virtual TPtr GetByIndex(unsigned int _index) const
Get element at the given index.
Definition: BaseStorage.hh:1338
Definition: BaseStorage.hh:261
virtual bool ContainsKey(const std::string &_key) const
Determine if an elements is mapped to the given key.
Definition: BaseStorage.hh:394
virtual void DestroyById(unsigned int _id)
Remove and destroy element with the given ID. If the specified element does not exists in this store...
Definition: BaseStorage.hh:1146
virtual void Remove(const std::string &_key)
Remove the element mapped to the given key. If the specified element does not exists, no work will be done.
Definition: BaseStorage.hh:465
virtual void Destroy(TPtr _object)
Remove and destroy given element. If the given element does not exists, in this store, then no work will be done.
Definition: BaseStorage.hh:1136
virtual bool Contains(ConstTPtr _object) const
Determine if store contains the given element.
Definition: BaseStorage.hh:1299
virtual UPtr DerivedById(unsigned int _id) const
Definition: BaseStorage.hh:709
virtual TStorePtr RemoveStoreImpl(TStoreIter _iter)
Definition: BaseStorage.hh:1265
Definition: BaseStorage.hh:320
virtual TStorePtr RemoveStore(TStorePtr _store)
Remove given store. If no such store exists no work will be done and NULL will be returned...
Definition: BaseStorage.hh:1238
virtual bool Contains(ConstTPtr _object) const
Determine if store contains the given element.
Definition: BaseStorage.hh:553
virtual void DestroyByName(const std::string &_name)
Remove and destroy element with the given name. If the specified element does not exists in this stor...
Definition: BaseStorage.hh:1156
virtual void DestroyImpl(UIter _iter)
Definition: BaseStorage.hh:921
virtual TPtr RemoveByIndex(unsigned int _index)
Remove element at the given index. If the specified element does not exists in this store...
Definition: BaseStorage.hh:650
virtual TPtr Get(const std::string &_key) const
Get the element mapped to the given key.
Definition: BaseStorage.hh:414
virtual TPtr GetByName(const std::string &_name) const
Get element with the given name.
Definition: BaseStorage.hh:1330
Storage map from std::string to template class T.
Definition: Storage.hh:46
virtual void Destroy(TPtr _object)
Remove and destroy given element. If the given element does not exists, in this store, then no work will be done.
Definition: BaseStorage.hh:1393
UStore store
Definition: BaseStorage.hh:180
UMap map
Definition: BaseStorage.hh:77
virtual TPtr RemoveByName(const std::string &_name)
Remove element with the given name. If the specified element does not exists in this store...
Definition: BaseStorage.hh:642
virtual bool Put(const std::string &_key, TPtr _value)
Map to given element to the given key. If the given key is already in use, no work will be done...
Definition: BaseStorage.hh:429
virtual unsigned int Size() const
Get number of elements in this store.
Definition: BaseStorage.hh:1292
virtual void DestroyByName(const std::string &_name)
Remove and destroy element with the given name. If the specified element does not exists in this stor...
Definition: BaseStorage.hh:1408
virtual bool AddDerived(UPtr _object)
Definition: BaseStorage.hh:735
Multi-access storage structure of template class T. Template class T is expected to have functions Ge...
Definition: Storage.hh:111
T dynamic_pointer_cast(T... args)
virtual void RemoveAll()
Remove all elements from this map.
Definition: BaseStorage.hh:495
virtual UPtr RemoveDerivedByIndex(unsigned int _index)
Definition: BaseStorage.hh:776
virtual UPtr DerivedByIndex(unsigned int _index) const
Definition: BaseStorage.hh:512
virtual UIter Iter(ConstTPtr _object)
Definition: BaseStorage.hh:847
virtual TPtr RemoveByName(const std::string &_name)
Remove element with the given name. If the specified element does not exists in this store...
Definition: BaseStorage.hh:1095
virtual bool ContainsStore(ConstTStorePtr _store) const
Determine if given store exists.
Definition: BaseStorage.hh:1193
BaseStore()
Definition: BaseStorage.hh:534
virtual TPtr GetById(unsigned int _id) const
Get element with the given ID.
Definition: BaseStorage.hh:1322
virtual UPtr RemoveDerived(UPtr _object)
Definition: BaseStorage.hh:749
virtual bool ContainsId(unsigned int _id) const
Determine if store contains the element with the given ID.
Definition: BaseStorage.hh:561
virtual void RemoveAll()
Remove all elements from store.
Definition: BaseStorage.hh:657
virtual void DestroyByName(const std::string &_name)
Remove and destroy element with the given name. If the specified element does not exists in this stor...
Definition: BaseStorage.hh:680
virtual void DestroyAll()
Remove and destroy all elements in store.
Definition: BaseStorage.hh:1422
virtual TPtr GetByName(const std::string &_name) const
Get element with the given name.
Definition: BaseStorage.hh:1022
virtual bool Add(TPtr _object)
Add given element. If the element has already been added or its name or ID conflict with other existi...
Definition: BaseStorage.hh:1345
BaseCompositeStore()
Definition: BaseStorage.hh:945
Simple wrapper class that allows a Store of type Derived to be treated as a Store of type Base...
Definition: Storage.hh:288
virtual bool ContainsName(const std::string &_name) const
Determine if store contains the element with the given name.
Definition: BaseStorage.hh:569
virtual bool Add(TPtr _object)
Add given element. If the element has already been added or its name or ID conflict with other existi...
Definition: BaseStorage.hh:1054
virtual UPtr DerivedByIndex(unsigned int _index) const
Definition: BaseStorage.hh:727
virtual TPtr RemoveByIndex(unsigned int _index)
Remove element at the given index. If the specified element does not exists in this store...
Definition: BaseStorage.hh:1111
virtual UIter IterByName(const std::string &_name)
Definition: BaseStorage.hh:865
virtual unsigned int Size() const
Get number of elements in this store.
Definition: BaseStorage.hh:957
virtual ~BaseCompositeStore()
Definition: BaseStorage.hh:951
virtual void DestroyAll()
Remove and destroy all elements in store.
Definition: BaseStorage.hh:1176
virtual TPtr RemoveById(unsigned int _id)
Remove element with the given ID. If the specified element does not exists in this store...
Definition: BaseStorage.hh:634
virtual unsigned int Size() const
Get the number of elements in this map.
Definition: BaseStorage.hh:387
virtual unsigned int GetStoreCount() const
Get number of Stores.
Definition: BaseStorage.hh:1186
virtual TPtr GetById(unsigned int _id) const
Get element with the given ID.
Definition: BaseStorage.hh:578
virtual bool AddStore(TStorePtr _store)
Add the given store. If the given store already exists, then no work will be done.
Definition: BaseStorage.hh:1217
virtual void Destroy(TPtr _object)
Remove and destroy given element. If the given element does not exists, in this store, then no work will be done.
Definition: BaseStorage.hh:664
Definition: ArrowVisual.hh:22
virtual ConstUIter ConstIterByIndex(unsigned int _index) const
Definition: BaseStorage.hh:831
virtual void DestroyAll()
Remove and destroy all elements in store.
Definition: BaseStorage.hh:696
virtual bool IsValidIter(ConstUIter _iter) const
Definition: BaseStorage.hh:527
TStoreList stores
Definition: BaseStorage.hh:256
virtual bool AddImpl(UPtr _object)
Definition: BaseStorage.hh:882
virtual ~BaseStore()
Definition: BaseStorage.hh:540
virtual TPtr RemoveByIndex(unsigned int _index)
Remove element at the given index. If the specified element does not exists in this store...
Definition: BaseStorage.hh:1379
virtual UPtr RemoveDerivedByName(const std::string &_name)
Definition: BaseStorage.hh:767
virtual TPtr RemoveById(unsigned int _id)
Remove element with the given ID. If the specified element does not exists in this store...
Definition: BaseStorage.hh:1079
virtual ConstUIter ConstIter(ConstTPtr _object) const
Definition: BaseStorage.hh:785
virtual TPtr GetByName(const std::string &_name) const
Get element with the given name.
Definition: BaseStorage.hh:586
virtual UPtr RemoveDerivedById(unsigned int _id)
Definition: BaseStorage.hh:758
virtual ~BaseStoreWrapper()
Definition: BaseStorage.hh:1286
virtual TPtr GetById(unsigned int _id) const
Get element with the given ID.
Definition: BaseStorage.hh:1008
virtual void RemoveAll()
Remove all elements from store.
Definition: BaseStorage.hh:1126
virtual bool ContainsId(unsigned int _id) const
Determine if store contains the element with the given ID.
Definition: BaseStorage.hh:983
virtual TPtr RemoveByName(const std::string &_name)
Remove element with the given name. If the specified element does not exists in this store...
Definition: BaseStorage.hh:1371
virtual void DestroyByIndex(unsigned int _index)
Remove and destroy element at the given index. If the specified element does not exists in this store...
Definition: BaseStorage.hh:688