reorganize all constants and place them into namespaces

This commit is contained in:
Eduardo Bart
2011-08-28 13:02:26 -03:00
parent dab483caab
commit e87297c1b5
62 changed files with 527 additions and 800 deletions

View File

@@ -42,7 +42,7 @@ void LuaInterface::init()
createLuaState();
// check if demangle_type is working as expected
assert(fw::demangle_type<LuaObject>() == "LuaObject");
assert(Fw::demangleType<LuaObject>() == "LuaObject");
// register LuaObject, the base of all other objects
registerClass<LuaObject>();
@@ -147,12 +147,12 @@ void LuaInterface::registerClassMemberField(const std::string& className,
if(getFunction) {
pushCppFunction(getFunction);
setField(fw::mkstr("get_", field));
setField(Fw::mkstr("get_", field));
}
if(setFunction) {
pushCppFunction(setFunction);
setField(fw::mkstr("set_", field));
setField(Fw::mkstr("set_", field));
}
pop();
@@ -295,7 +295,7 @@ void LuaInterface::loadFunction(const std::string& buffer, const std::string& so
// gets the function contained in that buffer
if(boost::starts_with(buffer, "function")) {
// evaluate the function
std::string buf = fw::mkstr("__func = ", buffer);
std::string buf = Fw::mkstr("__func = ", buffer);
loadBuffer(buf, source);
safeCall();
@@ -317,7 +317,7 @@ void LuaInterface::evaluateExpression(const std::string& expression, const std::
{
// evaluates the expression
if(!expression.empty()) {
std::string buffer = fw::mkstr("__exp = (", expression, ")");
std::string buffer = Fw::mkstr("__exp = (", expression, ")");
loadBuffer(buffer, source);
safeCall();
@@ -917,7 +917,7 @@ void LuaInterface::pushObject(const LuaObjectPtr& obj)
new(newUserdata(sizeof(LuaObjectPtr))) LuaObjectPtr(obj);
// set the userdata metatable
getGlobal(fw::mkstr(obj->getLuaObjectName(), "_mt"));
getGlobal(Fw::mkstr(obj->getLuaObjectName(), "_mt"));
assert(!isNil());
setMetatable();
}