4 #include <unordered_map>
16 using std::make_unique;
17 using std::unordered_map;
19 using std::unique_ptr;
101 return prototypeByIdIt->second;
113 if (prototype->getName() == name)
return prototype.get();
124 if (prototype->getType() == Prototype_Type::TERRAIN)
return prototype.get();
Scene prototype library definition.
vector< unique_ptr< Prototype > > prototypes
void removePrototype(int id)
Remove a prototype.
Prototype * getPrototypeByName(const string &name)
Get a prototype by given name.
Prototype * getTerrainPrototype()
Get a terrain prototype.
Prototype * getPrototype(int id)
Get a prototype by given id.
UniquePtrSequenceIterator< Prototype > getPrototypes()
Prototype * getPrototypeAt(int idx)
Get prototype at given index.
~SceneLibrary()
Destructor.
int allocatePrototypeId()
Allocata a unique prototype index.
SceneLibrary(Scene *scene)
Public constructor.
unordered_map< int, Prototype * > prototypesById
void clear()
Clears this scene prototype library.
void addPrototype(Prototype *prototype)
Add a prototype.
static constexpr int ID_ALLOCATE
Vector3 class representing vector3 mathematical structure and operations with x, y,...
unique_ptr sequence iterator
#define FORBID_CLASS_COPY(CLASS)