MeVisLab Resolution Independence API
Toggle main menu visibility
Loading...
Searching...
No Matches
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
27
class
SoGLRenderAction;
28
class
SoCallbackAction;
29
class
SoGetBoundingBoxAction;
30
class
SoGetMatrixAction;
31
class
SoHandleEventAction;
32
class
SoPickAction;
33
class
SoRayPickAction;
34
class
SoSearchAction;
35
class
SoWriteAction;
36
37
// Declare SoActionLog node being a subnode of a SoNode
38
class
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
SoSFBool
traceGLRender
;
49
SoSFBool
traceCallback
;
50
SoSFBool
traceGetBoundingBox
;
51
SoSFBool
traceGetMatrix
;
52
SoSFBool
traceHandleEvent
;
53
SoSFBool
traceLocation2Event
;
54
SoSFBool
traceLocation2RefreshEvent
;
55
SoSFBool
traceMouseButtonEvent
;
56
SoSFBool
traceKeyboardEvent
;
57
SoSFBool
traceEnterLeaveEvent
;
58
SoSFBool
traceMouseWheelEvent
;
59
SoSFBool
traceUnknownEvent
;
60
SoSFBool
tracePick
;
61
SoSFBool
traceRayPick
;
62
SoSFBool
traceSearch
;
63
SoSFBool
traceWrite
;
64
65
SoSFBool
printViewerId
;
66
68
SoSFBool
logToConsole
;
69
71
SoSFBool
logToString
;
73
SoSFString
jsonLog
;
74
76
SoSFTrigger
clearLog
;
77
79
SoActionLog
();
80
81
protected
:
83
~SoActionLog
()
override
;
84
85
public
:
87
void
GLRender
(SoGLRenderAction* action)
override
;
88
void
callback
(SoCallbackAction* action)
override
;
89
void
getBoundingBox
(SoGetBoundingBoxAction* action)
override
;
90
void
getMatrix
(SoGetMatrixAction* action)
override
;
91
void
handleEvent
(SoHandleEventAction* action)
override
;
92
void
pick
(SoPickAction* action)
override
;
93
void
rayPick
(SoRayPickAction* action)
override
;
94
void
search
(SoSearchAction* action)
override
;
95
void
write
(SoWriteAction* action)
override
;
96
98
static
void
initClass
();
99
100
private
:
101
void
addEntryToJSON(
const
std::string& str);
102
103
void
clearLogChangedCB(SoField* field);
104
105
void
* getViewerId(SoAction* action);
106
std::string getViewerIdEntry(SoAction* action);
107
};
108
109
#endif
// _SOACTIONLOG_H
SoActionLog::~SoActionLog
~SoActionLog() override
Destructor.
SoActionLog::traceUnknownEvent
SoSFBool traceUnknownEvent
Definition
SoActionLog.h:59
SoActionLog::write
void write(SoWriteAction *action) override
SoActionLog::tracePick
SoSFBool tracePick
Definition
SoActionLog.h:60
SoActionLog::traceLocation2Event
SoSFBool traceLocation2Event
Definition
SoActionLog.h:53
SoActionLog::traceEnterLeaveEvent
SoSFBool traceEnterLeaveEvent
Definition
SoActionLog.h:57
SoActionLog::traceMouseWheelEvent
SoSFBool traceMouseWheelEvent
Definition
SoActionLog.h:58
SoActionLog::traceGetBoundingBox
SoSFBool traceGetBoundingBox
Definition
SoActionLog.h:50
SoActionLog::clearLog
SoSFTrigger clearLog
clears jsonLog immediately
Definition
SoActionLog.h:76
SoActionLog::handleEvent
void handleEvent(SoHandleEventAction *action) override
SoActionLog::traceWrite
SoSFBool traceWrite
Definition
SoActionLog.h:63
SoActionLog::logToString
SoSFBool logToString
flag to enable logging to jsonLog string
Definition
SoActionLog.h:71
SoActionLog::traceCallback
SoSFBool traceCallback
Definition
SoActionLog.h:49
SoActionLog::search
void search(SoSearchAction *action) override
SoActionLog::traceRayPick
SoSFBool traceRayPick
Definition
SoActionLog.h:61
SoActionLog::GLRender
void GLRender(SoGLRenderAction *action) override
Action handlers.
SoActionLog::pick
void pick(SoPickAction *action) override
SoActionLog::getMatrix
void getMatrix(SoGetMatrixAction *action) override
SoActionLog::logToConsole
SoSFBool logToConsole
flag to enable logging to console
Definition
SoActionLog.h:68
SoActionLog::initClass
static void initClass()
Register this node with the Open Inventor runtime system.
SoActionLog::traceHandleEvent
SoSFBool traceHandleEvent
Definition
SoActionLog.h:52
SoActionLog::traceSearch
SoSFBool traceSearch
Definition
SoActionLog.h:62
SoActionLog::traceGLRender
SoSFBool traceGLRender
Definition
SoActionLog.h:48
SoActionLog::callback
void callback(SoCallbackAction *action) override
SoActionLog::traceKeyboardEvent
SoSFBool traceKeyboardEvent
Definition
SoActionLog.h:56
SoActionLog::getBoundingBox
void getBoundingBox(SoGetBoundingBoxAction *action) override
SoActionLog::traceLocation2RefreshEvent
SoSFBool traceLocation2RefreshEvent
Definition
SoActionLog.h:54
SoActionLog::SoActionLog
SoActionLog()
Constructor.
SoActionLog::traceMouseButtonEvent
SoSFBool traceMouseButtonEvent
Definition
SoActionLog.h:55
SoActionLog::traceGetMatrix
SoSFBool traceGetMatrix
Definition
SoActionLog.h:51
SoActionLog::printViewerId
SoSFBool printViewerId
Definition
SoActionLog.h:65
SoActionLog::rayPick
void rayPick(SoRayPickAction *action) override
SoActionLog::jsonLog
SoSFString jsonLog
contains the logged events in JSON format
Definition
SoActionLog.h:73
MeVisLab
Standard
Sources
Inventor
SoUtils
SoActionLog.h
Generated by
1.18.0