3 #include "scripting/luabind.h"
6 #include <OgreColourValue.h>
9 #include <OgreQuaternion.h>
10 #include <OgreVector3.h>
17 "char must be 8 bit long for properly portable serialization."
111 const std::string& key
129 const std::string& key
150 const std::string& key,
151 const T& defaultValue = T()
158 std::list<std::string>
171 const std::string& key,
172 luabind::object defaultValue
190 const std::string& key,
196 std::ostream& stream,
202 std::istream& stream,
208 struct Implementation;
209 std::unique_ptr<Implementation> m_impl;
222 std::ostream& stream,
236 std::istream& stream,
257 static luabind::scope
340 #define STORABLE_TYPE(typeName) \
343 StorageContainer::contains<typeName>( \
344 const std::string& key \
349 StorageContainer::get<typeName>( \
350 const std::string& key, \
351 const typeName& defaultValue \
356 StorageContainer::set<typeName>( \
357 const std::string& key, \
364 STORABLE_TYPE(int8_t)
365 STORABLE_TYPE(int16_t)
366 STORABLE_TYPE(int32_t)
367 STORABLE_TYPE(int64_t)
368 STORABLE_TYPE(uint8_t)
369 STORABLE_TYPE(uint16_t)
370 STORABLE_TYPE(uint32_t)
371 STORABLE_TYPE(uint64_t)
373 STORABLE_TYPE(
double)
374 STORABLE_TYPE(
std::
string)
379 STORABLE_TYPE(
Ogre::Degree)
380 STORABLE_TYPE(
Ogre::Plane)
381 STORABLE_TYPE(
Ogre::Vector3)
382 STORABLE_TYPE(
Ogre::Quaternion)
383 STORABLE_TYPE(
Ogre::ColourValue)
StorageList & operator=(const StorageList &other)
Copy assignment.
bool contains(const std::string &key) const
Checks for a key.
luabind::object luaGet(const std::string &key, luabind::object defaultValue) const
Lua version of StorageContainer::get.
Definition: collision_system.h:158
static luabind::scope luaBindings()
Lua bindings.
void set(const std::string &key, T value)
Sets a value in this container.
std::list< std::string > keys() const
Returns a list of all keys in this container.
StorageContainer()
Constructor.
friend std::istream & operator>>(std::istream &stream, StorageContainer &storage)
Input stream operator for StorageContainer.
Definition: bullet_ogre_conversion.h:6
static luabind::scope luaBindings()
Lua bindings.
friend std::ostream & operator<<(std::ostream &stream, const StorageContainer &storage)
Output stream operator for StorageContainer.
A list of StorageContainers.
Definition: serialization.h:244
Definition: debug_drawing.h:8
~StorageContainer()
Destructor.
StorageContainer & operator=(const StorageContainer &other)
Copy-assignment.
void append(StorageContainer element)
Appends a StorageContainer to this list.
StorageList()
Constructor.
A key-value storage for serialization.
Definition: serialization.h:36