MeVisLab Toolbox Reference
|
The SoSFMLBase field is the interface used by Inventor Nodes to output ML Base objects to the outside world. More...
#include <SoSFMLBase.h>
Public Member Functions | |
void | addAllowedType (const ml::RuntimeType *allowedType) |
Add type to list of allowed types. | |
template<typename T > | |
void | addAllowedType () |
Same as above, with template parameter where the Base type can be specified directly. | |
std::vector< const ml::RuntimeType * > | getAllowedTypes () const |
Get list of allowed Base types for this field. | |
bool | hasUnallowedType () const |
return true if the last call of setBaseValue had an unallowed type as argument, getBaseValue will return NULL then | |
virtual void | setValue (ml::Base *mlBasePtr) |
Field access implementation. | |
virtual ml::Base * | getValue () const |
SbBool | readValue (SoInput *in) override |
void | writeValue (SoOutput *out) const override |
template<class Type > | |
Type | getTypedValue () |
Get a Base pointer of given Type, returns NULL is the base object is not derived from Type. | |
Static Public Member Functions | |
static void | initClass () |
Initializes field class, setting up runtime type info. | |
Protected Attributes | |
ml::Base * | _value |
pointer to the stored base object | |
std::vector< const ml::RuntimeType * > | _allowedTypes |
List of allowed Base types. If empty, any type is allowed. | |
bool | _unallowedType |
remember if an unallowed type was assigned to this field | |
bool | _isRefCountedBase |
The SoSFMLBase field is the interface used by Inventor Nodes to output ML Base objects to the outside world.
The SoSFMLBase field is the interface used by Inventor Nodes to output ML Base objects to the outside world
The initial value for input fields should be NULL. MeVisLab uses the name of the field to decide if it is an input or output field. If the name starts with out
, it is an output field. Reading and writing to a scene is not implemented.
Definition at line 45 of file SoSFMLBase.h.
Same as above, with template parameter where the Base type can be specified directly.
Definition at line 76 of file SoSFMLBase.h.
References addAllowedType().
Referenced by addAllowedType().
void SoSFMLBase::addAllowedType | ( | const ml::RuntimeType * | allowedType | ) |
Add type to list of allowed types.
This will set the Base value to NULL if it isn't NULL already and should only be called when initializing the SoSFMLField. Calls to setValue (or setStringValue) will only succeed if the given Base object is of one of the allowed types or NULL, or if the list is empty, otherwise NULL will be set instead.
|
inline |
Get list of allowed Base types for this field.
Definition at line 79 of file SoSFMLBase.h.
|
inline |
Get a Base pointer of given Type, returns NULL is the base object is not derived from Type.
Definition at line 63 of file SoSFMLBase.h.
References mlrange_cast().
|
inline |
return true if the last call of setBaseValue had an unallowed type as argument, getBaseValue will return NULL then
Definition at line 83 of file SoSFMLBase.h.
|
protected |
List of allowed Base types. If empty, any type is allowed.
Definition at line 90 of file SoSFMLBase.h.
|
protected |
Definition at line 94 of file SoSFMLBase.h.
|
protected |
remember if an unallowed type was assigned to this field
Definition at line 93 of file SoSFMLBase.h.
|
protected |
pointer to the stored base object
Definition at line 87 of file SoSFMLBase.h.