Reduce cost of including chaiscript.hpp

- ChaiScript no longer includes or automatically instantiates std lib
 - ChaiScript constructor now requires an std lib instance in the form
   of a ModulePtr object
 - This new layout facilitates better usage of compilation firewalls and
   factories for reducing the overall impact of ChaiScript on a project
This commit is contained in:
Jason Turner
2011-12-27 21:37:00 -07:00
parent 9a9d4e1ae0
commit 136b877afa
20 changed files with 72 additions and 56 deletions

View File

@@ -1,3 +1,4 @@
#include <chaiscript/chaiscript_stdlib.hpp>
#include <chaiscript/utility/utility.hpp>
class Test
@@ -33,7 +34,7 @@ int main()
chaiscript::ChaiScript chai;
chaiscript::ChaiScript chai(chaiscript::Std_Lib::library());;
chai.add(m);
if (chai.eval<std::string>("auto t = Test(); t.function2(); ") == "Function2"
&& chai.eval<std::string>("auto t = Test(); t.functionOverload(1); ") == "int"