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) |
Adds type to list of allowed types. More... | |
template<typename T > | |
void | addAllowedType () |
Same as above, with template parameter where the Base type can be specified directly. More... | |
std::vector< const ml::RuntimeType * > | getAllowedTypes () const |
Returns a list of allowed Base types for this field. More... | |
bool | hasUnallowedType () const |
Returns true if the last call of setBaseValue had an unallowed type as argument, getBaseValue will return NULL then. More... | |
virtual void | setValue (ml::Base *mlBasePtr) |
Field access implementation. More... | |
virtual ml::Base * | getValue () const |
SbBool | readValue (SoInput *in) override |
void | writeValue (SoOutput *out) const override |
template<class Type > | |
Type | getTypedValue () |
Returns a Base pointer of given Type, returns NULL if the base object is not derived from Type. More... | |
Static Public Member Functions | |
static void | initClass () |
Initializes field class, setting up runtime type info. More... | |
Protected Attributes | |
ml::Base * | _value |
Pointer to the stored base object. More... | |
std::vector< const ml::RuntimeType * > | _allowedTypes |
List of allowed Base types. If empty, any type is allowed. More... | |
bool | _unallowedType |
Remember if an unallowed type was assigned to this field. More... | |
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 whether 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.
|
inline |
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 | ) |
Adds type to list of allowed types.
This will set the Base value to NULL if it is not 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 |
Returns a list of allowed Base types for this field.
Definition at line 79 of file SoSFMLBase.h.
|
inline |
Returns a Base pointer of given Type, returns NULL if the base object is not derived from Type.
Definition at line 63 of file SoSFMLBase.h.
|
virtual |
|
inline |
Returns 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.
|
static |
Initializes field class, setting up runtime type info.
|
override |
|
virtual |
Field access implementation.
|
override |
|
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.