Open Inventor
Release 2024.2.0
Loading...
Searching...
No Matches
SoSubAuditor.h
1
/*=======================================================================
2
*** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3
*** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4
*** ***
5
*** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6
*** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7
*** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8
*** ***
9
*** RESTRICTED RIGHTS LEGEND ***
10
*** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11
*** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12
*** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13
*** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14
*** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15
*** ***
16
*** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17
*** BORDEAUX, FRANCE ***
18
*** ALL RIGHTS RESERVED ***
19
**=======================================================================*/
20
/*=======================================================================
21
** Author : Nicolas DAGUISE (Oct 2002)
22
**=======================================================================*/
23
24
#ifndef _SO_SUB_AUDITOR_
25
#define _SO_SUB_AUDITOR_
26
27
#include <Inventor/SoType.h>
28
#include <Inventor/SbString.h>
29
#include <Inventor/misc/SoBasic.h>
30
32
//
33
// These defines type-identifier and naming variables and methods that
34
// all subclasses and abstract subclasses must support.
35
//
36
37
#define SO_AUDITOR_HEADER() \
38
public: \
39
static SoType getClassTypeId();
/* Returns class type id */
\
40
\
41
virtual SoType getTypeId() const;
/* Returns type id */
\
42
private: \
43
static SoType classTypeId
/* Type id */
44
45
47
//
48
// Macros to be called within the source file for an event subclass:
49
//
50
52
//
53
// This declares the static variables defined in SO_AUDITOR_HEADER
54
//
55
56
#define SO__AUDITOR_VARS(className) \
57
SoType className::classTypeId
58
59
61
//
62
// Methods on the type
63
//
64
65
#define SO__AUDITOR_METHODS(className) \
66
\
67
SoType \
68
className::getTypeId() const \
69
{ \
70
return classTypeId; \
71
} \
72
\
73
SoType \
74
className::getClassTypeId() \
75
{ \
76
return classTypeId; \
77
}
78
80
//
81
// These include all the definitions required
82
// at file scope
83
//
84
85
#define SO_AUDITOR_SOURCE(className) \
86
SO__AUDITOR_VARS(className); \
87
SO__AUDITOR_METHODS(className)
88
89
91
//
92
// This initializes the type identifer variables defined in
93
// SO_AUDITOR_HEADER . This macro should be called from within initClass().
94
// The parentClass argument should be the class that this subclass is
95
// derived from.
96
//
97
98
#define SO_AUDITOR_INIT_CLASS_INTERNAL(className,parentClass) \
99
classTypeId = \
100
SoType::createType(parentClass::getClassTypeId(), \
101
SO__QUOTE(className))
102
103
#define SO_AUDITOR_INIT_CLASS(className,parentClass) \
104
SO_AUDITOR_INIT_CLASS_INTERNAL(className,parentClass);
105
106
#define SO_AUDITOR_EXIT_CLASS(className) \
107
SoType::removeType(SO__QUOTE(className))
108
109
#define ADD_MESSAGE_FIELD(field) \
110
message += "\n\t\t -> "; \
111
message += #field; \
112
message += " \""; \
113
message += cpt->field.getValue(); \
114
message += "\""
115
116
#define NEW_MESSAGE_GROUP(className) \
117
SbString message = "WARNING ! The DialogAuditor does not define the "; \
118
message += #className; \
119
message += " component :"
120
121
#define NEW_MESSAGE_AUDITOR(className) \
122
SbString message = "WARNING ! Auditor not defined for the "; \
123
message += #className; \
124
message += " component :"; \
125
ADD_MESSAGE_FIELD(auditorID)
126
127
#endif
/* _SO_SUB_AUDITOR_ */
128
DialogViz
auditors
SoSubAuditor.h
Generated by
1.9.8