1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2008 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 _OSGCHILDPOINTERSFIELDBASE_H_
40 #define _OSGCHILDPOINTERSFIELDBASE_H_
46 #include "OSGConfig.h"
48 #include "OSGPointerSFieldCommon.h"
49 #include "OSGChildAccessHandler.h"
53 /*! \ingroup GrpBaseFieldContainerFields
54 \ingroup GrpLibOSGBase
57 template <typename AccessHandlerT
,
59 class ChildPointerSFieldBase
60 : public PointerSFieldCommon
<AccessHandlerT
, NamespaceI
>
62 /*========================== PUBLIC =================================*/
66 /*---------------------------------------------------------------------*/
67 /*! \name Public Types */
70 typedef PointerSFieldCommon
<AccessHandlerT
,
71 NamespaceI
> Inherited
;
72 typedef ChildPointerSFieldBase Self
;
74 typedef FieldContainer
* const const_value
;
77 /*---------------------------------------------------------------------*/
78 /*! \name Child Linking Information */
81 FieldContainer
*getEnclosingObject(void) const;
82 UInt16
getChildFieldId (void) const;
83 UInt16
getParentFieldId (void) const;
86 /*========================= PROTECTED ===============================*/
90 /*---------------------------------------------------------------------*/
91 /*! \name Constructors */
94 ChildPointerSFieldBase(FieldContainer
* const pParent
,
95 UInt16 usChildFieldId
,
96 UInt16 usParentFieldId
);
98 ChildPointerSFieldBase(const_value value
,
99 FieldContainer
* const pParent
,
100 UInt16 usChildFieldId
,
101 UInt16 usParentFieldId
);
104 /*---------------------------------------------------------------------*/
105 /*! \name Destructor */
108 ~ChildPointerSFieldBase(void);
111 /*---------------------------------------------------------------------*/
112 /*! \name Child Linking Information */
115 void setEnclosingObject(FieldContainer
* const pObj
);
116 void setChildFieldId (UInt16
const childFieldId
);
117 void setParentFieldId (UInt16
const usParentFieldId
);
120 /*---------------------------------------------------------------------*/
124 FieldContainer
*_pEnclosingObj
;
125 UInt16 _childFieldId
;
126 UInt16 _usParentFieldId
;
129 /*========================== PRIVATE ================================*/
133 template<typename RefCountPolicyT
>
134 friend class ChildAccessHandler
;
136 /*!\brief prohibit default function (move to 'public' if needed) */
137 ChildPointerSFieldBase(const Self
&source
);
138 /*!\brief prohibit default function (move to 'public' if needed) */
139 void operator = (const Self
&source
);
144 #include "OSGChildPointerSFieldBase.inl"
146 #endif // _OSGCHILDPOINTERSFIELDBASE_H_