fixed: gcc8 compile issues
[opensg.git] / Source / Contrib / ComplexSceneManager / VRMLNodes / OSGValueMultiplier.cpp
blobf44b4307b7c963ee9888f7ccbe040fc7d5337354
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2006 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #include "OSGValueMultiplier.h"
41 OSG_BEGIN_NAMESPACE
43 #define OSGSVALUEMULTIPLIER_IMPL(DESC) \
45 template<> \
46 void SValueMultiplier<DESC>::classDescInserter(TypeObject &oType) \
47 { \
48 FieldDescriptionBase *pDesc = NULL; \
51 pDesc = new SFValueType::Description( \
52 SFValueType::getClassType(), \
53 "value", \
54 "", \
55 ValueFieldId, ValueFieldMask, \
56 true, \
57 (Field::FThreadLocal), \
58 static_cast<FieldEditMethodSig>(&Self::editHandleValue), \
59 static_cast<FieldGetMethodSig >(&Self::getHandleValue)); \
61 oType.addInitialDesc(pDesc); \
63 pDesc = new SFValueType::Description( \
64 SFValueType::getClassType(), \
65 "lhs", \
66 "", \
67 LhsFieldId, LhsFieldMask, \
68 true, \
69 (Field::FThreadLocal), \
70 static_cast<FieldEditMethodSig>(&Self::editHandleLhs), \
71 static_cast<FieldGetMethodSig >(&Self::getHandleLhs)); \
73 oType.addInitialDesc(pDesc); \
75 pDesc = new SFValueType::Description( \
76 SFValueType::getClassType(), \
77 "rhs", \
78 "", \
79 RhsFieldId, RhsFieldMask, \
80 true, \
81 (Field::FThreadLocal), \
82 static_cast<FieldEditMethodSig>(&Self::editHandleRhs), \
83 static_cast<FieldGetMethodSig >(&Self::getHandleRhs)); \
85 oType.addInitialDesc(pDesc); \
87 } \
90 template<> \
91 SValueMultiplier<DESC>::TypeObject \
92 SValueMultiplier<DESC>::_type( \
93 Self::getClassname(), \
94 Inherited::getClassname(), \
95 "NULL", \
96 0, \
97 reinterpret_cast<PrototypeCreateF>(&Self::createEmptyLocal), \
98 Self::initMethod, \
99 Self::exitMethod, \
100 reinterpret_cast<InitalInsertDescFunc>( \
101 reinterpret_cast<void *>(&Self::classDescInserter)), \
102 false, \
103 (Self::ValueFieldMask | \
104 Self::LhsFieldMask | \
105 Self::RhsFieldMask ), \
106 "", \
107 "" \
108 ); \
111 template<> \
112 FieldContainerType &SValueMultiplier<DESC>::getClassType(void) \
114 return _type; \
117 template<> \
118 UInt32 SValueMultiplier<DESC>::getClassTypeId(void) \
120 return _type.getId(); \
123 template<> \
124 UInt16 SValueMultiplier<DESC>::getClassGroupId(void) \
126 return _type.getGroupId(); \
129 template<> \
130 FieldContainerType &SValueMultiplier<DESC>::getType(void) \
132 return _type; \
136 template<> \
137 const FieldContainerType &SValueMultiplier<DESC>::getType(void) const \
139 return _type; \
142 //OSGSVALUEEMITTER_IMPL(Int32EmitterDesc )
143 OSGSVALUEMULTIPLIER_IMPL(Real32MultiplierDesc)
144 OSGSVALUEMULTIPLIER_IMPL(MatrixMultiplierDesc)
146 OSG_END_NAMESPACE