changed: gcc8 base update
[opensg.git] / Source / Base / FieldContainer / Fields / PointerFields / OSGChildPointerSFieldBase.inl
blob13bbd73d71f126879436317aebbe690802747984
1 /*---------------------------------------------------------------------------*\
2  *                                OpenSG                                     *
3  *                                                                           *
4  *                                                                           *
5  *                 Copyright (C) 2008 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 OSG_BEGIN_NAMESPACE
41 /*-------------------------------------------------------------------------*/
42 /* Constructors                                                            */
44 template <typename AccessHandlerT, Int32 NamespaceI> inline
45 ChildPointerSFieldBase<AccessHandlerT, 
46                        NamespaceI>::ChildPointerSFieldBase(
47                            FieldContainer * const  pParent,
48                            UInt16                  usChildFieldId,
49                            UInt16                  usParentFieldId) :
50       Inherited      (               ),
51      _pEnclosingObj  (pParent        ),
52      _childFieldId   (usChildFieldId ),
53      _usParentFieldId(usParentFieldId)
57 template <typename AccessHandlerT, Int32 NamespaceI> inline
58 ChildPointerSFieldBase<AccessHandlerT, 
59                        NamespaceI>::ChildPointerSFieldBase(
60                            const_value             value,
61                            FieldContainer * const  pParent,
62                            UInt16                  usChildFieldId,
63                            UInt16                  usParentFieldId) : 
64      Inherited      (               ),
65     _pEnclosingObj  (pParent        ),
66     _childFieldId   (usChildFieldId ),
67     _usParentFieldId(usParentFieldId)
69     this->ptrStoreSet(value);
72 /*-------------------------------------------------------------------------*/
73 /* Destructor                                                              */
75 template <typename AccessHandlerT, Int32 NamespaceI> inline
76 ChildPointerSFieldBase<AccessHandlerT, 
77                        NamespaceI    >::~ChildPointerSFieldBase(void)
81 /*-------------------------------------------------------------------------*/
82 /* Child Linking Information                                               */
84 template <typename AccessHandlerT, Int32 NamespaceI> inline 
85 FieldContainer * 
86     ChildPointerSFieldBase<AccessHandlerT, 
87                            NamespaceI    >::getEnclosingObject(void) const
89     return _pEnclosingObj;
92 template <typename AccessHandlerT, Int32 NamespaceI> inline 
93 void ChildPointerSFieldBase<AccessHandlerT, NamespaceI>::setEnclosingObject(
94     FieldContainer * const pObj)
96     _pEnclosingObj = pObj;
99 template <typename AccessHandlerT, Int32 NamespaceI> inline 
100 UInt16 ChildPointerSFieldBase<AccessHandlerT, 
101                               NamespaceI    >::getChildFieldId(void) const
103     return _childFieldId;
106 template <typename AccessHandlerT, Int32 NamespaceI> inline 
107 void ChildPointerSFieldBase<AccessHandlerT, 
108                             NamespaceI    >::setChildFieldId(
109                                 const UInt16 childFieldId)
111     _childFieldId = childFieldId;
114 template <typename AccessHandlerT, Int32 NamespaceI> inline 
115 UInt16 ChildPointerSFieldBase<AccessHandlerT, 
116                               NamespaceI    >::getParentFieldId(void) const
118     return _usParentFieldId;
121 template <typename AccessHandlerT, Int32 NamespaceI> inline 
122 void ChildPointerSFieldBase<AccessHandlerT, NamespaceI>::setParentFieldId(
123     const UInt16 usParentFieldId)
125     _usParentFieldId = usParentFieldId;
128 OSG_END_NAMESPACE