Namespaces | |
namespace | Constants |
The constants namespace. | |
namespace | Exception |
Exception. | |
namespace | RTTI |
Simplified RunTime Type Identification. | |
Classes | |
class | Exception::GeneralException |
General exception class. More... | |
class | HashFunction< T > |
General Hash Function Template. More... | |
class | Limits< T > |
Numeric limits class. More... | |
class | VersionInfo |
Version information class. More... | |
[NOHEADER] | |
#define | BALL_CREATE_DEEP(name) |
Virtual construction macro. | |
#define | BALL_CREATE(name) |
Virtual construction macro. | |
#define | BALL_DEFINE_CREATE(name) |
Virtual cloning method definition macro. | |
Type aliases defined by BALL. | |
These predefined types are used in BALL for portability and comprehensibility. | |
typedef BALL_INDEX_TYPE | Distance |
Distance type. | |
typedef BALL_SIZE_TYPE | Handle |
Handle type. | |
typedef BALL_INDEX_TYPE | Index |
Index type. | |
typedef BALL_SIZE_TYPE | Size |
Size type. | |
typedef BALL_LONG64_TYPE | LongIndex |
Long signed int type. | |
typedef BALL_ULONG64_TYPE | LongSize |
Long unsigned int type. | |
typedef time_t | Time |
Time type. | |
typedef BALL_SIZE_TYPE | HashIndex |
HashIndex type. | |
typedef BALL_SIZE_TYPE | Position |
Position type. | |
typedef float | Real |
Real type. | |
typedef double | DoubleReal |
Double-precision real type. | |
typedef BALL_SIZE_TYPE | Property |
Unnamed property type. | |
typedef BALL_INDEX_TYPE | ErrorCode |
Error code property type. | |
typedef unsigned char | Byte |
Byte type. | |
typedef BALL_POINTERSIZEUINT_TYPE | PointerSizeUInt |
Unsigned int with the same size as a pointer. | |
Functions | |
BALL_EXPORT std::ostream & | operator<< (std::ostream &os, const Exception::GeneralException &e) |
Output operator for exceptions. | |
BALL_EXPORT string | streamClassName (const std::type_info &t) |
Returns a unique name for a class. |
|
Value: \ virtual void* create(bool /* deep */ = true, bool empty = false) const\ {\ void* ptr;\ if (empty == true)\ {\ ptr = (void*)new name;\ }\ else\ {\ ptr = (void*)new name(*this);\ }\ \ return ptr;\ }\ \ static void* createDefault()\ {\ return static_cast<void*>(new name);\ }
This macro is used to define the virtual create method for classes that do not define a copy constructor taking a second argument (boolean, deep or shallow copy). On inclusion of this macro in the public interface of a class, the virtual creation method becomes available. The create method's signature is as follows:
|
|
Value: \ virtual void* create(bool deep = true, bool empty = false) const\ {\ void* ptr;\ if (empty == true)\ {\ ptr = (void*)new name;\ }\ else\ {\ ptr = (void*)new name(*this, deep);\ }\ \ return ptr;\ }\ \ static void* createDefault()\ {\ return static_cast<void*>(new name);\ }
This macro is used to define the virtual create method. On inclusion of this macro in the public interface of a class, the virtual creation method becomes available. The create method's signature is as follows:
|
|
Value: \ virtual void* create(bool deep = true, bool empty = false) const;\ static void* createDefault(); If the create method has to be implemented by the user, this macro just defines the create method and the createDefault method. The function signatures are: virtual void* create(bool deep = true, bool empty = false) const; static void* createDefault(); |
|
Byte type. Use this type to represent byte data (8 bit length). A Byte is always unsigned.
|
|
Distance type. Use this type to represent distances in indices. Signed.
|
|
Double-precision real type. Use this type to represent double precision floating point numbers.
|
|
Error code property type. Use this type to represent (signed) error codes.
|
|
Handle type. Use this type to represent handles. Handles are used for the non-ambiguous identification of objects (e.g. object derived from Object ). Handles are unsigned.
|
|
HashIndex type. Use this type to access the result of a hash functions. HashIndex is unsigned.
|
|
Index type. Use this type to represent indices (e.g. in strings or other sequences). Theses indices may be signed, contrary to the Size type.
|
|
Long signed int type. Use this type to represent very long (64 bit) indices. Theses indices may be signed, contrary to the LongSize type.
|
|
Long unsigned int type. Use this type to represent sizes of containers, sequences or alike. Variables of type LongSize are unsigned.
|
|
Unsigned int with the same size as a pointer. Used for internal conversion issues mostly. Size: 32/64 bit (platform dependent) |
|
Position type. Use this type to represent positions (e.g. in a container) that cannot be negative (contrary to Index ).
|
|
Unnamed property type. Use this type to represent (unnamed) properties.
|
|
Real type. Use this type to represent standard floating point numbers.
|
|
Size type. Use this type to represent sizes of containers, sequences or alike. Variables of type Size are unsigned.
|
|
Time type. Use this type to represent a point in time (as a replaecement for time_t).
|
|
Output operator for exceptions. All BALL exceptions can be printed to an arbitrary output stream. Information written contains the exception class, the error message, and the location (file, line number). The following code block can thus be used to catch any BALL exceptions and convert them to human readable information: try { .... // some code which potentially throws an exception } catch (Exception::GeneralException e) { Log.error() << "caught exception: " << e << std::endl; } |
|
Returns a unique name for a class.
This name contains no blanks. It is usually derived by substituting all blanks in the name (as returned by RTTI::getName()) with underscores ("_"). In the case of
|