MeVisLab Toolbox Reference
|
#include "mlImageVector.h"
#include "mlInitSystemML.h"
#include "mlRuntimeType.h"
#include "mlRuntimeSubClass.h"
#include "mlSubImageBox.h"
#include "mlVector2.h"
#include "mlVector3.h"
#include "mlVector4.h"
#include "mlVector6.h"
#include <string>
Go to the source code of this file.
Classes | |
class | ml::TreeNodeException |
The class TreeNodeException is the base class for all exceptions thrown by the class TreeNode and all derived classes. More... | |
class | ml::TreeNode |
The class TreeNode is the abstract base class for the import/export of ML objects. More... | |
Namespaces | |
namespace | ml |
Main documentation file for ML users and developers. | |
Macros | |
#define | TREE_NODE_CHECK_THROW(x) { if (!(x)) throw TreeNodeException(TNE_UserDefined, #x); } |
Macro to throw a TreeNodeException from reading/writing if a condition is not satisfied. | |
#define | VOID_IMPLEMENTATION(which) { throw TreeNodeException(TNE_VoidImplementation, which); } |
Standard body for a method in this interface class. | |
#define | VOID_IMPLEMENTATION_RET(which, R) { if (MLAlwaysTrue){ throw TreeNodeException(TNE_VoidImplementation, which); } return R; } |
Standard body for a method in this interface class. | |
#define | ADD_LONG_CHILD { addChild(static_cast<long>(val), name); } |
For each signed integer type, addChild(long) is called by default. | |
#define | ADD_ULONG_CHILD { addChild(static_cast<unsigned long>(val), name); } |
For each unsigned integer type, addChild(ulong) is called by default. | |
#define | ADD_LDOUBLE_CHILD { addChild(static_cast<long double>(val), name); } |
For each floating point type, addChild(LDouble) is called by default. | |
#define | READ_LONG_CHILD(DST_TYPE) { long lval=0; readChild(lval, name); val = static_cast<DST_TYPE>(lval); } |
For each signed integer type, readChild(Long) is called by default and the results is simply casted to the original type. | |
#define | READ_ULONG_CHILD(DST_TYPE) { unsigned long lval=0; readChild(lval, name); val = static_cast<DST_TYPE>(lval); } |
For each unsigned integer type, readChild(ULong) is called by default and the results is simply casted to the original type. | |
#define | READ_LDOUBLE_CHILD(DST_TYPE) { long double ldval=0; readChild(ldval, name); val = static_cast<DST_TYPE>(ldval); } |
For each floating point type, readChild(LDouble) is called by default and the results is simply casted to the original type. | |
#define | READ_LONG_CHILD_FOR_BOOL { long lval=0; readChild(lval, name); val = (lval!=0); } |
For each signed integer type, readChild(Long) is called by default and the results is simply casted to the original type. | |
Macros | |
#define | ML_READCHILD_OPTIONAL(obj, tagName, defaultVal) |
Convenience macro that can be used to read an optional child with name tagName into obj and assign a default value defaultVal if it is not found. | |
#define | ML_ADDSTATE_VERSION(ThisClass) parent->setVersion("#ThisClass#", ThisClass::getAddStateVersion()); |
Use this macro in addStateToTree() for classes that might need versioning in the future. | |
#define | ML_ADDSTATE_SUPER(SuperClass) |
Use this macro if you would like to store your super class members as well. | |
#define | ML_READSTATE_SUPER(SuperClass) |
Use this macro if you would like to store your super class members as well. | |
#define | ML_TREE_NODE_SUPPORT_VIA_PERSISTENT_STATE |
This macro can be useful when you already implemented the get/setPersistentState() methods but you would also like to support for the TreeNode import/export methods without any extra efforts. | |
#define ADD_LDOUBLE_CHILD { addChild(static_cast<long double>(val), name); } |
For each floating point type, addChild(LDouble) is called by default.
Definition at line 177 of file mlTreeNode.h.
#define ADD_LONG_CHILD { addChild(static_cast<long>(val), name); } |
For each signed integer type, addChild(long) is called by default.
Definition at line 171 of file mlTreeNode.h.
#define ADD_ULONG_CHILD { addChild(static_cast<unsigned long>(val), name); } |
For each unsigned integer type, addChild(ulong) is called by default.
Definition at line 174 of file mlTreeNode.h.
#define ML_ADDSTATE_SUPER | ( | SuperClass | ) |
Use this macro if you would like to store your super class members as well.
Mandatory if the superclass uses versioning.
Definition at line 639 of file mlTreeNode.h.
Referenced by ml::ListTemplate< T >::addStateToTree(), and ml::BaseListTemplate< T >::addStateToTree().
#define ML_ADDSTATE_VERSION | ( | ThisClass | ) | parent->setVersion("#ThisClass#", ThisClass::getAddStateVersion()); |
Use this macro in addStateToTree() for classes that might need versioning in the future.
Definition at line 635 of file mlTreeNode.h.
Referenced by ml::ListTemplate< T >::addStateToTree(), and ml::BaseListTemplate< T >::addStateToTree().
#define ML_READCHILD_OPTIONAL | ( | obj, | |
tagName, | |||
defaultVal ) |
Convenience macro that can be used to read an optional child with name tagName
into obj
and assign a default value defaultVal
if it is not found.
Definition at line 626 of file mlTreeNode.h.
Referenced by ml::ListTemplate< T >::readStateFromTree(), and ml::BaseListTemplate< T >::readStateFromTree().
#define ML_READSTATE_SUPER | ( | SuperClass | ) |
Use this macro if you would like to store your super class members as well.
Mandatory if the superclass uses versioning.
Definition at line 646 of file mlTreeNode.h.
Referenced by ml::ListTemplate< T >::readStateFromTree(), and ml::BaseListTemplate< T >::readStateFromTree().
#define ML_TREE_NODE_SUPPORT_VIA_PERSISTENT_STATE |
This macro can be useful when you already implemented the get/setPersistentState() methods but you would also like to support for the TreeNode import/export methods without any extra efforts.
It is however recommended that you implement those methods specifically for your class (adding all class members as children of the parent node) instead of using this macro.
addStateToTree() simply attaches the persistent state returned by getPersistentState() as a string child node, while readStateFromTree() allows reading of such a child.
Definition at line 659 of file mlTreeNode.h.
#define READ_LDOUBLE_CHILD | ( | DST_TYPE | ) | { long double ldval=0; readChild(ldval, name); val = static_cast<DST_TYPE>(ldval); } |
For each floating point type, readChild(LDouble) is called by default and the results is simply casted to the original type.
Definition at line 189 of file mlTreeNode.h.
#define READ_LONG_CHILD | ( | DST_TYPE | ) | { long lval=0; readChild(lval, name); val = static_cast<DST_TYPE>(lval); } |
For each signed integer type, readChild(Long) is called by default and the results is simply casted to the original type.
Definition at line 181 of file mlTreeNode.h.
For each signed integer type, readChild(Long) is called by default and the results is simply casted to the original type.
Definition at line 193 of file mlTreeNode.h.
#define READ_ULONG_CHILD | ( | DST_TYPE | ) | { unsigned long lval=0; readChild(lval, name); val = static_cast<DST_TYPE>(lval); } |
For each unsigned integer type, readChild(ULong) is called by default and the results is simply casted to the original type.
Definition at line 185 of file mlTreeNode.h.
Macro to throw a TreeNodeException from reading/writing if a condition is not satisfied.
Definition at line 142 of file mlTreeNode.h.
Standard body for a method in this interface class.
Definition at line 162 of file mlTreeNode.h.
#define VOID_IMPLEMENTATION_RET | ( | which, | |
R ) { if (MLAlwaysTrue){ throw TreeNodeException(TNE_VoidImplementation, which); } return R; } |
Standard body for a method in this interface class.
The implementation also returns NULL to avoid compiler warnings. Use "if (MLIsAlwaysTrue)" and "return R;" to avoid silly compilers which warn unreachable code if return is written after throw but also missing returns in functions if return is not written.
Definition at line 168 of file mlTreeNode.h.