Savarese Software Research Corporation
Properties.cc File Reference
Include dependency graph for Properties.cc:

Go to the source code of this file.

Functions

void table_to_properties (lua_State *state, Properties &properties)
 Copies a Lua table into a Properties instance.
void swig_table_to_properties (void *state, Properties &properties)
 This function is a kluge to work around a SWIG library relocation error.
properties_ptr load_properties (lua_State *state, const std::string &filename) SSRC_DECL_THROW(LuaCallError)
properties_ptr load_string_properties (lua_State *state, const std::string &code_str) SSRC_DECL_THROW(LuaCallError)

Function Documentation

properties_ptr load_properties ( lua_State *  state,
const std::string filename 
)

Definition at line 211 of file Properties.cc.

References load_properties().

Referenced by load_properties(), load_string_properties(), and ssrc_wispers_load_config().

properties_ptr load_string_properties ( lua_State *  state,
const std::string code_str 
)

Definition at line 218 of file Properties.cc.

References load_properties().

Referenced by load_string_properties(), and ssrc_wispers_load_string_config().

void swig_table_to_properties ( void *  state,
Properties &  properties 
)

This function is a kluge to work around a SWIG library relocation error.

For some reason, table_to_properties doesn't resolve when called within a SWIG wrapper function. Removing lua_State* from the function signature allows the function to be located, which then resolves table_to_properties within the same relocation unit instead of crossing module boundaries.

Definition at line 180 of file Properties.cc.

References table_to_properties().

void table_to_properties ( lua_State *  state,
Properties &  properties 
)

Copies a Lua table into a Properties instance.

Tables must either be pure arrays of primitive values, pure arrays of tables, or a zero-length table with key value pairs where all the keys are strings.

Parameters:
stateA pointer to the Lua state containing the table to convert at the top of the stack.
propertiesThe Properties instance to convert.

Definition at line 110 of file Properties.cc.

References convert< bool >(), convert< lua_Number >(), convert< string >(), and table_to_properties().

Referenced by swig_table_to_properties(), and table_to_properties().


Savarese Software Research Corporation
Copyright © 2006-2011 Savarese Software Research Corporation. All rights reserved.