1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2006 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 #include "OSGValueMultiplier.h"
43 #define OSGSVALUEMULTIPLIER_IMPL(DESC) \
46 void SValueMultiplier<DESC>::classDescInserter(TypeObject &oType) \
48 FieldDescriptionBase *pDesc = NULL; \
51 pDesc = new SFValueType::Description( \
52 SFValueType::getClassType(), \
55 ValueFieldId, ValueFieldMask, \
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(), \
67 LhsFieldId, LhsFieldMask, \
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(), \
79 RhsFieldId, RhsFieldMask, \
81 (Field::FThreadLocal), \
82 static_cast<FieldEditMethodSig>(&Self::editHandleRhs), \
83 static_cast<FieldGetMethodSig >(&Self::getHandleRhs)); \
85 oType.addInitialDesc(pDesc); \
91 SValueMultiplier<DESC>::TypeObject \
92 SValueMultiplier<DESC>::_type( \
93 Self::getClassname(), \
94 Inherited::getClassname(), \
97 reinterpret_cast<PrototypeCreateF>(&Self::createEmptyLocal), \
100 reinterpret_cast<InitalInsertDescFunc>( \
101 reinterpret_cast<void *>(&Self::classDescInserter)), \
103 (Self::ValueFieldMask | \
104 Self::LhsFieldMask | \
105 Self::RhsFieldMask ), \
112 FieldContainerType &SValueMultiplier<DESC>::getClassType(void) \
118 UInt32 SValueMultiplier<DESC>::getClassTypeId(void) \
120 return _type.getId(); \
124 UInt16 SValueMultiplier<DESC>::getClassGroupId(void) \
126 return _type.getGroupId(); \
130 FieldContainerType &SValueMultiplier<DESC>::getType(void) \
137 const FieldContainerType &SValueMultiplier<DESC>::getType(void) const \
142 //OSGSVALUEEMITTER_IMPL(Int32EmitterDesc )
143 OSGSVALUEMULTIPLIER_IMPL(Real32MultiplierDesc
)
144 OSGSVALUEMULTIPLIER_IMPL(MatrixMultiplierDesc
)