MCPcopy Create free account
hub / github.com/danomatika/ofxLua / writeTable

Method writeTable

src/ofxLua.cpp:947–965  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

945
946//------------------------------------------------------------------------------
947void ofxLua::writeTable(ofxLuaFileWriter& writer, bool recursive) {
948 if(!isValid()) {
949 return;
950 }
951
952 if(tables.empty()) {
953 ofLogWarning("ofxLua") << "No table to write, did you push?";
954 return;
955 }
956
957 // in a table namespace
958 if(!lua_istable(L, LUA_STACK_TOP)) {
959 ofLogWarning("ofxLua") << "Couldn't write table \"" << (std::string)tables.back()
960 << "\", top of stack is not a table";
961 return;
962 }
963
964 writeTable(LUA_STACK_TOP, writer, recursive);
965}
966
967void ofxLua::writeTable(const std::string& tableName, ofxLuaFileWriter& writer, bool recursive) {
968 if(!pushTable(tableName)) {

Callers 1

runTestsMethod · 0.80

Calls 12

lua_pushvalueFunction · 0.85
lua_pushnilFunction · 0.85
lua_nextFunction · 0.85
lua_isnumberFunction · 0.85
lua_typeFunction · 0.85
lua_tobooleanFunction · 0.85
lua_isstringFunction · 0.85
beginTableMethod · 0.80
endTableMethod · 0.80
writeBoolMethod · 0.80
writeNumberMethod · 0.80
writeStringMethod · 0.80

Tested by

no test coverage detected