Go to the documentation of this file.
17 #ifndef GZ_RENDERING_BASE_BASESTORAGE_HH_
18 #define GZ_RENDERING_BASE_BASESTORAGE_HH_
25 #include <gz/common/Console.hh>
26 #include <gz/common/SuppressWarning.hh>
34 inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
37 template <
class T,
class U>
49 typedef typename UMap::iterator UIter;
51 typedef typename UMap::const_iterator ConstUIter;
57 public:
virtual unsigned int Size()
const;
59 public:
virtual bool ContainsKey(
const std::string &_key)
const;
61 public:
virtual bool ContainsValue(
ConstTPtr _value)
const;
66 public:
virtual TPtr GetByIndex(
unsigned int _index)
const;
71 public:
virtual void Remove(
const std::string &_key);
73 public:
virtual void Remove(
TPtr _value);
75 public:
virtual void RemoveAll();
79 public:
virtual UPtr DerivedByIndex(
unsigned int _index)
const;
81 protected:
virtual bool IsValidIter(ConstUIter _iter)
const;
87 template <
class T,
class U>
99 typedef typename UStore::iterator UIter;
101 typedef typename UStore::const_iterator ConstUIter;
107 public:
virtual unsigned int Size()
const;
109 public:
virtual bool Contains(
ConstTPtr _object)
const;
111 public:
virtual bool ContainsId(
unsigned int _id)
const;
113 public:
virtual bool ContainsName(
const std::string &_name)
const;
115 public:
virtual TPtr GetById(
unsigned int _id)
const;
119 public:
virtual TPtr GetByIndex(
unsigned int _index)
const;
121 public:
virtual bool Add(
TPtr _object);
123 public:
virtual TPtr Remove(
TPtr _object);
125 public:
virtual TPtr RemoveById(
unsigned int _id);
129 public:
virtual TPtr RemoveByIndex(
unsigned int _index);
131 public:
virtual void RemoveAll();
133 public:
virtual void Destroy(
TPtr _object);
135 public:
virtual void DestroyById(
unsigned int _id);
137 public:
virtual void DestroyByName(
const std::string &_name);
139 public:
virtual void DestroyByIndex(
unsigned int _index);
141 public:
virtual void DestroyAll();
143 public:
virtual UPtr DerivedById(
unsigned int _id)
const;
147 public:
virtual UPtr DerivedByIndex(
unsigned int _index)
const;
149 public:
virtual bool AddDerived(
UPtr _object);
151 public:
virtual UPtr RemoveDerived(
UPtr _object);
153 public:
virtual UPtr RemoveDerivedById(
unsigned int _id);
157 public:
virtual UPtr RemoveDerivedByIndex(
unsigned int _index);
161 public:
virtual UIter Begin();
165 public:
virtual UIter End();
167 protected:
virtual ConstUIter ConstIter(
ConstTPtr _object)
const;
169 protected:
virtual ConstUIter ConstIterById(
unsigned int _id)
const;
171 protected:
virtual ConstUIter ConstIterByName(
174 protected:
virtual ConstUIter ConstIterByIndex(
unsigned int _index)
const;
176 protected:
virtual UIter Iter(
ConstTPtr _object);
178 protected:
virtual UIter IterById(
unsigned int _id);
180 protected:
virtual UIter IterByName(
const std::string &_name);
182 protected:
virtual UIter IterByIndex(
unsigned int _index);
184 protected:
virtual bool AddImpl(
UPtr _object);
186 protected:
virtual UPtr RemoveImpl(UIter _iter);
188 protected:
virtual void DestroyImpl(UIter _iter);
190 protected:
virtual bool IsValidIter(ConstUIter _iter)
const;
192 protected:
virtual UIter RemoveConstness(ConstUIter _iter);
214 typedef typename TStoreList::iterator TStoreIter;
220 public:
virtual unsigned int Size()
const;
222 public:
virtual bool Contains(
ConstTPtr _object)
const;
224 public:
virtual bool ContainsId(
unsigned int _id)
const;
226 public:
virtual bool ContainsName(
const std::string &_name)
const;
228 public:
virtual TPtr GetById(
unsigned int _id)
const;
232 public:
virtual TPtr GetByIndex(
unsigned int _index)
const;
234 public:
virtual bool Add(
TPtr _object);
236 public:
virtual TPtr Remove(
TPtr _object);
238 public:
virtual TPtr RemoveById(
unsigned int _id);
242 public:
virtual TPtr RemoveByIndex(
unsigned int _index);
244 public:
virtual void RemoveAll();
246 public:
virtual void Destroy(
TPtr _object);
248 public:
virtual void DestroyById(
unsigned int _id);
250 public:
virtual void DestroyByName(
const std::string &_name);
252 public:
virtual void DestroyByIndex(
unsigned int _index);
254 public:
virtual void DestroyAll();
256 public:
virtual unsigned int GetStoreCount()
const;
260 public:
virtual TStorePtr GetStore(
unsigned int _index)
const;
262 public:
virtual bool AddStore(
TStorePtr _store);
266 public:
virtual TStorePtr RemoveStore(
unsigned int _index);
268 public:
virtual TStorePtr RemoveStoreImpl(TStoreIter _iter);
276 template <
class T,
class U>
296 public:
virtual unsigned int Size()
const;
298 public:
virtual bool Contains(
ConstTPtr _object)
const;
300 public:
virtual bool ContainsId(
unsigned int _id)
const;
302 public:
virtual bool ContainsName(
const std::string &_name)
const;
304 public:
virtual TPtr GetById(
unsigned int _id)
const;
308 public:
virtual TPtr GetByIndex(
unsigned int _index)
const;
310 public:
virtual bool Add(
TPtr _object);
312 public:
virtual TPtr Remove(
TPtr _object);
314 public:
virtual TPtr RemoveById(
unsigned int _id);
318 public:
virtual TPtr RemoveByIndex(
unsigned int _index);
320 public:
virtual void RemoveAll();
322 public:
virtual void Destroy(
TPtr _object);
324 public:
virtual void DestroyById(
unsigned int _id);
326 public:
virtual void DestroyByName(
const std::string &_name);
328 public:
virtual void DestroyByIndex(
unsigned int _index);
330 public:
virtual void DestroyAll();
348 class BaseNodeStore :
349 public BaseStore<Node, T>
354 class BaseLightStore :
355 public BaseStore<Light, T>
360 class BaseSensorStore :
361 public BaseStore<Sensor, T>
366 class BaseVisualStore :
367 public BaseStore<Visual, T>
372 class BaseGeometryStore :
373 public BaseStore<Geometry, T>
378 class BaseSubMeshStore :
379 public BaseStore<SubMesh, T>
384 class BaseMaterialMap :
385 public BaseMap<Material, T>
390 template <
class T,
class U>
396 template <
class T,
class U>
402 template <
class T,
class U>
405 return this->map.size();
409 template <
class T,
class U>
412 return this->map.count(_key) > 0;
416 template <
class T,
class U>
419 for (
auto pair : this->map)
421 if (pair.second == _value)
return true;
428 template <
class T,
class U>
432 return this->Derived(_key);
436 template <
class T,
class U>
440 return this->DerivedByIndex(_index);
444 template <
class T,
class U>
459 if (this->ContainsKey(_key))
465 UPtr derived = std::dynamic_pointer_cast<U>(_value);
469 ignerr <<
"Cannot add item created by another render-engine"
475 this->map[_key] = derived;
480 template <
class T,
class U>
483 auto iter = this->map.find(_key);
485 if (this->IsValidIter(iter))
487 this->map.erase(iter);
492 template <
class T,
class U>
495 auto iter = this->map.begin();
497 while (this->IsValidIter(iter))
499 if (iter->second == _value)
501 this->map.erase(iter);
510 template <
class T,
class U>
517 template <
class T,
class U>
521 auto iter = this->map.find(_key);
522 return (this->IsValidIter(iter)) ? iter->second :
nullptr;
526 template <
class T,
class U>
530 if (_index >= this->Size())
536 auto iter = this->map.begin();
542 template <
class T,
class U>
545 return _iter != this->map.end();
549 template <
class T,
class U>
555 template <
class T,
class U>
561 template <
class T,
class U>
564 return this->store.size();
568 template <
class T,
class U>
569 typename BaseStore<T, U>::UIter
572 return this->store.begin();
576 template <
class T,
class U>
577 typename BaseStore<T, U>::UIter
580 return this->store.end();
584 template <
class T,
class U>
587 auto iter = this->ConstIter(_object);
588 return this->IsValidIter(iter);
592 template <
class T,
class U>
595 auto iter = this->ConstIterById(_id);
596 return this->IsValidIter(iter);
600 template <
class T,
class U>
603 auto iter = this->ConstIterByName(_name);
604 return this->IsValidIter(iter);
608 template <
class T,
class U>
612 return this->DerivedById(_id);
616 template <
class T,
class U>
620 return this->DerivedByName(_name);
624 template <
class T,
class U>
628 return this->DerivedByIndex(_index);
632 template <
class T,
class U>
641 UPtr derived = std::dynamic_pointer_cast<U>(_object);
645 ignerr <<
"Cannot add item created by another render-engine"
651 return this->AddImpl(derived);
655 template <
class T,
class U>
659 auto iter = this->Iter(_object);
660 return this->RemoveImpl(iter);
664 template <
class T,
class U>
668 return this->RemoveDerivedById(_id);
672 template <
class T,
class U>
676 return this->RemoveDerivedByName(_name);
680 template <
class T,
class U>
684 return this->RemoveDerivedByIndex(_index);
688 template <
class T,
class U>
695 template <
class T,
class U>
698 auto iter = this->Iter(_object);
699 this->DestroyImpl(iter);
703 template <
class T,
class U>
706 auto iter = this->IterById(_id);
707 this->DestroyImpl(iter);
711 template <
class T,
class U>
714 auto iter = this->IterByName(_name);
715 this->DestroyImpl(iter);
719 template <
class T,
class U>
722 auto iter = this->IterByIndex(_index);
723 this->DestroyImpl(iter);
727 template <
class T,
class U>
730 unsigned int i = this->Size();
734 this->DestroyByIndex(--i);
739 template <
class T,
class U>
743 auto iter = this->ConstIterById(_id);
744 return (this->IsValidIter(iter)) ? iter->second :
nullptr;
748 template <
class T,
class U>
752 auto iter = this->ConstIterByName(_name);
753 return (this->IsValidIter(iter)) ? iter->second :
nullptr;
757 template <
class T,
class U>
761 auto iter = this->ConstIterByIndex(_index);
762 return (this->IsValidIter(iter)) ? iter->second :
nullptr;
766 template <
class T,
class U>
775 return this->AddImpl(_object);
779 template <
class T,
class U>
783 auto iter = this->Iter(_object);
784 return this->RemoveImpl(iter);
788 template <
class T,
class U>
792 auto iter = this->IterById(_id);
793 return this->RemoveImpl(iter);
797 template <
class T,
class U>
801 auto iter = this->IterByName(_name);
802 return this->RemoveImpl(iter);
806 template <
class T,
class U>
810 auto iter = this->IterByIndex(_index);
811 return this->RemoveImpl(iter);
815 template <
class T,
class U>
816 typename BaseStore<T, U>::ConstUIter
819 auto begin = this->store.begin();
820 auto end = this->store.end();
822 for (
auto iter = begin; iter != end; ++iter)
824 if (iter->second == _object)
834 template <
class T,
class U>
835 typename BaseStore<T, U>::ConstUIter
838 auto begin = this->store.begin();
839 auto end = this->store.end();
841 for (
auto iter = begin; iter != end; ++iter)
843 if (iter->second->Id() == _id)
853 template <
class T,
class U>
854 typename BaseStore<T, U>::ConstUIter
857 return this->store.find(_name);
861 template <
class T,
class U>
862 typename BaseStore<T, U>::ConstUIter
865 if (_index >= this->Size())
868 return this->store.end();
871 auto iter = this->store.begin();
877 template <
class T,
class U>
878 typename BaseStore<T, U>::UIter
881 auto iter = this->ConstIter(_object);
882 return this->RemoveConstness(iter);
886 template <
class T,
class U>
887 typename BaseStore<T, U>::UIter
890 auto iter = this->ConstIterById(_id);
891 return this->RemoveConstness(iter);
895 template <
class T,
class U>
896 typename BaseStore<T, U>::UIter
899 auto iter = this->ConstIterByName(_name);
900 return this->RemoveConstness(iter);
904 template <
class T,
class U>
905 typename BaseStore<T, U>::UIter
908 auto iter = this->ConstIterByIndex(_index);
909 return this->RemoveConstness(iter);
913 template <
class T,
class U>
916 unsigned int id = _object->Id();
919 if (this->ContainsId(
id))
925 if (this->ContainsName(name))
927 ignerr <<
"Another item already exists with name: " << name
932 this->store[name] = _object;
937 template <
class T,
class U>
941 if (!this->IsValidIter(_iter))
946 UPtr result = _iter->second;
947 this->store.erase(_iter);
952 template <
class T,
class U>
955 UPtr result = this->RemoveImpl(_iter);
956 if (result) result->Destroy();
960 template <
class T,
class U>
963 return _iter != this->store.end();
967 template <
class T,
class U>
968 typename BaseStore<T, U>::UIter
971 return (this->IsValidIter(_iter)) ?
972 this->store.erase(_iter, _iter) : this->store.end();
991 unsigned int size = 0;
993 for (
auto store : this->stores)
995 size += store->Size();
1005 for (
auto store : this->stores)
1007 if (store->Contains(_object))
return true;
1017 for (
auto store : this->stores)
1019 if (store->ContainsId(_id))
return true;
1029 for (
auto store : this->stores)
1031 if (store->ContainsName(_name))
return true;
1042 for (
auto store : this->stores)
1044 TPtr object = store->GetById(_id);
1045 if (
object)
return object;
1056 for (
auto store : this->stores)
1058 TPtr object = store->GetByName(_name);
1059 if (
object)
return object;
1070 unsigned int origIndex = _index;
1072 for (
auto store : this->stores)
1074 unsigned int size = store->Size();
1076 return store->GetByIndex(_index);
1097 TPtr result =
nullptr;
1099 for (
auto store : this->stores)
1101 TPtr temp = store->Remove(_object);
1102 if (!result) result = temp;
1113 TPtr result =
nullptr;
1115 for (
auto store : this->stores)
1117 TPtr temp = store->RemoveById(_id);
1118 if (!result) result = temp;
1129 TPtr result =
nullptr;
1131 for (
auto store : this->stores)
1133 TPtr temp = store->RemoveByName(_name);
1134 if (!result) result = temp;
1145 TPtr result =
nullptr;
1147 for (
auto store : this->stores)
1149 TPtr temp = store->RemoveByIndex(_index);
1150 if (!result) result = temp;
1160 for (
auto store : this->stores)
1170 for (
auto store : this->stores)
1172 if (store->Contains(_object))
1174 store->Destroy(_object);
1184 for (
auto store : this->stores)
1186 store->DestroyById(_id);
1194 for (
auto store : this->stores)
1196 store->DestroyByName(_name);
1204 for (
auto store : this->stores)
1206 store->DestroyByIndex(_index);
1214 for (
auto store : this->stores)
1216 store->DestroyAll();
1224 return this->stores.size();
1231 auto begin = this->stores.begin();
1232 auto end = this->stores.end();
1233 auto iter =
std::find(begin, end, _store);
1242 if (_index >= this->GetStoreCount())
1248 return this->stores[_index];
1261 if (this->ContainsStore(_store))
1267 this->stores.push_back(_store);
1276 auto begin = this->stores.begin();
1277 auto end = this->stores.end();
1278 auto iter =
std::find(begin, end, _store);
1279 return this->RemoveStoreImpl(iter);
1287 if (_index >= this->GetStoreCount())
1293 auto iter = this->stores.begin();
1295 return this->RemoveStoreImpl(iter);
1303 if (_iter == this->stores.end())
1309 this->stores.erase(_iter);
1314 template <
class T,
class U>
1321 template <
class T,
class U>
1327 template <
class T,
class U>
1330 return this->store->Size();
1334 template <
class T,
class U>
1337 ConstUPtr derived = std::dynamic_pointer_cast<const U>(_object);
1338 return this->store->Contains(derived);
1342 template <
class T,
class U>
1345 return this->store->ContainsId(_id);
1349 template <
class T,
class U>
1352 return this->store->ContainsName(_name);
1356 template <
class T,
class U>
1360 return this->store->GetById(_id);
1364 template <
class T,
class U>
1368 return this->store->GetByName(_name);
1372 template <
class T,
class U>
1376 return this->store->GetByIndex(_index);
1380 template <
class T,
class U>
1383 UPtr derived = std::dynamic_pointer_cast<U>(_object);
1384 return this->store->Add(derived);
1388 template <
class T,
class U>
1392 UPtr derived = std::dynamic_pointer_cast<U>(_object);
1393 return this->store->Remove(derived);
1397 template <
class T,
class U>
1401 return this->store->RemoveById(_id);
1405 template <
class T,
class U>
1409 return this->store->RemoveByName(_name);
1413 template <
class T,
class U>
1417 return this->store->RemoveByIndex(_index);
1421 template <
class T,
class U>
1424 this->store->RemoveAll();
1428 template <
class T,
class U>
1431 UPtr derived = std::dynamic_pointer_cast<U>(_object);
1432 this->store->Destroy(derived);
1436 template <
class T,
class U>
1439 this->store->DestroyById(_id);
1443 template <
class T,
class U>
1446 this->store->DestroyByName(_name);
1450 template <
class T,
class U>
1453 this->store->DestroyByIndex(_index);
1457 template <
class T,
class U>
1460 this->store->DestroyAll();
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: gz/rendering/base/BaseStorage.hh:445
virtual unsigned int Size() const
Get number of elements in this store.
Definition: gz/rendering/base/BaseStorage.hh:562
virtual ConstUIter ConstIterByIndex(unsigned int _index) const
Definition: gz/rendering/base/BaseStorage.hh:863
TStoreList stores
Definition: gz/rendering/base/BaseStorage.hh:271
virtual bool AddImpl(UPtr _object)
Definition: gz/rendering/base/BaseStorage.hh:914
UStorePtr store
Definition: gz/rendering/base/BaseStorage.hh:332
Storage map from std::string to template class T.
Definition: gz/rendering/Storage.hh:49
Definition: gz/rendering/base/BaseStorage.hh:277
virtual bool ContainsKey(const std::string &_key) const
Determine if an elements is mapped to the given key.
Definition: gz/rendering/base/BaseStorage.hh:410
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: gz/rendering/base/BaseStorage.hh:1182
virtual TPtr GetByName(const std::string &_name) const
Get element with the given name.
Definition: gz/rendering/base/BaseStorage.hh:618
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: gz/rendering/base/BaseStorage.hh:633
BaseCompositeStore()
Definition: gz/rendering/base/BaseStorage.hh:977
virtual TStorePtr RemoveStoreImpl(TStoreIter _iter)
Definition: gz/rendering/base/BaseStorage.hh:1301
virtual UIter IterById(unsigned int _id)
Definition: gz/rendering/base/BaseStorage.hh:888
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: gz/rendering/base/BaseStorage.hh:1390
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
virtual unsigned int Size() const
Get number of elements in this store.
Definition: gz/rendering/base/BaseStorage.hh:989
virtual TPtr RemoveById(unsigned int _id)
Remove element with the given ID. If the specified element does not exists in this store,...
Definition: gz/rendering/base/BaseStorage.hh:1399
virtual unsigned int GetStoreCount() const
Get number of Stores.
Definition: gz/rendering/base/BaseStorage.hh:1222
virtual TPtr Get(const std::string &_key) const
Get the element mapped to the given key.
Definition: gz/rendering/base/BaseStorage.hh:430
virtual bool AddStore(TStorePtr _store)
Add the given store. If the given store already exists, then no work will be done.
Definition: gz/rendering/base/BaseStorage.hh:1253
virtual UPtr DerivedByIndex(unsigned int _index) const
Definition: gz/rendering/base/BaseStorage.hh:528
Definition: gz/rendering/base/BaseStorage.hh:199
virtual TPtr GetByIndex(unsigned int _index) const
Get element at the given index.
Definition: gz/rendering/base/BaseStorage.hh:626
virtual ConstUIter ConstIterById(unsigned int _id) const
Definition: gz/rendering/base/BaseStorage.hh:836
virtual TPtr GetByName(const std::string &_name) const
Get element with the given name.
Definition: gz/rendering/base/BaseStorage.hh:1054
virtual TPtr RemoveById(unsigned int _id)
Remove element with the given ID. If the specified element does not exists in this store,...
Definition: gz/rendering/base/BaseStorage.hh:1111
virtual ConstUIter ConstIterByName(const std::string &_name) const
Definition: gz/rendering/base/BaseStorage.hh:855
virtual UIter Begin()
Return an iterator to the beginning.
Definition: gz/rendering/base/BaseStorage.hh:570
virtual void RemoveAll()
Remove all elements from store.
Definition: gz/rendering/base/BaseStorage.hh:1422
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: gz/rendering/base/BaseStorage.hh:1202
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: gz/rendering/base/BaseStorage.hh:657
BaseStoreWrapper(UStorePtr _store)
Definition: gz/rendering/base/BaseStorage.hh:1315
virtual bool ContainsName(const std::string &_name) const
Determine if store contains the element with the given name.
Definition: gz/rendering/base/BaseStorage.hh:1350
BaseStore()
Definition: gz/rendering/base/BaseStorage.hh:550
virtual TPtr GetByIndex(unsigned int _index) const
Get element at the given index.
Definition: gz/rendering/base/BaseStorage.hh:1374
virtual UPtr RemoveDerivedById(unsigned int _id)
Definition: gz/rendering/base/BaseStorage.hh:790
virtual bool ContainsStore(ConstTStorePtr _store) const
Determine if given store exists.
Definition: gz/rendering/base/BaseStorage.hh:1229
virtual TPtr GetByName(const std::string &_name) const
Get element with the given name.
Definition: gz/rendering/base/BaseStorage.hh:1366
UMap map
Definition: gz/rendering/base/BaseStorage.hh:83
virtual UPtr RemoveDerivedByIndex(unsigned int _index)
Definition: gz/rendering/base/BaseStorage.hh:808
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: gz/rendering/base/BaseStorage.hh:1437
virtual bool IsValidIter(ConstUIter _iter) const
Definition: gz/rendering/base/BaseStorage.hh:961
virtual UIter End()
Return an iterator to the end.
Definition: gz/rendering/base/BaseStorage.hh:578
virtual bool ContainsName(const std::string &_name) const
Determine if store contains the element with the given name.
Definition: gz/rendering/base/BaseStorage.hh:1027
virtual UIter IterByIndex(unsigned int _index)
Definition: gz/rendering/base/BaseStorage.hh:906
virtual bool Contains(ConstTPtr _object) const
Determine if store contains the given element.
Definition: gz/rendering/base/BaseStorage.hh:585
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: gz/rendering/base/BaseStorage.hh:1451
virtual TStorePtr GetStore(unsigned int _index) const
Get store at the given index. If no such store exists NULL will be returned.
Definition: gz/rendering/base/BaseStorage.hh:1240
virtual bool Contains(ConstTPtr _object) const
Determine if store contains the given element.
Definition: gz/rendering/base/BaseStorage.hh:1335
Multi-access storage structure of template class T. Template class T is expected to have functions Ge...
Definition: gz/rendering/Storage.hh:114
virtual UPtr RemoveDerived(UPtr _object)
Definition: gz/rendering/base/BaseStorage.hh:781
virtual bool Contains(ConstTPtr _object) const
Determine if store contains the given element.
Definition: gz/rendering/base/BaseStorage.hh:1003
virtual void RemoveAll()
Remove all elements from store.
Definition: gz/rendering/base/BaseStorage.hh:689
virtual void Destroy(TPtr _object)
Remove and destroy given element. If the given element does not exists, in this store,...
Definition: gz/rendering/base/BaseStorage.hh:1429
virtual bool ContainsId(unsigned int _id) const
Determine if store contains the element with the given ID.
Definition: gz/rendering/base/BaseStorage.hh:1015
virtual void DestroyImpl(UIter _iter)
Definition: gz/rendering/base/BaseStorage.hh:953
virtual ~BaseCompositeStore()
Definition: gz/rendering/base/BaseStorage.hh:983
virtual TPtr RemoveByIndex(unsigned int _index)
Remove element at the given index. If the specified element does not exists in this store,...
Definition: gz/rendering/base/BaseStorage.hh:1143
virtual UPtr RemoveImpl(UIter _iter)
Definition: gz/rendering/base/BaseStorage.hh:939
virtual unsigned int Size() const
Get the number of elements in this map.
Definition: gz/rendering/base/BaseStorage.hh:403
virtual void DestroyAll()
Remove and destroy all elements in store.
Definition: gz/rendering/base/BaseStorage.hh:1212
virtual void DestroyAll()
Remove and destroy all elements in store.
Definition: gz/rendering/base/BaseStorage.hh:728
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: gz/rendering/base/BaseStorage.hh:704
virtual void DestroyAll()
Remove and destroy all elements in store.
Definition: gz/rendering/base/BaseStorage.hh:1458
virtual UIter Iter(ConstTPtr _object)
Definition: gz/rendering/base/BaseStorage.hh:879
virtual TPtr GetByIndex(unsigned int _index) const
Get element at the given index.
Definition: gz/rendering/base/BaseStorage.hh:1068
virtual ConstUIter ConstIter(ConstTPtr _object) const
Definition: gz/rendering/base/BaseStorage.hh:817
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: gz/rendering/base/BaseStorage.hh:1381
virtual TPtr RemoveByName(const std::string &_name)
Remove element with the given name. If the specified element does not exists in this store,...
Definition: gz/rendering/base/BaseStorage.hh:674
virtual bool IsValidIter(ConstUIter _iter) const
Definition: gz/rendering/base/BaseStorage.hh:543
virtual TPtr GetByIndex(unsigned int _index) const
Get the element at the given index.
Definition: gz/rendering/base/BaseStorage.hh:438
virtual TPtr GetById(unsigned int _id) const
Get element with the given ID.
Definition: gz/rendering/base/BaseStorage.hh:1358
virtual unsigned int Size() const
Get number of elements in this store.
Definition: gz/rendering/base/BaseStorage.hh:1328
virtual bool ContainsName(const std::string &_name) const
Determine if store contains the element with the given name.
Definition: gz/rendering/base/BaseStorage.hh:601
Simple wrapper class that allows a Store of type Derived to be treated as a Store of type Base,...
Definition: gz/rendering/Storage.hh:291
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: gz/rendering/base/BaseStorage.hh:1086
virtual void Destroy(TPtr _object)
Remove and destroy given element. If the given element does not exists, in this store,...
Definition: gz/rendering/base/BaseStorage.hh:1168
Definition: gz/rendering/base/BaseStorage.hh:88
virtual UIter IterByName(const std::string &_name)
Definition: gz/rendering/base/BaseStorage.hh:897
virtual void Remove(const std::string &_key)
Remove the element mapped to the given key. If the specified element does not exists,...
Definition: gz/rendering/base/BaseStorage.hh:481
virtual bool AddDerived(UPtr _object)
Definition: gz/rendering/base/BaseStorage.hh:767
virtual TPtr RemoveByIndex(unsigned int _index)
Remove element at the given index. If the specified element does not exists in this store,...
Definition: gz/rendering/base/BaseStorage.hh:682
virtual UPtr DerivedById(unsigned int _id) const
Definition: gz/rendering/base/BaseStorage.hh:741
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: gz/rendering/base/BaseStorage.hh:1192
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: gz/rendering/base/BaseStorage.hh:720
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: gz/rendering/base/BaseStorage.hh:712
virtual TStorePtr RemoveStore(TStorePtr _store)
Remove given store. If no such store exists no work will be done and NULL will be returned.
Definition: gz/rendering/base/BaseStorage.hh:1274
virtual bool ContainsId(unsigned int _id) const
Determine if store contains the element with the given ID.
Definition: gz/rendering/base/BaseStorage.hh:593
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: gz/rendering/base/BaseStorage.hh:1444
Definition: gz/rendering/base/BaseRenderTypes.hh:36
virtual void RemoveAll()
Remove all elements from this map.
Definition: gz/rendering/base/BaseStorage.hh:511
virtual ~BaseStore()
Definition: gz/rendering/base/BaseStorage.hh:556
UStore store
Definition: gz/rendering/base/BaseStorage.hh:194
Definition: gz/rendering/base/BaseStorage.hh:38
virtual TPtr RemoveById(unsigned int _id)
Remove element with the given ID. If the specified element does not exists in this store,...
Definition: gz/rendering/base/BaseStorage.hh:666
BaseMap()
Definition: gz/rendering/base/BaseStorage.hh:391
virtual TPtr RemoveByName(const std::string &_name)
Remove element with the given name. If the specified element does not exists in this store,...
Definition: gz/rendering/base/BaseStorage.hh:1407
virtual UPtr DerivedByIndex(unsigned int _index) const
Definition: gz/rendering/base/BaseStorage.hh:759
Represents a collection of Store objects, collectively working as a single composite store.
Definition: gz/rendering/Storage.hh:227
virtual TPtr GetById(unsigned int _id) const
Get element with the given ID.
Definition: gz/rendering/base/BaseStorage.hh:1040
virtual void RemoveAll()
Remove all elements from store.
Definition: gz/rendering/base/BaseStorage.hh:1158
virtual UIter RemoveConstness(ConstUIter _iter)
Definition: gz/rendering/base/BaseStorage.hh:969
virtual TPtr RemoveByIndex(unsigned int _index)
Remove element at the given index. If the specified element does not exists in this store,...
Definition: gz/rendering/base/BaseStorage.hh:1415
virtual TPtr GetById(unsigned int _id) const
Get element with the given ID.
Definition: gz/rendering/base/BaseStorage.hh:610
Definition: gz/rendering/base/BaseStorage.hh:336
virtual TPtr RemoveByName(const std::string &_name)
Remove element with the given name. If the specified element does not exists in this store,...
Definition: gz/rendering/base/BaseStorage.hh:1127
virtual ~BaseStoreWrapper()
Definition: gz/rendering/base/BaseStorage.hh:1322
virtual bool ContainsValue(ConstTPtr _value) const
Determine if the given element exists in this map.
Definition: gz/rendering/base/BaseStorage.hh:417
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: gz/rendering/base/BaseStorage.hh:1095
virtual UPtr RemoveDerivedByName(const std::string &_name)
Definition: gz/rendering/base/BaseStorage.hh:799
virtual UPtr DerivedByName(const std::string &_name) const
Definition: gz/rendering/base/BaseStorage.hh:750
virtual bool ContainsId(unsigned int _id) const
Determine if store contains the element with the given ID.
Definition: gz/rendering/base/BaseStorage.hh:1343
virtual UPtr Derived(const std::string &_key) const
Definition: gz/rendering/base/BaseStorage.hh:519
virtual ~BaseMap()
Definition: gz/rendering/base/BaseStorage.hh:397
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
virtual void Destroy(TPtr _object)
Remove and destroy given element. If the given element does not exists, in this store,...
Definition: gz/rendering/base/BaseStorage.hh:696