UCommon
|
Generic templates for C++. More...
Go to the source code of this file.
Data Structures | |
class | ucommon::array_pointer< T > |
Generic smart array class. More... | |
class | ucommon::pointer< T > |
Generic smart pointer class. More... | |
class | ucommon::temp_array< T > |
Manage temporary array stored on the heap. More... | |
class | ucommon::temporary< T > |
Manage temporary object stored on the heap. More... | |
Namespaces | |
namespace | ucommon |
Common namespace for all ucommon objects. | |
Defines | |
#define | THROW(x) ::abort() |
#define | THROWS(x) |
#define | THROWS_ANY |
Functions | |
template<typename T > | |
T * | ucommon::dup (const T &object) |
Convenience function to duplicate object pointer to heap. | |
template<> | |
char * | ucommon::dup< char > (const char &object) |
template<typename T > | |
void | ucommon::dupfree (T object) |
template<> | |
void | ucommon::dupfree< char * > (char *object) |
template<class T > | |
bool | ucommon::is (T &object) |
Convenience function to validate object assuming it is castable to bool. | |
template<typename T > | |
bool | ucommon::isnull (T &object) |
Convenience function to test pointer object. | |
template<typename T > | |
bool | ucommon::isnullp (T *object) |
Convenience function to test pointer-pointer object. | |
template<typename T > | |
T &() | ucommon::max (T &o1, T &o2) |
Convenience function to return max of two objects. | |
template<typename T > | |
T &() | ucommon::min (T &o1, T &o2) |
Convenience function to return min of two objects. | |
template<typename T > | |
void | ucommon::swap (T &o1, T &o2) |
Convenience function to swap objects. |
Generic templates for C++.
These are templates that do not depend on any ucommon classes. They can be used for generic C++ programming.
Definition in file generics.h.