diff options
Diffstat (limited to 'server/src')
| -rw-r--r-- | server/src/Makefile.am | 6 | ||||
| -rw-r--r-- | server/src/luaquerymapper.cc | 10 | 
2 files changed, 9 insertions, 7 deletions
| diff --git a/server/src/Makefile.am b/server/src/Makefile.am index 594bfdb..6e197c2 100644 --- a/server/src/Makefile.am +++ b/server/src/Makefile.am @@ -67,13 +67,13 @@ test_clean:  	rm -f $(TESTFILES)  test_queryhandler: queryhandler.cc -	@../../tools/test queryhandler.cc tcpsocket.cc exception.cc uid.cc log.cc +	@../../tools/test queryhandler.cc tcpsocket.cc exception.cc log.cc  test_queryparser: queryparser.cc -	@../../tools/test queryparser.cc queryhandler.cc tcpsocket.cc exception.cc uid.cc log.cc saxparser.cc -lexpat +	@../../tools/test queryparser.cc queryhandler.cc tcpsocket.cc exception.cc log.cc saxparser.cc -lexpat  test_luaquerymapper: luaquerymapper.cc -	@../../tools/test luaquerymapper.cc queryparser.cc queryhandler.cc tcpsocket.cc exception.cc uid.cc log.cc saxparser.cc -lexpat $(LUA_LIBS) +	@../../tools/test luaquerymapper.cc queryparser.cc queryhandler.cc tcpsocket.cc exception.cc log.cc saxparser.cc -lexpat $(LUA_LIBS)  test_templateparser: templateparser.cc  	@../../tools/test templateparser.cc saxparser.cc exception.cc log.cc -lexpat -DXML="\"../xml\"" diff --git a/server/src/luaquerymapper.cc b/server/src/luaquerymapper.cc index 5b66a35..acd6b26 100644 --- a/server/src/luaquerymapper.cc +++ b/server/src/luaquerymapper.cc @@ -170,11 +170,13 @@ int main()    LUAQueryMapper mapper(e.result); -  std::string luamap = "return right.sphere"; -  printf("%s : %s\n", luamap.c_str(), mapper.map(luamap).c_str()); +  std::string luamap = "return right.sphere, 0"; +  Value value = mapper.map(luamap); +  printf("%s : %s, %lu\n", luamap.c_str(), value.value.c_str(), value.timestamp); -  luamap = "return math.sin(right.cyl) * 2"; -  printf("%s : %s\n", luamap.c_str(), mapper.map(luamap).c_str()); +  luamap = "return math.sin(right.cyl) * 2, 0"; +  value = mapper.map(luamap); +  printf("%s : %s, %lu\n", luamap.c_str(), value.value.c_str(), value.timestamp);    return 0;  } | 
