RSC
0.17.1
|
Classes | |
class | InvalidMangledName |
This exception indicates the special case of an invalid argument where an invalid mangled name was passed to a function. More... | |
class | NoSuchObject |
This exception is thrown if a specified object does not exist. More... | |
class | Printable |
A base class that defines utility functions for printing objects to streams. More... | |
class | Properties |
Properties objects are basically glorified map<string, boost::any> objects. More... | |
Functions | |
std::string | demangle (const char *mangledSymbol) |
This function takes the mangled name of a symbol and returns the demangled name of the symbol. More... | |
std::string | demangle (const std::string &mangledSymbol) |
This function takes the mangled name of a symbol and returns the demangled name of the symbol. More... | |
ostream & | operator<< (std::ostream &stream, const Printable &printable) |
Output operator on std::ostream for reference Printables. More... | |
ostream & | operator<< (std::ostream &stream, const Printable *printable) |
Output operator on std::ostream for pointer Printables. More... | |
template<class Y > | |
std::ostream & | operator<< (std::ostream &stream, boost::weak_ptr< Y > const &p) |
It seems boost::weak_ptr's do not have a stream operator. More... | |
template<typename T > | |
bool | anyEqual (boost::any lhs, boost::any rhs) |
Properties | operator<< (const Properties &left, const Properties &right) |
Merge left and right. More... | |
template<typename Ch , typename Tr > | |
std::basic_ostream< Ch, Tr > & | operator<< (std::basic_ostream< Ch, Tr > &stream, const std::pair< std::string, boost::any > &property) |
template<typename Ch , typename Tr > | |
std::basic_ostream< Ch, Tr > & | operator<< (std::basic_ostream< Ch, Tr > &stream, const Properties &properties) |
std::string | typeName (const std::type_info &type) |
Returns a (demangled) string representation of type. More... | |
template<typename T > | |
std::string | typeName () |
Returns a (demangled) string representation of the type of the template parameter. More... | |
template<typename T > | |
std::string | typeName (const T &object) |
Returns a (demangled) string representation of the type of object. More... | |
template<typename T > | |
std::string | typeString (const std::string &known_type_string, const std::string &unknown_type_string, const T &value) |
Returns one of two to strings depending on whether type T is known to be able to support stream output (using operator<<). More... | |
template<typename T > | |
std::string | doTypeString (const std::string &known_type_string, const std::string &, const T &value, boost::true_type) |
template<typename T > | |
std::string | doTypeString (const std::string &, const std::string &unknown_type_string, const T &, boost::false_type) |
bool rsc::runtime::anyEqual | ( | boost::any | lhs, |
boost::any | rhs | ||
) |
Definition at line 35 of file Properties.cpp.
RSC_EXPORT std::string rsc::runtime::demangle | ( | const char * | mangledSymbol | ) |
This function takes the mangled name of a symbol and returns the demangled name of the symbol.
mangled_symbol | The mangled name of the symbol. |
runtime_error | |
InvalidMangledName |
Definition at line 86 of file Demangle.cpp.
Referenced by demangle(), and typeName().
RSC_EXPORT std::string rsc::runtime::demangle | ( | const std::string & | mangledSymbol | ) |
This function takes the mangled name of a symbol and returns the demangled name of the symbol.
mangled_symbol | The mangled name of the symbol. |
runtime_error | |
InvalidMangledName |
Definition at line 99 of file Demangle.cpp.
References demangle().
std::string rsc::runtime::doTypeString | ( | const std::string & | known_type_string, |
const std::string & | , | ||
const T & | value, | ||
boost::true_type | |||
) |
Definition at line 204 of file TypeStringTools.h.
std::string rsc::runtime::doTypeString | ( | const std::string & | , |
const std::string & | unknown_type_string, | ||
const T & | , | ||
boost::false_type | |||
) |
Definition at line 210 of file TypeStringTools.h.
Referenced by typeString().
RSC_EXPORT std::ostream & rsc::runtime::operator<< | ( | std::ostream & | stream, |
const Printable & | printable | ||
) |
Output operator on std::ostream for reference Printables.
stream | stream to print on |
printable | Printable to print |
stream
Definition at line 56 of file Printable.cpp.
References rsc::runtime::Printable::print().
RSC_EXPORT std::ostream & rsc::runtime::operator<< | ( | std::ostream & | stream, |
const Printable * | printable | ||
) |
Output operator on std::ostream for pointer Printables.
stream | stream to print on |
printable | Printable to print |
stream
Definition at line 61 of file Printable.cpp.
References rsc::runtime::Printable::print().
RSC_EXPORT Properties rsc::runtime::operator<< | ( | const Properties & | left, |
const Properties & | right | ||
) |
Merge left and right.
Values in right take precedence over values with identical keys in left.
left | Properties with lower precedence. |
right | Properties with higher precedence. |
Definition at line 98 of file Properties.cpp.
std::ostream& rsc::runtime::operator<< | ( | std::ostream & | stream, |
boost::weak_ptr< Y > const & | p | ||
) |
It seems boost::weak_ptr's do not have a stream operator.
So provide one.
stream | stream to print on |
p | pointer to print |
Y | pointee type |
Definition at line 120 of file Printable.h.
std::basic_ostream<Ch, Tr>& rsc::runtime::operator<< | ( | std::basic_ostream< Ch, Tr > & | stream, |
const std::pair< std::string, boost::any > & | property | ||
) |
std::basic_ostream< Ch, Tr > & rsc::runtime::operator<< | ( | std::basic_ostream< Ch, Tr > & | stream, |
const Properties & | properties | ||
) |
Definition at line 252 of file Properties.h.
References typeName().
RSC_EXPORT std::string rsc::runtime::typeName | ( | const std::type_info & | type | ) |
Returns a (demangled) string representation of type.
type | The type that's name should be returned. |
runtime_error | If demangling the type's name fails. |
Definition at line 34 of file TypeStringTools.cpp.
References demangle().
Referenced by rsc::patterns::Factory< Key, Interface >::createInst(), rsc::debug::DebugTools::exceptionInfo(), rsc::runtime::Properties::get(), rsc::runtime::Printable::getClassName(), operator<<(), std::operator<<(), rsc::patterns::operator<<(), and rsc::runtime::Properties::operator==().
std::string rsc::runtime::typeName | ( | ) |
Returns a (demangled) string representation of the type of the template parameter.
runtime_error | If demangling the type's name fails. |
Definition at line 194 of file TypeStringTools.h.
References demangle().
std::string rsc::runtime::typeName | ( | const T & | object | ) |
Returns a (demangled) string representation of the type of object.
object | The object, the stringified type of which should be returned. |
runtime_error | If demangling the type's name fails. |
Definition at line 199 of file TypeStringTools.h.
References demangle().
std::string rsc::runtime::typeString | ( | const std::string & | known_type_string, |
const std::string & | unknown_type_string, | ||
const T & | value | ||
) |
Returns one of two to strings depending on whether type T is known to be able to support stream output (using operator<<).
known_type_string | The string to be used if type T supports stream output. This string may contain %1% substrings that will be replaced by the result of writing value to a stream. |
unknown_type_string | The string to be used if type T does not support stream output. This string will be returned unmodified. |
value | The value that is to be embedded in known_type_string if that is possible. |
format_error | If the format specified in known_type_string is invalid. |
operator<<(ostream,T)
defined or not, work has to be done to support user-defined types here.Definition at line 216 of file TypeStringTools.h.
References doTypeString().
Referenced by rsc::patterns::Factory< Key, Interface >::createInst(), rsc::patterns::Factory< Key, Interface >::register_(), and rsc::patterns::Factory< Key, Interface >::unregister().