Open Inventor
Release 2024.2.1
Loading...
Searching...
No Matches
SoSubRasterImageRW.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 : C. OGNIER (Jun 2003)
22
**=======================================================================*/
23
24
25
#ifndef _SOSUBIMAGERASTERRW_
26
#define _SOSUBIMAGERASTERRW_
27
28
#include <Inventor/SoType.h>
29
31
//
32
// Internal initialization macros
33
//
34
#define SO_IMAGE_RASTER_RW_SOURCE(parent, className, classPrintName) \
35
\
36
SoType className::m_classTypeId; \
37
\
38
SoType \
39
className::getClassTypeId() \
40
{ \
41
return m_classTypeId; \
42
} \
43
\
44
SoType \
45
className::getTypeId() const \
46
{ \
47
return m_classTypeId; \
48
} \
49
\
50
void \
51
className::initClass() \
52
{ \
53
if ( m_classTypeId.isBad() ) { \
54
if (parent::getClassTypeId().isBad() ) \
55
parent::initClass(); \
56
m_classTypeId = SoType::createType(parent::getClassTypeId(), classPrintName, &className::createInstance); \
57
} \
58
} \
59
\
60
void \
61
className::exitClass() \
62
{ \
63
if ( m_classTypeId != SoType::badType() ) { \
64
SoType::removeType(m_classTypeId.getName()); \
65
m_classTypeId = SoType::badType(); \
66
} \
67
} \
68
void* \
69
className::createInstance(SoType *) \
70
{ \
71
return (void *)(new className); \
72
}
73
74
75
#define SO_IMAGE_RASTER_RW_ABSTRACT_SOURCE(className, classPrintName) \
76
\
77
SoType className::m_classTypeId; \
78
\
79
SoType \
80
className::getClassTypeId() \
81
{ \
82
return m_classTypeId; \
83
} \
84
\
85
void \
86
className::initClass() \
87
{ \
88
if ( m_classTypeId.isBad() ) { \
89
m_classTypeId = SoType::createType(SoType::badType(), classPrintName); \
90
} \
91
} \
92
\
93
void \
94
className::exitClass() \
95
{ \
96
if ( m_classTypeId != SoType::badType() ) { \
97
SoType::removeType(m_classTypeId.getName()); \
98
m_classTypeId = SoType::badType(); \
99
} \
100
}
101
102
103
104
#define SO_IMAGE_RASTER_RW_HEADER() \
105
public: \
106
\
107
virtual SoType getTypeId() const; \
108
\
109
static SoType getClassTypeId(); \
110
private: \
111
static void initClass(); \
112
static void exitClass(); \
113
static void *createInstance(SoType* dynamicType = 0); \
114
\
115
private: \
116
static SoType m_classTypeId;
117
118
#define SO_IMAGE_RASTER_RW_ABSTRACT_HEADER() \
119
public: \
120
\
121
virtual SoType getTypeId() const = 0; \
122
\
123
static SoType getClassTypeId(); \
124
private: \
125
static void initClass(); \
126
static void exitClass(); \
127
\
128
private: \
129
static SoType m_classTypeId;
130
131
#endif
132
Inventor
image
SoSubRasterImageRW.h
Generated by
1.9.8