1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2003 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 #ifndef _OSGNODEFIELDTRAITS_H_
40 #define _OSGNODEFIELDTRAITS_H_
45 #include "OSGFieldContainerFieldTraits.h"
46 #include "OSGPointerType.h"
48 #include "OSGContainerForwards.h"
52 /*! \ingroup GrpBaseFieldContainerFieldTraits
53 \ingroup GrpLibOSGBase
57 struct FieldTraits
<Node
*> : public FieldTraitsFCPtrBase
<Node
*>
61 static PointerType _type
;
65 typedef FieldTraits
<Node
*, 0> Self
;
67 enum { Convertible
= Self::NotConvertible
};
69 static OSG_BASE_DLLMAPPING
70 DataType
&getType (void);
72 template<typename RefCountPolicy
> inline
73 static const Char8
*getSName (void);
75 template<typename RefCountPolicy
> inline
76 static const Char8
*getMName (void);
80 const Char8
*FieldTraits
<Node
*, 0>::getSName
<RecordedRefCountPolicy
>(void)
82 return "SFRecNodePtr";
86 const Char8
*FieldTraits
<Node
*, 0>::getSName
<UnrecordedRefCountPolicy
>(void)
88 return "SFUnrecNodePtr";
92 const Char8
*FieldTraits
<Node
*, 0>::getSName
<WeakRefCountPolicy
>(void)
94 return "SFWeakNodePtr";
98 const Char8
*FieldTraits
<Node
*, 0>::getSName
<NoRefCountPolicy
>(void)
100 return "SFUnrefdNodePtr";
106 const Char8
*FieldTraits
<Node
*, 0>::getMName
<RecordedRefCountPolicy
>(void)
108 return "MFRecNodePtr";
112 const Char8
*FieldTraits
<Node
*, 0>::getMName
<UnrecordedRefCountPolicy
>(void)
114 return "MFUnrecNodePtr";
118 const Char8
*FieldTraits
<Node
*, 0>::getMName
<WeakRefCountPolicy
>(void)
120 return "MFWeakNodePtr";
124 const Char8
*FieldTraits
<Node
*, 0>::getMName
<NoRefCountPolicy
>(void)
126 return "MFUnrefdNodePtr";
131 /*! \ingroup GrpBaseFieldContainerFieldTraits
132 \ingroup GrpLibOSGBase
136 struct FieldTraits
<Node
*, 1> : public FieldTraitsFCPtrBase
<Node
*, 1>
142 typedef FieldTraits
<Node
*, 1> Self
;
144 enum { Convertible
= Self::NotConvertible
};
146 static const FieldType::Cardinality eParentCard
= FieldType::SingleField
;
148 static OSG_BASE_DLLMAPPING
149 DataType
&getType (void);
151 template<typename RefCountPolicy
> inline
152 static const Char8
*getSName (void);
154 template<typename RefCountPolicy
> inline
155 static const Char8
*getMName (void);
159 const Char8
*FieldTraits
<Node
*, 1>::getSName
<RecordedRefCountPolicy
>(void)
161 return "SFRecChildNodePtr";
165 const Char8
*FieldTraits
<Node
*, 1>::getSName
<UnrecordedRefCountPolicy
>(void)
167 return "SFUnrecChildNodePtr";
171 const Char8
*FieldTraits
<Node
*, 1>::getSName
<WeakRefCountPolicy
>(void)
173 return "SFWeakChildNodePtr";
177 const Char8
*FieldTraits
<Node
*, 1>::getSName
<NoRefCountPolicy
>(void)
179 return "SFUnrefdChildNodePtr";
185 const Char8
*FieldTraits
<Node
*, 1>::getMName
<RecordedRefCountPolicy
>(void)
187 return "MFRecChildNodePtr";
191 const Char8
*FieldTraits
<Node
*, 1>::getMName
<UnrecordedRefCountPolicy
>(void)
193 return "MFUnrecChildNodePtr";
197 const Char8
*FieldTraits
<Node
*, 1>::getMName
<WeakRefCountPolicy
>(void)
199 return "MFWeakChildNodePtr";
203 const Char8
*FieldTraits
<Node
*, 1>::getMName
<NoRefCountPolicy
>(void)
205 return "MFUnrefdChildNodePtr";
210 #endif /* _OSGNODEFIELDTRAITS_H_ */