Major updates to the C++ API. Please see trunk/src/example.cpp to follow along

This commit is contained in:
Jason Turner
2009-07-18 18:05:54 +00:00
parent ac817ff33a
commit 4d4c26bf73
14 changed files with 451 additions and 416 deletions

View File

@@ -17,7 +17,7 @@
#include <boost/cstdint.hpp>
#include <boost/type_traits/add_const.hpp>
namespace dispatchkit
namespace chaiscript
{
/**
* Boxed_Value is the main tool of the dispatchkit. It allows
@@ -148,6 +148,12 @@ namespace dispatchkit
return data;
}
template<typename T>
boost::shared_ptr<Data> get(T *t)
{
return get(boost::ref(*t));
}
template<typename T>
boost::shared_ptr<Data> get(boost::reference_wrapper<T> obj)
{
@@ -670,6 +676,12 @@ namespace dispatchkit
return Boxed_POD_Value(ob);
}
};
template<typename T>
Boxed_Value var(T t)
{
return Boxed_Value(t);
}
}
#endif