MeVisLab Toolbox Reference
SoSFMLConnector.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef SO_SFMLCONNECTOR_H
14#define SO_SFMLCONNECTOR_H
15
18
20
21#include <ThirdPartyWarningsDisable.h>
22#include <Inventor/fields/SoSubField.h>
23#include <Inventor/SbLinear.h>
24#include <ThirdPartyWarningsRestore.h>
25
26#include <mlDataTypes.h>
27
28
29//=============================================================
32
33/* This class is merely a wrapper around a void* that can
34be passed to the outside world (e.g ILAB 4)
35(notification is currently not supported, so
36the field has to be setup in the constructor of the
37class using this field).
38It may be used in nodes that have internal ML modules
39and want to output the inputs/outputs of those modules
40in a MeVisLab network (e.g. see the SoExaminerViewer or the SoOrthoView2D)
41*/
42//=============================================================
43class INVENTORWRAPPER_API SoSFMLConnector : public SoSField {
44
45 // use standard field stuff
46 SO_SFIELD_CONSTRUCTOR_HEADER(SoSFMLConnector);
47 SO_SFIELD_REQUIRED_HEADER(SoSFMLConnector);
48
49 public:
51 static void initClass();
52
54 virtual void setValue(void* mlFieldPtr);
55 virtual void* getValue() { return _mlFieldPtr; };
56 SbBool readValue(SoInput* in) override;
57 void writeValue(SoOutput* out) const override;
59
60 protected:
63};
64
65
66#endif
#define INVENTORWRAPPER_API
Library initialization and export macros for platform independecy of project.
SoSFMLConnector field is the interface used by Inventor Nodes to output input/output ML Connector Fie...
static void initClass()
Initializes field class, setting up runtime type info.
virtual void * getValue()
virtual void setValue(void *mlFieldPtr)
Field access.
SbBool readValue(SoInput *in) override
void writeValue(SoOutput *out) const override
void * _mlFieldPtr
pointer to internal field
Target mlrange_cast(Source arg)
Generic version of checked ML casts.