Add better namespaces to make documentation easier to handle
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user