MeVisLab Toolbox Reference
SoActionLog.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2013, 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_ACTION_LOG_H
14#define SO_ACTION_LOG_H
15
16// Include base-class header.
17#include <Inventor/nodes/SoSubNode.h>
18// Include field headers.
19#include <Inventor/fields/SoSFBool.h>
20#include <Inventor/fields/SoSFString.h>
21#include <Inventor/fields/SoSFTrigger.h>
22#include <Inventor/sensors/SoFieldSensor.h>
23
24#include <string>
25
26// Forward declarations
32class SoPickAction;
33class SoRayPickAction;
34class SoSearchAction;
35class SoWriteAction;
36
37// Declare SoActionLog node being a subnode of a SoNode
38class SoActionLog : public SoNode
39{
40 // Make a typedef of the parent type to allow easier adaptation of
41 // the sourcecode if the parent node should change.
42 typedef SoNode inherited;
43
44 // Insert sourcecode common to all subnodes of Open-Inventor.
45 SO_NODE_HEADER(SoActionLog);
46
47 public:
48
65
67
70
75
78
81
82 protected:
83
85 ~SoActionLog() override;
86
87 public:
88
95 void pick(SoPickAction *action) override;
97 void search(SoSearchAction *action) override;
98 void write(SoWriteAction *action) override;
99
101 static void initClass();
102
103 private:
104 void addEntryToJSON(const std::string& str);
105
106 void clearLogChangedCB(SoField* field);
107
108 void* getViewerId(SoAction* action);
109 std::string getViewerIdEntry(SoAction* action);
110};
111
112#endif // _SOACTIONLOG_H
~SoActionLog() override
Destructor.
SoSFBool traceUnknownEvent
Definition SoActionLog.h:60
void write(SoWriteAction *action) override
SoSFBool tracePick
Definition SoActionLog.h:61
SoSFBool traceLocation2Event
Definition SoActionLog.h:54
SoSFBool traceEnterLeaveEvent
Definition SoActionLog.h:58
SoSFBool traceMouseWheelEvent
Definition SoActionLog.h:59
SoSFBool traceGetBoundingBox
Definition SoActionLog.h:51
SoSFTrigger clearLog
clears jsonLog immediately
Definition SoActionLog.h:77
void handleEvent(SoHandleEventAction *action) override
SoSFBool traceWrite
Definition SoActionLog.h:64
SoSFBool logToString
flag to enable logging to jsonLog string
Definition SoActionLog.h:72
SoSFBool traceCallback
Definition SoActionLog.h:50
void search(SoSearchAction *action) override
SoSFBool traceRayPick
Definition SoActionLog.h:62
void GLRender(SoGLRenderAction *action) override
Action handlers.
void pick(SoPickAction *action) override
void getMatrix(SoGetMatrixAction *action) override
SoSFBool logToConsole
flag to enable logging to console
Definition SoActionLog.h:69
static void initClass()
Register this node with the Open Inventor runtime system.
SoSFBool traceHandleEvent
Definition SoActionLog.h:53
SoSFBool traceSearch
Definition SoActionLog.h:63
SoSFBool traceGLRender
Definition SoActionLog.h:49
void callback(SoCallbackAction *action) override
SoSFBool traceKeyboardEvent
Definition SoActionLog.h:57
void getBoundingBox(SoGetBoundingBoxAction *action) override
SoSFBool traceLocation2RefreshEvent
Definition SoActionLog.h:55
SoActionLog()
Constructor.
SoSFBool traceMouseButtonEvent
Definition SoActionLog.h:56
SoSFBool traceGetMatrix
Definition SoActionLog.h:52
SoSFBool printViewerId
Definition SoActionLog.h:66
void rayPick(SoRayPickAction *action) override
SoSFString jsonLog
contains the logged events in JSON format
Definition SoActionLog.h:74
Target mlrange_cast(Source arg)
Generic version of checked ML casts.