11 #include <luabind/luabind.hpp>
20 namespace DtPropertySetter
38 const luabind::object& keyValues,
const luabind::object& inProp,
45 int index,
const luabind::object& inProp,
52 const luabind::object& keyValue,
const luabind::object& inProp,
65 luabind::object& outItem,
int& index);
72 luabind::object& outItem);
79 luabind::object& outItem);
210 const luabind::object& keyValues,
int& index);
212 const luabind::object& keyValues,
int& index);
219 const luabind::object& keyValues,
int& index);
225 const luabind::object& keyValues,
int& index);
230 const luabind::object& keyValue);
236 const luabind::object& keyValue);
238 const luabind::object& keyValue);
bool setLuaFromIntProp(lua_State *L, const DtString &propertyName, const DtPropertyInterface *inProp, luabind::object &outProp)
bool setBoolPropFromLua(const DtString &propertyName, luabind::object const &inProp, DtPropertyInterface *outProp)
bool setLuaFromEntityTypeProp(lua_State *L, const DtString &propertyName, const DtPropertyInterface *inProp, luabind::object &outProp)
bool setLuaFromBoolProp(lua_State *L, const DtString &propertyName, const DtPropertyInterface *inProp, luabind::object &outProp)
bool(* luaToPropFnc)(const DtString &propertyName, luabind::object const &inProp, DtPropertyInterface *outProp)
Function signature for Lua-to-property conversion functions.
Definition: propertySetter.h:91
DtPropertyInterface * findMapItem(DtRwPropertiesMap *propMap, const luabind::object &keyValue)
DtString convertMapKey(const DtRwPropertiesMap *propMap, const luabind::object &keyValue)
Converts the Lua object to a string to be used as a key to the specified DtRwPropertiesMap.
bool setOrAddPropertyFromLua(const DtString &propertyName, const luabind::object &inProp, DtRwProperties *outProps)
Sets the named property from a Lua property, adding it if it's not found.
bool setLuaListItemFromProperty(lua_State *L, const DtString &propertyName, const luabind::object &keyValues, const DtRwProperties *inProps, luabind::object &outItem, int &index)
Finds the item in the named list property that matches the specified keyValues and sets outItem with ...
bool setLuaFromVerticesProp(lua_State *L, const DtString &propertyName, const DtPropertyInterface *inProp, luabind::object &outProp)
DtPropertyInterface * createCustomPropFromLua(const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
bool setUUIDPropFromLua(const DtString &propertyName, luabind::object const &inProp, DtPropertyInterface *outProp)
bool setOffsetVerticesPropFromLua(const DtString &propertyName, luabind::object const &inProp, DtPropertyInterface *outProp)
bool setPropertyFromLua(const DtString &propertyName, const luabind::object &inProp, DtRwProperties *outProps)
Sets the named property property from a Lua property.
bool setStructPropFromLua(const DtString &propertyName, luabind::object const &inProp, DtPropertyInterface *outProp)
DtPropertyInterface * createDoublePropFromLua(const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
bool setIntPropFromLua(const DtString &propertyName, luabind::object const &inProp, DtPropertyInterface *outProp)
bool setLuaFromOffsetVerticesProp(lua_State *L, const DtString &propertyName, const DtPropertyInterface *inProp, luabind::object &outProp)
DtPropertyInterface * createMapPropFromLua(const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
const DtPropertyInterface * findConstListItemByValue(const DtRwPropertiesList *propList, const luabind::object &keyValues, int &index)
Called by findConstListItem in the case where keyValues is just a single value that matches a simple ...
bool setPropertyMapItemFromLua(const DtString &propertyName, const luabind::object &keyValue, const luabind::object &inProp, DtRwProperties *outProps)
Finds the item in the named map property that matches the specified keyValues and updates it with the...
DtPropertyInterface * createStringPropFromLua(const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
Lua-to-Property creation functions.
Interface class used to define minimal interface for a property.
Definition: propertyInterface.h:48
bool setLuaFromProperty(lua_State *L, const DtString &propertyName, const DtRwProperties *inProps, luabind::object &outProp)
Sets the named Lua property from a property.
DtPropertyInterface * createListPropFromLua(const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
bool setLuaFromStructProp(lua_State *L, const DtString &propertyName, const DtPropertyInterface *inProp, luabind::object &outProp)
bool setLuaFromListProp(lua_State *L, const DtString &propertyName, const DtPropertyInterface *inProp, luabind::object &outProp)
DtPropertyInterface * findListItem(DtRwPropertiesList *propList, const luabind::object &keyValues, int &index)
DtPropFromLuaFcnMap & propertyFromLuaFcnMap()
The Lua-to-Property by type.
DtPropFromLuaCreatorFcnMap & propertyFromLuaCreatorFcnMap()
The Lua-to-Property creator by type.
bool setObjectTypePropFromLua(const DtString &propertyName, luabind::object const &inProp, DtPropertyInterface *outProp)
const DtPropertyInterface * findConstListItemByKeys(const DtRwPropertiesList *propList, const luabind::object &keyValues, int &index)
Called by findConstListItem in the case where keyValues is a table of keys that match fields in the s...
Acts as a map for properties.
Definition: rwPropertiesMap.h:41
DtPropertyInterface * createBoolPropFromLua(const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
DtPropertyInterface * createTablePropFromLua(const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
bool setEntityTypePropFromLua(const DtString &propertyName, luabind::object const &inProp, DtPropertyInterface *outProp)
std::map< DtString, luaToPropFnc > DtPropFromLuaFcnMap
Definition: propertySetter.h:241
bool setLuaFromVectorProp(lua_State *L, const DtString &propertyName, const DtPropertyInterface *inProp, luabind::object &outProp)
const DtPropertyInterface * findConstMapItem(const DtRwPropertiesMap *propMap, const luabind::object &keyValue)
Find the item in the map that matches the given key defined in the keyValue Lua object.
bool setStringPropFromLua(const DtString &propertyName, luabind::object const &inProp, DtPropertyInterface *outProp)
Lua-to-Property conversion functions.
bool setDoublePropFromLua(const DtString &propertyName, luabind::object const &inProp, DtPropertyInterface *outProp)
const DtPropertyInterface * findConstListItem(const DtRwPropertiesList *propList, const luabind::object &keyValues, int &index)
Find the item in the list that matches the given keys defined in the keyValues Lua object...
bool setVerticesPropFromLua(const DtString &propertyName, luabind::object const &inProp, DtPropertyInterface *outProp)
bool setListPropFromLua(const DtString &propertyName, luabind::object const &inProp, DtPropertyInterface *outProp)
bool setLuaFromStringProp(lua_State *L, const DtString &propertyName, const DtPropertyInterface *inProp, luabind::object &outProp)
Property-to-Lua conversion functions.
bool setPropertyListItemFromLua(const DtString &propertyName, const luabind::object &keyValues, const luabind::object &inProp, DtRwProperties *outProps)
Finds the item in the named list property that matches the specified keyValues and updates it with th...
bool setLuaFromObjectTypeProp(lua_State *L, const DtString &propertyName, const DtPropertyInterface *inProp, luabind::object &outProp)
Acts as a DtRwList for properties.
Definition: rwPropertiesList.h:38
A list of properties.
Definition: rwProperties.h:126
DtLuaFromPropFcnMap & luaFromPropertyFcnMap()
The Property-to-Lua by type.
bool setLuaMapItemFromProperty(lua_State *L, const DtString &propertyName, const luabind::object &keyValue, const DtRwProperties *inProps, luabind::object &outItem)
Finds the item in the named map property that matches the specified keyValue and sets outItem with it...
bool(* propToLuaFnc)(lua_State *L, const DtString &propertyName, const DtPropertyInterface *inProp, luabind::object &outProp)
Function signature for Property-to-Lua conversion functions.
Definition: propertySetter.h:135
DtPropertyInterface * createStructPropFromLua(const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
std::map< int, luaToPropCreatorFnc > DtPropFromLuaCreatorFcnMap
Definition: propertySetter.h:249
bool setLuaFromDoubleProp(lua_State *L, const DtString &propertyName, const DtPropertyInterface *inProp, luabind::object &outProp)
bool setVectorPropFromLua(const DtString &propertyName, luabind::object const &inProp, DtPropertyInterface *outProp)
std::map< DtString, propToLuaFnc > DtLuaFromPropFcnMap
Definition: propertySetter.h:245