Collaboration diagram for Miscellaneous Tools:
|
stechec/tools/misc directory.There is Position, a tiny Point class, that should be useful everywhere... More...
Files | |
| file | ExceptionDefine.hh |
| Add few macro helpers for Exception.
This file is included after logger, but before the rest of the world. | |
| file | os_wrapper.hh |
| Reimplement or wrap functions that doesn't exists on 'exotic' systems.
Disclaimer: This file is not intended to be clean, nice, nor beautiful. | |
Classes | |
| class | Exception |
| class | LibraryError |
| Exception class for dynamic library loader errors. More... | |
| class | Library |
| Dynamic library loader. More... | |
| class | TPoint< T > |
| Handy class to describe a point in x-y coordinate, for GUIs.
Conversion from/to Position are made implicit, to avoid mistake. More... | |
| class | Position |
| Handy class to describe a position.
It is just a point, with a set of methods that makes it useful. More... | |
| class | Rect |
| A rectangle class.
Warning: | |
| struct | Deleter |
| struct | ArrayDeleter |
| class | Timer |
| Implement a passive timer, with time accuracy in seconds.
You have to start, stop, restart, and check the remaining time yourself. The timer can be paused, then re-started. More... | |
| #define | THROW(Excpt, Msg) |
| #define | PRINT_AND_THROW(Excpt, Msg) |
| #define | closesocket close |
| #define | MSG_NOSIGNAL 0 |
| void | initialize_socket () |
Typedefs | |
| typedef TPoint< int > | Point |
| typedef TPoint< double > | DPoint |
| typedef std::deque< Position > | PosList |
| typedef PosList::const_iterator | PosIter |
Functions | |
| std::string | trim (const std::string &s) |
| template<typename Collection, typename Function> | |
| Function | for_all (Collection &c, const Function &f) |
| Implements std::for_each with less typing. | |
stechec/tools/misc directory.There is Position, a tiny Point class, that should be useful everywhere...
| #define PRINT_AND_THROW | ( | Excpt, | |||
| Msg | ) |
Value:
do { \ std::ostringstream os; \ os << Msg; \ Excpt e(os.rdbuf()->str()); \ ERR("Throwing " #Excpt ": %1", e.what()); \ throw e; \ } while (0)
| #define THROW | ( | Excpt, | |||
| Msg | ) |
Value:
do { \ std::ostringstream os; \ os << Msg; \ throw Excpt(os.rdbuf()->str()); \ } while (0)
1.4.7