diff options
Diffstat (limited to 'doc/lout.doc')
-rw-r--r-- | doc/lout.doc | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/doc/lout.doc b/doc/lout.doc new file mode 100644 index 00000000..0d5be679 --- /dev/null +++ b/doc/lout.doc @@ -0,0 +1,94 @@ +/** \page lout Lots of Useful Tools + +In the "lout" directory, there are some common base functionality for +C++. Most is described as doxygen comments, this text gives an +overview. + +<h2>Common Base Class</h2> + +Many classes are derived from object::Object, which defines some +general methods. See there for more information. + +For the case, that you need primitive C++ types, there are some +wrappers: + +<table> +<tr><th>C++ Type <th>Wrapper Class +<tr><td>void* <td>object::Pointer +<tr><td>specific pointer <td>object::TypedPointer (template class) +<tr><td>int <td>object::Integer +<tr><td>const char* <td>object::ConstString +<tr><td>char* <td>object::String +</table> + + +<h2>Containers</h2> + +In the namespace ::container, several container classes are defined, +which all deal with instances of object::Object. + +<h3>Untyped Containers</h3> + +In container::untyped, there are the following containers: + +<ul> +<li>container::untyped::Vector, a dynamically increases array, +<li>container::untyped::List, a linked list, +<li>container::untyped::HashTable, a hash table, and +<li>container::untyped::Stack, a stack. +</ul> + +All provide specific methods, but since they have a common base class, +container::untyped::Collection, they all provide iterators, by the +method container::untyped::Collection::iterator. + +<h3>Typed Containers</h3> + +container::typed provides wrappers for the container classes defined +in container::untyped, which are more type safe, by using C++ +templates. + + +<h2>Signals</h2> + +For how to connect objects at run-time (to reduce dependencies), take a +look at the ::signal namespace. + +There is also a base class signal::ObservedObject, which implements +signals for deletion. + + +<h2>Debugging</h2> + +In debug.hh, there are some some useful macros for debugging messages, +see the file for mor informations. + + +<h2>Identifying Classes at Runtime</h2> + +If the class of an object must be identified at runtime, +identity::IdentifiableObject should be used as the base class, see +there for more details. + + +<h2>Miscellaneous</h2> + +The ::misc namespace provides several miscellaneous stuff: + +<ul> +<li> In some contexts, it is necessary to compare objects + (less/greater), for this, also misc::Comparable must be + implemented. For example., container::untyped::Vector::sort and + container::typed::Vector::sort cast the elements to + misc::Comparable. This can be mixed with object::Object. +<li> misc::SimpleVector, a simple, template based vector class (not + depending on object::Object), +<li> misc::StringBuffer, class for fast concatenation of a large number + of strings, +<li> misc::BitSet implements a bitset. +<li> useful (template) functions (misc::min, misc::max), and +<li> some functions useful for runtime checks (misc::assert, + misc::assertNotReached). +</ul> + +*/ |