Add better namespaces to make documentation easier to handle

This commit is contained in:
Jason Turner
2011-03-05 22:50:38 -07:00
parent eee5c19b6e
commit 0b97fcb4df
23 changed files with 1398 additions and 1348 deletions

View File

@@ -11,43 +11,45 @@
namespace chaiscript
{
/**
* class that is thrown in the event of a bad_boxed_cast. That is,
* in the case that a Boxed_Value cannot be cast to the desired type
*/
class bad_boxed_cast : public std::bad_cast
namespace exception
{
public:
bad_boxed_cast(const Type_Info &t_from, const std::type_info &t_to,
const std::string &what)
: from(t_from), to(&t_to), m_what(what)
{
}
/**
* class that is thrown in the event of a bad_boxed_cast. That is,
* in the case that a Boxed_Value cannot be cast to the desired type
*/
class bad_boxed_cast : public std::bad_cast
{
public:
bad_boxed_cast(const Type_Info &t_from, const std::type_info &t_to,
const std::string &what)
: from(t_from), to(&t_to), m_what(what)
{
}
bad_boxed_cast(const Type_Info &t_from, const std::type_info &t_to) throw()
: from(t_from), to(&t_to), m_what("Cannot perform boxed_cast")
{
}
bad_boxed_cast(const Type_Info &t_from, const std::type_info &t_to) throw()
: from(t_from), to(&t_to), m_what("Cannot perform boxed_cast")
{
}
bad_boxed_cast(const std::string &w) throw()
: m_what(w)
{
}
bad_boxed_cast(const std::string &w) throw()
: m_what(w)
{
}
virtual ~bad_boxed_cast() throw() {}
virtual ~bad_boxed_cast() throw() {}
virtual const char * what() const throw()
{
return m_what.c_str();
}
virtual const char * what() const throw()
{
return m_what.c_str();
}
Type_Info from;
const std::type_info *to;
Type_Info from;
const std::type_info *to;
private:
std::string m_what;
};
private:
std::string m_what;
};
}
}