Commit 0c53daa4 authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

added the possibility to use context as basis for UnQLiteValues

parent 2faff908
......@@ -42,13 +42,20 @@ find_package (UnQLite REQUIRED)
find_package (TCLAP REQUIRED)
find_package(spdlog REQUIRED)
message(STATUS ${UNQLITE_LIBRARIES})
find_package (CppUnit)
if (CPPUNIT_FOUND)
message(STATUS "CppUnit found, unit tests will be compiled")
include_directories(${CPPUNIT_INCLUDE_DIR})
enable_testing()
if(${ENABLE_TESTS})
add_subdirectory (test)
endif(${ENABLE_TESTS})
else (CPPUNIT_FOUND)
message(STATUS "CppUnit not found, unit tests will not be compiled")
endif (CPPUNIT_FOUND)
add_subdirectory (src)
add_subdirectory (bin)
if(${ENABLE_TESTS})
add_subdirectory (test)
endif(${ENABLE_TESTS})
if(${ENABLE_EXAMPLES})
add_subdirectory (examples)
endif(${ENABLE_EXAMPLES})
......@@ -55,12 +55,12 @@ class UnQLiteVM {
template<typename T>
T get(const std::string& name) const {
unqlite_value* value = unqlite_vm_extract_variable(m_vm, name.c_str());
return UnQLiteValue(value, m_vm).as<T>();
return UnQLiteValue(value, m_vm, nullptr).as<T>();
}
UnQLiteValue operator[](const std::string& name) const {
unqlite_value* value = unqlite_vm_extract_variable(m_vm, name.c_str());
return UnQLiteValue(value, m_vm);
return UnQLiteValue(value, m_vm, nullptr);
}
private:
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment