VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Typedefs | Functions
DtPropertySetter Namespace Reference

Namespace for methods which set a property from a Lua object to DtRwVariableBindings and vice-versa. More...

Typedefs

typedef bool(* luaToRwFnc )(const DtString &propertyName, luabind::object const &inProp, DtReaderWriter *outProp)
 Function signature for Lua-to-ReaderWriter property conversion functions.
typedef bool(* rwToLuaFnc )(lua_State *L, const DtString &propertyName, const DtReaderWriter *inProp, luabind::object &outProp)
 Function signature for ReaderWriter-to-Lua property conversion functions.
typedef DtReaderWriter *(* luaToRwCreatorFnc )(const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
 Function signature for Lua-to-ReaderWriter property creation functions.
typedef std::map< DtString,
luaToRwFnc
DtPropFromLuaFcnMap
typedef std::map< DtString,
rwToLuaFnc
DtPropFromRwFcnMap
typedef std::map< int,
luaToRwCreatorFnc
DtPropFromLuaCreatorFcnMap

Functions

bool setPropertyFromLua (const DtString &propertyName, const luabind::object &inProp, DtRwProperties *outProps)
 Sets the named ReaderWriter property from a Lua property.
bool setOrAddPropertyFromLua (const DtString &propertyName, const luabind::object &inProp, DtRwProperties *outProps)
 Sets the named ReaderWriter property from a Lua property, adding it if it's not found.
bool setPropertyListItemFromLua (const DtString &propertyName, const luabind::object &keyValues, const luabind::object &inProp, DtRwProperties *outProps)
 Finds the item in the named list ReaderWriter property that matches the specified keyValues and updates it with the contents of inProp.
bool setPropertyListItemFromLua (const DtString &propertyName, int index, const luabind::object &inProp, DtRwProperties *outProps)
 Finds the item in the named list ReaderWriter property at the given index (where the Lua input starts at index 1) and updates it with the contents of inProp.
bool setPropertyMapItemFromLua (const DtString &propertyName, const luabind::object &keyValue, const luabind::object &inProp, DtRwProperties *outProps)
 Finds the item in the named map ReaderWriter property that matches the specified keyValues and updates it with the contents of inProp.
bool setPropertyFromRw (lua_State *L, const DtString &propertyName, const DtRwProperties *inProps, luabind::object &outProp)
 Sets the named Lua property from a ReaderWriter property.
bool setPropertyListItemFromRw (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 ReaderWriter property that matches the specified keyValues and sets outItem with its contents.
bool setPropertyListItemFromRw (lua_State *L, const DtString &propertyName, int index, const DtRwProperties *inProps, luabind::object &outItem)
 Finds the item in the named list ReaderWriter property at the given index and sets outItem with its contents.
bool setPropertyMapItemFromRw (lua_State *L, const DtString &propertyName, const luabind::object &keyValue, const DtRwProperties *inProps, luabind::object &outItem)
 Finds the item in the named map ReaderWriter property that matches the specified keyValue and sets outItem with its contents.
bool setPropertyFromLua (const luabind::object &inProp, DtReaderWriter *outProps)
 Sets the given ReaderWriter property from a Lua property.
bool setPropertyFromRw (lua_State *L, const DtReaderWriter *inProps, luabind::object &outProp)
 Sets the given Lua property from a ReaderWriter property.
bool setRwFromLua (const luabind::object &inProp, DtReaderWriter *outRw)
 Tries to set all the contents of the reader/writer item from lua.
const DtReaderWriterfindConstListItemByKeys (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 structure that defines the format of each item in the list property.
const DtReaderWriterfindConstListItemByValue (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 data type that matches the type of each item in the list property.
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.
DtPropFromLuaFcnMappropertyFromLuaFcnMap ()
 The Lua-to-ReaderWriter by type.
DtPropFromRwFcnMappropertyFromRwFcnMap ()
 The ReaderWriter-to-Lua by type.
DtPropFromLuaCreatorFcnMappropertyFromLuaCreatorFcnMap ()
 The Lua-to-ReaderWriter creator by type.
bool setStringPropFromLua (const DtString &propertyName, luabind::object const &inProp, DtReaderWriter *outProp)
 Lua-to-ReaderWriter conversion functions.
bool setUUIDPropFromLua (const DtString &propertyName, luabind::object const &inProp, DtReaderWriter *outProp)
bool setEntityTypeFromLua (const DtString &propertyName, luabind::object const &inProp, DtReaderWriter *outProp)
bool setObjectTypeFromLua (const DtString &propertyName, luabind::object const &inProp, DtReaderWriter *outProp)
bool setIntPropFromLua (const DtString &propertyName, luabind::object const &inProp, DtReaderWriter *outProp)
bool setDoublePropFromLua (const DtString &propertyName, luabind::object const &inProp, DtReaderWriter *outProp)
bool setBoolPropFromLua (const DtString &propertyName, luabind::object const &inProp, DtReaderWriter *outProp)
bool setStructPropFromLua (const DtString &propertyName, luabind::object const &inProp, DtReaderWriter *outProp)
bool setListPropFromLua (const DtString &propertyName, luabind::object const &inProp, DtReaderWriter *outProp)
bool setStringPropFromRw (lua_State *L, const DtString &propertyName, const DtReaderWriter *inProp, luabind::object &outProp)
 ReaderWriter-to-Lua conversion functions.
bool setEntityTypeFromRw (lua_State *L, const DtString &propertyName, const DtReaderWriter *inProp, luabind::object &outProp)
bool setObjectTypeFromRw (lua_State *L, const DtString &propertyName, const DtReaderWriter *inProp, luabind::object &outProp)
bool setIntPropFromRw (lua_State *L, const DtString &propertyName, const DtReaderWriter *inProp, luabind::object &outProp)
bool setDoublePropFromRw (lua_State *L, const DtString &propertyName, const DtReaderWriter *inProp, luabind::object &outProp)
bool setBoolPropFromRw (lua_State *L, const DtString &propertyName, const DtReaderWriter *inProp, luabind::object &outProp)
bool setStructPropFromRw (lua_State *L, const DtString &propertyName, const DtReaderWriter *inProp, luabind::object &outProp)
bool setListPropFromRw (lua_State *L, const DtString &propertyName, const DtReaderWriter *inProp, luabind::object &outProp)
DtReaderWritercreateStringPropFromLua (const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
 Lua-to-ReaderWriter creation functions.
DtReaderWritercreateDoublePropFromLua (const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
DtReaderWritercreateBoolPropFromLua (const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
DtReaderWritercreateTablePropFromLua (const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
DtReaderWritercreateCustomPropFromLua (const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
DtReaderWritercreateStructPropFromLua (const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
DtReaderWritercreateListPropFromLua (const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
DtReaderWritercreateMapPropFromLua (const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)
const DtReaderWriterfindConstListItem (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.
DtReaderWriterfindListItem (DtRwPropertiesList *propList, const luabind::object &keyValues, int &index)
const DtReaderWriterfindConstMapItem (const DtRwPropertiesMap *propMap, const luabind::object &keyValue)
 Find the item in the map that matches the given key defined in the keyValue Lua object.
DtReaderWriterfindMapItem (DtRwPropertiesMap *propMap, const luabind::object &keyValue)

Detailed Description

Namespace for methods which set a property from a Lua object to DtRwVariableBindings and vice-versa.

Typedef Documentation

typedef bool(* DtPropertySetter::luaToRwFnc)(const DtString &propertyName, luabind::object const &inProp, DtReaderWriter *outProp)

Function signature for Lua-to-ReaderWriter property conversion functions.

typedef bool(* DtPropertySetter::rwToLuaFnc)(lua_State *L, const DtString &propertyName, const DtReaderWriter *inProp, luabind::object &outProp)

Function signature for ReaderWriter-to-Lua property conversion functions.

typedef DtReaderWriter*(* DtPropertySetter::luaToRwCreatorFnc)(const DtString &propertyName, luabind::object const &inProp, DtRwProperties *parent)

Function signature for Lua-to-ReaderWriter property creation functions.

Function Documentation

bool DtPropertySetter::setPropertyFromLua ( const DtString propertyName,
const luabind::object &  inProp,
DtRwProperties outProps 
)

Sets the named ReaderWriter property from a Lua property.

Returns true if successful.

bool DtPropertySetter::setOrAddPropertyFromLua ( const DtString propertyName,
const luabind::object &  inProp,
DtRwProperties outProps 
)

Sets the named ReaderWriter property from a Lua property, adding it if it's not found.

Returns true if successful.

bool DtPropertySetter::setPropertyListItemFromLua ( const DtString propertyName,
const luabind::object &  keyValues,
const luabind::object &  inProp,
DtRwProperties outProps 
)

Finds the item in the named list ReaderWriter property that matches the specified keyValues and updates it with the contents of inProp.

Returns true if successful.

bool DtPropertySetter::setPropertyListItemFromLua ( const DtString propertyName,
int  index,
const luabind::object &  inProp,
DtRwProperties outProps 
)

Finds the item in the named list ReaderWriter property at the given index (where the Lua input starts at index 1) and updates it with the contents of inProp.

Returns true if successful.

bool DtPropertySetter::setPropertyMapItemFromLua ( const DtString propertyName,
const luabind::object &  keyValue,
const luabind::object &  inProp,
DtRwProperties outProps 
)

Finds the item in the named map ReaderWriter property that matches the specified keyValues and updates it with the contents of inProp.

Returns true if successful.

bool DtPropertySetter::setPropertyFromRw ( lua_State *  L,
const DtString propertyName,
const DtRwProperties inProps,
luabind::object &  outProp 
)

Sets the named Lua property from a ReaderWriter property.

Returns true if successful.

bool DtPropertySetter::setPropertyListItemFromRw ( 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 ReaderWriter property that matches the specified keyValues and sets outItem with its contents.

Returns true if successful, along with the index of the item found.

bool DtPropertySetter::setPropertyListItemFromRw ( lua_State *  L,
const DtString propertyName,
int  index,
const DtRwProperties inProps,
luabind::object &  outItem 
)

Finds the item in the named list ReaderWriter property at the given index and sets outItem with its contents.

Returns true if successful.

bool DtPropertySetter::setPropertyMapItemFromRw ( lua_State *  L,
const DtString propertyName,
const luabind::object &  keyValue,
const DtRwProperties inProps,
luabind::object &  outItem 
)

Finds the item in the named map ReaderWriter property that matches the specified keyValue and sets outItem with its contents.

Returns true if successful.

bool DtPropertySetter::setPropertyFromLua ( const luabind::object &  inProp,
DtReaderWriter outProps 
)

Sets the given ReaderWriter property from a Lua property.

Returns true if successful.

bool DtPropertySetter::setPropertyFromRw ( lua_State *  L,
const DtReaderWriter inProps,
luabind::object &  outProp 
)

Sets the given Lua property from a ReaderWriter property.

Returns true if successful.

bool DtPropertySetter::setRwFromLua ( const luabind::object &  inProp,
DtReaderWriter outRw 
)

Tries to set all the contents of the reader/writer item from lua.

If there is not a factory representation of a particular reader/writer item then the process will try and set all the registry items from the lua supplied object by name. If the table has a name that does not exist in the reader/writer object then an error will be thrown. If there is no factory representation of a reader/writer object and that object also has no children then an error will be thrown.

Referenced by DtVariableParameterReaderWriter< _Container >::createRwStructure().

bool DtPropertySetter::setStringPropFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtReaderWriter outProp 
)

Lua-to-ReaderWriter conversion functions.

bool DtPropertySetter::setUUIDPropFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtReaderWriter outProp 
)
bool DtPropertySetter::setEntityTypeFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtReaderWriter outProp 
)
bool DtPropertySetter::setObjectTypeFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtReaderWriter outProp 
)
bool DtPropertySetter::setIntPropFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtReaderWriter outProp 
)
bool DtPropertySetter::setDoublePropFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtReaderWriter outProp 
)
bool DtPropertySetter::setBoolPropFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtReaderWriter outProp 
)
bool DtPropertySetter::setStructPropFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtReaderWriter outProp 
)
bool DtPropertySetter::setListPropFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtReaderWriter outProp 
)
bool DtPropertySetter::setStringPropFromRw ( lua_State *  L,
const DtString propertyName,
const DtReaderWriter inProp,
luabind::object &  outProp 
)

ReaderWriter-to-Lua conversion functions.

bool DtPropertySetter::setEntityTypeFromRw ( lua_State *  L,
const DtString propertyName,
const DtReaderWriter inProp,
luabind::object &  outProp 
)
bool DtPropertySetter::setObjectTypeFromRw ( lua_State *  L,
const DtString propertyName,
const DtReaderWriter inProp,
luabind::object &  outProp 
)
bool DtPropertySetter::setIntPropFromRw ( lua_State *  L,
const DtString propertyName,
const DtReaderWriter inProp,
luabind::object &  outProp 
)
bool DtPropertySetter::setDoublePropFromRw ( lua_State *  L,
const DtString propertyName,
const DtReaderWriter inProp,
luabind::object &  outProp 
)
bool DtPropertySetter::setBoolPropFromRw ( lua_State *  L,
const DtString propertyName,
const DtReaderWriter inProp,
luabind::object &  outProp 
)
bool DtPropertySetter::setStructPropFromRw ( lua_State *  L,
const DtString propertyName,
const DtReaderWriter inProp,
luabind::object &  outProp 
)
bool DtPropertySetter::setListPropFromRw ( lua_State *  L,
const DtString propertyName,
const DtReaderWriter inProp,
luabind::object &  outProp 
)
DtReaderWriter* DtPropertySetter::createStringPropFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtRwProperties parent 
)

Lua-to-ReaderWriter creation functions.

DtReaderWriter* DtPropertySetter::createDoublePropFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtRwProperties parent 
)
DtReaderWriter* DtPropertySetter::createBoolPropFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtRwProperties parent 
)
DtReaderWriter* DtPropertySetter::createTablePropFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtRwProperties parent 
)
DtReaderWriter* DtPropertySetter::createCustomPropFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtRwProperties parent 
)
DtReaderWriter* DtPropertySetter::createStructPropFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtRwProperties parent 
)
DtReaderWriter* DtPropertySetter::createListPropFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtRwProperties parent 
)
DtReaderWriter* DtPropertySetter::createMapPropFromLua ( const DtString propertyName,
luabind::object const &  inProp,
DtRwProperties parent 
)
const DtReaderWriter* DtPropertySetter::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.

Sets the index parameter to the Lua index (where the first item is at index 1).

DtReaderWriter* DtPropertySetter::findListItem ( DtRwPropertiesList propList,
const luabind::object &  keyValues,
int index 
)
const DtReaderWriter* DtPropertySetter::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 structure that defines the format of each item in the list property.

const DtReaderWriter* DtPropertySetter::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 data type that matches the type of each item in the list property.

DtString DtPropertySetter::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.

const DtReaderWriter* DtPropertySetter::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.

DtReaderWriter* DtPropertySetter::findMapItem ( DtRwPropertiesMap propMap,
const luabind::object &  keyValue 
)
DtPropFromLuaFcnMap& DtPropertySetter::propertyFromLuaFcnMap ( )

The Lua-to-ReaderWriter by type.

DtPropFromRwFcnMap& DtPropertySetter::propertyFromRwFcnMap ( )

The ReaderWriter-to-Lua by type.

DtPropFromLuaCreatorFcnMap& DtPropertySetter::propertyFromLuaCreatorFcnMap ( )

The Lua-to-ReaderWriter creator by type.


Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)