fixed: gcc8 compile issues
[opensg.git] / Source / Contrib / ComplexSceneManager / VRMLNodes / OSGValueAccumulator.cpp
blob953718fcb5f6f494559249d86745cef7cf4c4943
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 "OSGValueAccumulator.h"
41 OSG_BEGIN_NAMESPACE
43 #define OSGSVALUEACCUMULATOR_IMPL(DESC) \
45 template<> \
46 void SValueAccumulator<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 "rhs", \
66 "", \
67 RhsFieldId, RhsFieldMask, \
68 true, \
69 (Field::FThreadLocal), \
70 static_cast<FieldEditMethodSig>(&Self::editHandleRhs), \
71 static_cast<FieldGetMethodSig >(&Self::getHandleRhs)); \
73 oType.addInitialDesc(pDesc); \
75 } \
78 template<> \
79 SValueAccumulator<DESC>::TypeObject \
80 SValueAccumulator<DESC>::_type( \
81 Self::getClassname(), \
82 Inherited::getClassname(), \
83 "NULL", \
84 0, \
85 reinterpret_cast<PrototypeCreateF>(&Self::createEmptyLocal), \
86 Self::initMethod, \
87 Self::exitMethod, \
88 reinterpret_cast<InitalInsertDescFunc>( \
89 reinterpret_cast<void *>(&Self::classDescInserter)), \
90 false, \
91 (Self::ValueFieldMask | \
92 Self::RhsFieldMask ), \
93 "", \
94 "" \
95 ); \
98 template<> \
99 FieldContainerType &SValueAccumulator<DESC>::getClassType(void) \
101 return _type; \
104 template<> \
105 UInt32 SValueAccumulator<DESC>::getClassTypeId(void) \
107 return _type.getId(); \
110 template<> \
111 UInt16 SValueAccumulator<DESC>::getClassGroupId(void) \
113 return _type.getGroupId(); \
116 template<> \
117 FieldContainerType &SValueAccumulator<DESC>::getType(void) \
119 return _type; \
123 template<> \
124 const FieldContainerType &SValueAccumulator<DESC>::getType(void) const \
126 return _type; \
129 //OSGSVALUEEMITTER_IMPL(Int32EmitterDesc )
130 OSGSVALUEACCUMULATOR_IMPL(Real32AccumulatorDesc)
131 OSGSVALUEACCUMULATOR_IMPL(Vec2fAccumulatorDesc)
132 OSGSVALUEACCUMULATOR_IMPL(MatrixAccumulatorDesc)
134 OSG_END_NAMESPACE