Add the ability to look up user defined typenames

Closes #124
This commit is contained in:
Jason Turner
2014-08-17 09:05:29 -06:00
parent 3a775097dd
commit cb1c7730cf
3 changed files with 38 additions and 0 deletions

View File

@@ -503,6 +503,18 @@ namespace chaiscript
return ss.str();
}
std::string get_type_name(const Type_Info &ti) const
{
return m_engine.get_type_name(ti);
}
template<typename T>
std::string get_type_name() const
{
return get_type_name(user_type<T>());
}
/// \brief Loads and parses a file. If the file is already, it is not reloaded
/// The use paths specified at ChaiScript construction time are searched for the
/// requested file.