fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / Base / Field / OSGFieldForwards.h
blobb72638e305f580083340838cf250886a3602ee6e
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2003 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 #ifndef _OSGFIELDFORWARDS_H_
40 #define _OSGFIELDFORWARDS_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include <boost/function.hpp>
46 #include <boost/shared_ptr.hpp>
48 #include "OSGConfig.h"
49 #include "OSGBaseTypes.h"
50 #include "OSGBinaryDataHandler.h"
52 OSG_BEGIN_NAMESPACE
54 #ifndef DOXYGEN_SHOULD_SKIP_THIS
56 class Field;
58 template<class ValueT, Int32 iNamespace>
59 class SField;
61 template<class ValueT, Int32 iNamespace, class AllocT>
62 class MField;
64 template<class ValueT,
65 typename RefCountPolicy,
66 Int32 iNamespace>
67 class PointerSField;
69 template<class ValueT,
70 typename RefCountPolicy,
71 Int32 iNamespace>
72 class PointerMField;
74 template<class ValueT,
75 typename RefCountPolicy,
76 Int32 iNamespace>
77 class ParentPointerSField;
79 template<class ValueT,
80 typename RefCountPolicy,
81 Int32 iNamespace>
82 class ParentPointerMField;
84 template<class ValueT,
85 typename RefCountPolicy,
86 Int32 iNamespace >
87 class ChildPointerSField;
89 template<class ValueT,
90 typename RefCountPolicy,
91 Int32 iNamespace >
92 class ChildPointerMField;
94 class FieldDescriptionBase;
95 class ReflexiveContainer;
97 class GetFieldHandle;
98 class EditFieldHandle;
100 typedef boost::shared_ptr<GetFieldHandle > GetFieldHandlePtr;
101 typedef boost::shared_ptr<EditFieldHandle> EditFieldHandlePtr;
103 typedef EditFieldHandlePtr(ReflexiveContainer::*FieldEditMethod)(void );
104 typedef GetFieldHandlePtr (ReflexiveContainer::*FieldGetMethod )(void) const;
106 typedef EditFieldHandlePtr(ReflexiveContainer::*FieldIndexEditMethod)(UInt32);
107 typedef GetFieldHandlePtr (ReflexiveContainer::*FieldIndexGetMethod )(
108 UInt32) const;
110 /*! \ingroup GrpBaseFieldContainerBase
112 typedef
113 EditFieldHandlePtr(OSG::ReflexiveContainer::*FieldEditMethodSig)(void);
115 /*! \ingroup GrpBaseFieldContainerBase
117 typedef
118 GetFieldHandlePtr (OSG::ReflexiveContainer::*FieldGetMethodSig )(void) const;
121 /*! \ingroup GrpBaseFieldContainerBase
123 typedef EditFieldHandlePtr (OSG::ReflexiveContainer::*FieldIndexEditMethodSig)(
124 OSG::UInt32);
126 /*! \ingroup GrpBaseFieldContainerBase
128 typedef GetFieldHandlePtr (OSG::ReflexiveContainer::*FieldIndexGetMethodSig )(
129 OSG::UInt32) const;
131 /*! \ingroup GrpBaseFieldContainerBase
133 #ifdef FDESC_USE_BOOST
134 typedef boost::function<Field *(OSG::ReflexiveContainer *)> FieldEditMethod;
135 #else
136 typedef EditFieldHandlePtr (OSG::ReflexiveContainer::*FieldEditMethod)(void );
137 #endif
140 /*! \ingroup GrpBaseFieldContainerBase
142 #ifdef FDESC_USE_BOOST
143 typedef boost::function<
144 const Field *(const OSG::ReflexiveContainer *)> FieldGetMethod;
145 #else
146 typedef GetFieldHandlePtr(OSG::ReflexiveContainer::*FieldGetMethod)(void) const;
147 #endif
150 /*! \ingroup GrpBaseFieldContainerBase
152 #ifdef FDESC_USE_BOOST
153 typedef boost::function<
154 Field *(OSG::ReflexiveContainer *, int)> FieldIndexEditMethod;
155 #else
156 typedef EditFieldHandlePtr (OSG::ReflexiveContainer::*FieldIndexEditMethod)(
157 OSG::UInt32);
158 #endif
161 /*! \ingroup GrpBaseFieldContainerBase
163 #ifdef FDESC_USE_BOOST
164 typedef boost::function<
165 const Field *(const OSG::ReflexiveContainer *,
166 int )> FieldIndexGetMethod;
167 #else
168 typedef GetFieldHandlePtr (OSG::ReflexiveContainer::*FieldIndexGetMethod)(
169 OSG::UInt32) const;
170 #endif
172 typedef boost::function<
173 FieldDescriptionBase * (
174 const Char8 *szFieldname,
175 UInt32 uiFieldFlags,
176 FieldEditMethod fEditMethod,
177 FieldGetMethod fGetMethod) > FieldDescCreator;
179 typedef boost::function<
180 FieldDescriptionBase * (
181 const Char8 *szFieldname,
182 UInt32 uiFieldFlags,
183 FieldIndexEditMethod fEditMethod,
184 FieldIndexGetMethod fGetMethod ) > IndexedFieldDescCreator;
186 struct NoRefCounts;
188 #endif //DOXYGEN_SHOULD_SKIP_THIS
190 OSG_END_NAMESPACE
192 #endif /* _OSGFIELDFORWARDS_H_ */