MeVisLabToolboxReference
MeVis/Foundation/Sources/MLInventorBinding/SoSFMLConnector.h
Go to the documentation of this file.
00001 #ifndef __SoSFMLConnector_H
00002 #define __SoSFMLConnector_H
00003 //----------------------------------------------------------------------------------
00004 // **InsertLicense** code
00005 //----------------------------------------------------------------------------------
00008 
00013 //----------------------------------------------------------------------------------
00014 
00015 #ifndef __InventorWrapperDllInit_H
00016 #include "InventorWrapperDllInit.h"
00017 #endif
00018 
00019 #include "XVEnterScope.h"
00020 
00021 #include <Inventor/fields/SoSubField.h>
00022 #include <Inventor/SbLinear.h>
00023 
00024 #include "XVLeaveScope.h"
00025 
00026 #ifndef __mlDataTypes_H
00027 #include <mlDataTypes.h>
00028 #endif
00029 
00030 
00031 //=============================================================
00035 /* This class is merely a wrapper around a void* that can
00036 be passed to the outside world (e.g ILAB 4)
00037 (notification is currently not supported, so
00038 the field has to be setup in the constructor of the
00039 class using this field).
00040 It may be used in nodes that have internal ML modules
00041 and want to output the inputs/outputs of those modules
00042 in a MeVisLab network (e.g. see the SoExaminerViewer or the SoOrthoView2D)
00043 */
00044 //=============================================================
00045 class INVENTORWRAPPER_API SoSFMLConnector : public SoSField {
00046 
00047     // use standard field stuff
00048     SO_SFIELD_CONSTRUCTOR_HEADER(SoSFMLConnector);
00049     SO_SFIELD_REQUIRED_HEADER(SoSFMLConnector);
00050 
00051  public:
00053    static void    initClass();
00054 
00056   virtual void  setValue(void* mlFieldPtr);
00057   virtual void* getValue() { return _mlFieldPtr; };
00058   virtual int   readValue(SoInput* in);
00059   virtual void  writeValue(SoOutput* out) const;
00061 
00062  protected:
00064    void* _mlFieldPtr;
00065 };
00066 
00067 
00068 #endif