libthrowable::util Namespace Reference
[Various]

Utilities, mostly, but not only, for internal use. More...


Functions

template<class OStreamableT>
std::string stringify (const OStreamableT &arg) throw ()
 Use this one to convert various objects to std::string.
int getTerminalWidth () throw ()
 Returns the width of the current terminal or 80.
std::string addIndent (const std::string &str, unsigned indent) throw ()
 Helper function to add indent to strings.
std::string optimizeForLineWidth (const std::string &str, int width) throw ()
 This function returns str optimized for a given linewidth.
std::string optimizeForTerminalWidth (const std::string &str) throw ()
 This function returns str optimized for the current terminal width.
std::string stringify (bool arg) throw ()


Detailed Description

Utilities, mostly, but not only, for internal use.

Since:
libthrowable-0.9.1

Function Documentation

std::string libthrowable::util::addIndent ( const std::string &  str,
unsigned  indent 
) throw ()

Helper function to add indent to strings.

Since:
libthrowable-0.9.1

int libthrowable::util::getTerminalWidth (  )  throw ()

Returns the width of the current terminal or 80.

See also:
optimizeForTerminalWidth(const std::string&)
Since:
libthrowable-0.9.1

std::string libthrowable::util::optimizeForLineWidth ( const std::string &  str,
int  width 
) throw ()

This function returns str optimized for a given linewidth.

See also:
optimizeForTerminalWidth(const std::string&)
Since:
libthrowable-0.9.1

std::string libthrowable::util::optimizeForTerminalWidth ( const std::string &  str  )  throw () [inline]

This function returns str optimized for the current terminal width.

See also:
optimizeForLineWidth(const std::string&, int)

getTerminalWidth()

Since:
libthrowable-1.0.0.

std::string libthrowable::util::stringify ( bool  arg  )  throw () [inline]

template<class OStreamableT>
std::string libthrowable::util::stringify ( const OStreamableT &  arg  )  throw () [inline]

Use this one to convert various objects to std::string.

Parameters:
arg If "os" is of type std::ostream, "os << arg;" must be a legal statement.
Since:
libthrowable-0.9.1


Generated on Wed Jan 9 18:07:18 2008 for libthrowable by  doxygen 1.5.4  Hosted on  SourceForge.net Logo