|
ALBA
|
#include <mutex>#include <string.h>#include <typeinfo>#include <iosfwd>#include <sstream>#include "albaConfigure.h"#include "albaIncludeWX.h"
Go to the source code of this file.
Macros | |
| #define | MIN(x, y) ( (x) < (y) ? (x) : (y) ) |
| #define | MAX(x, y) ( (x) > (y) ? (x) : (y) ) |
| #define | round(x) (x<0?ceil((x)-0.5):floor((x)+0.5)) |
| #define | ID_NO_EVENT 0 |
| #define | ALBA_STRING_BUFFER_SIZE 2048 |
| #define | vtkDEL(a) do{if (a) { a->Delete(); a = NULL; }}while(0) |
| #define | vtkNEW(a) a=a->New() |
| #define | albaNEW(a) do{a=a->New();a->Register(this);}while(0) |
| #define | albaDEL(a) do{if (a) { a->Delete(); a = NULL;}}while(0) |
| #define | cppDEL(a) do{if (a) { delete a; a = NULL;}}while(0) |
| #define | albaAbstractTypeMacro(thisClass, superclass) |
| #define | albaTypeMacro(thisClass, superclass) |
| #define | albaCxxAbstractTypeMacro(thisClass) |
| #define | albaCxxTypeMacro(thisClass) |
| #define | IsALBAType(type_name) IsA(type_name::GetStaticTypeId()) |
| #define | albaEventMacro(e) if (m_Listener) {m_Listener->OnEvent(&e);} |
| #define | ALBA_TEST(a) |
| #define | albaWarningMacro(x) |
| #define | albaErrorMacro(x) |
| #define | albaWarningMessageMacro(x) |
| #define | albaErrorMessageMacro(x) |
| #define | albaMessageMacro(x) |
| #define | ALBA_PRINT_MACRO(format, buffer, size) |
Typedefs | |
| typedef double | albaTimeStamp |
| typedef long | albaID |
| typedef std::type_info | albaTypeID |
Functions | |
| ALBA_EXPORT void | albaLogMessage (const char *format,...) |
| ALBA_EXPORT void | albaWarningMessage (const char *format,...) |
| ALBA_EXPORT void | albaErrorMessage (const char *format,...) |
| ALBA_EXPORT void | albaMessage (const char *format,...) |
| ALBA_EXPORT bool | albaEquals (double x, double y) |
| ALBA_EXPORT bool | albaFloatEquals (float x, float y) |
| ALBA_EXPORT double | albaRoundToPrecision (double val, unsigned prec) |
| ALBA_EXPORT bool | albaIsLittleEndian (void) |
| ALBA_EXPORT void | albaSleep (int msec) |
Variables | |
| enum ALBA_EXPORT | ALBA_RETURN_VALUES_ID |
| ALBA_OK = 0 | |
| ALBA_ERROR | |
| ALBA_WAIT | |
| #define MIN | ( | x, | |
| y | |||
| ) | ( (x) < (y) ? (x) : (y) ) |
Standard macros and constants for the ALBA library.
This file include all the standard macros and constants used inside the ALBA library.
Definition at line 48 of file albaDefines.h.
| #define MAX | ( | x, | |
| y | |||
| ) | ( (x) > (y) ? (x) : (y) ) |
Definition at line 51 of file albaDefines.h.
| #define round | ( | x | ) | (x<0?ceil((x)-0.5):floor((x)+0.5)) |
Definition at line 54 of file albaDefines.h.
| #define ID_NO_EVENT 0 |
Definition at line 74 of file albaDefines.h.
| #define ALBA_STRING_BUFFER_SIZE 2048 |
Definition at line 80 of file albaDefines.h.
| #define vtkDEL | ( | a | ) | do{if (a) { a->Delete(); a = NULL; }}while(0) |
Delete a VTK object.
Definition at line 122 of file albaDefines.h.
| #define vtkNEW | ( | a | ) | a=a->New() |
Allocate a new VTK object: don't worry, New is a static member function!
Definition at line 125 of file albaDefines.h.
| #define albaNEW | ( | a | ) | do{a=a->New();a->Register(this);}while(0) |
Allocate a new ALBA object: don't worry, New is a static member function!
Definition at line 128 of file albaDefines.h.
| #define albaDEL | ( | a | ) | do{if (a) { a->Delete(); a = NULL;}}while(0) |
Delete a ALBA object.
Definition at line 131 of file albaDefines.h.
| #define cppDEL | ( | a | ) | do{if (a) { delete a; a = NULL;}}while(0) |
delete a new() allocated object
Definition at line 134 of file albaDefines.h.
| #define albaAbstractTypeMacro | ( | thisClass, | |
| superclass | |||
| ) |
Macro used by albaObjects for RTTI information.
This macro must be placed in the class definition public section.
Definition at line 139 of file albaDefines.h.
| #define albaTypeMacro | ( | thisClass, | |
| superclass | |||
| ) |
Macro used by albaObjects for RTTI information.
This macro must be placed in the class definition public section.
Definition at line 165 of file albaDefines.h.
| #define albaCxxAbstractTypeMacro | ( | thisClass | ) |
Macro used by albaObjects for RTTI information.
This macor must be placed in the .cpp file.
Definition at line 179 of file albaDefines.h.
| #define albaCxxTypeMacro | ( | thisClass | ) |
Macro used by albaObjects for RTTI information.
This macro must be placed in the .cpp file.
Definition at line 196 of file albaDefines.h.
| #define IsALBAType | ( | type_name | ) | IsA(type_name::GetStaticTypeId()) |
Shortcut for type checking.
Definition at line 212 of file albaDefines.h.
| #define albaEventMacro | ( | e | ) | if (m_Listener) {m_Listener->OnEvent(&e);} |
The ids of the events are static: add them to MAIN_EVENT_ID in albaDecl.h.
Use mmuIdFactory only for ids that are really dynamic, see its comment. albaEventMacro is an handy shortcut to send an Event.
Definition at line 218 of file albaDefines.h.
| #define ALBA_TEST | ( | a | ) |
Helper macro used for testing.
Definition at line 221 of file albaDefines.h.
| #define albaWarningMacro | ( | x | ) |
Macro for printing Warning messages in log area.
This macro also displays line at which error was printed.
Definition at line 231 of file albaDefines.h.
| #define albaErrorMacro | ( | x | ) |
Macro for printing Error messages in log area.
This macro also displays line at which error was printed.
Definition at line 242 of file albaDefines.h.
| #define albaWarningMessageMacro | ( | x | ) |
Macro for displaying Warning messages.
Definition at line 252 of file albaDefines.h.
| #define albaErrorMessageMacro | ( | x | ) |
Macro for displaying Error messages.
Definition at line 261 of file albaDefines.h.
| #define albaMessageMacro | ( | x | ) |
Macro for displaying messages.
Definition at line 270 of file albaDefines.h.
| #define ALBA_PRINT_MACRO | ( | format, | |
| buffer, | |||
| size | |||
| ) |
Macro for formatted printing to string (adapted from wxWidgets IMPLEMENT_LOG_FUNCTION) To use it you will need to include <stdio.h>, <stdarg.h> and <varargs.h> This is less safe since it can't limit output string size.
Definition at line 281 of file albaDefines.h.
| typedef double albaTimeStamp |
type for time varying data timestamps (not for pipelines timestamps!)
Definition at line 60 of file albaDefines.h.
| typedef long albaID |
type for IDs inside ALBA
Definition at line 61 of file albaDefines.h.
| typedef std::type_info albaTypeID |
type for albaObject's class type IDs
Definition at line 62 of file albaDefines.h.
| ALBA_EXPORT void albaLogMessage | ( | const char * | format, |
| ... | |||
| ) |
write a message in the log area
Referenced by albaGizmoSlice::SetModalityToGlobal().
| ALBA_EXPORT void albaWarningMessage | ( | const char * | format, |
| ... | |||
| ) |
open a warning dialog and write a message
| ALBA_EXPORT void albaErrorMessage | ( | const char * | format, |
| ... | |||
| ) |
open an error dialog and write a message
| ALBA_EXPORT void albaMessage | ( | const char * | format, |
| ... | |||
| ) |
open a message dialog and write a message
| ALBA_EXPORT bool albaEquals | ( | double | x, |
| double | y | ||
| ) |
reliable comparison test for floating point numbers.
Extracted from article: "Work Around Floating-Point Accuracy/Comparison Problems" Article ID: Q69333 of MSDN library
Referenced by albaMatrix::SetTimeStamp(), and albaTransformBase::SetTimeStamp().
| ALBA_EXPORT bool albaFloatEquals | ( | float | x, |
| float | y | ||
| ) |
| ALBA_EXPORT double albaRoundToPrecision | ( | double | val, |
| unsigned | prec | ||
| ) |
retrieve the double value with the desired precision
| ALBA_EXPORT bool albaIsLittleEndian | ( | void | ) |
return true if it's little endian
| ALBA_EXPORT void albaSleep | ( | int | msec | ) |
wait for given milliseconds
| enum ALBA_EXPORT ALBA_RETURN_VALUES_ID |
Definition at line 67 of file albaDefines.h.
| ALBA_OK = 0 |
Definition at line 69 of file albaDefines.h.
Referenced by albaStorableDictionary::InternalStore(), and albaTimeMap< T >::RemoveItem().
| ALBA_ERROR |
Definition at line 70 of file albaDefines.h.
Referenced by albaTimeMap< T >::RemoveItem().
| ALBA_WAIT |
Definition at line 71 of file albaDefines.h.