fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Window / Base / OSGCameraDecoratorBase.h
blob5ad23447455c44c52061a78513926f7e479429a4
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
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 /*****************************************************************************\
40 *****************************************************************************
41 ** **
42 ** This file is automatically generated. **
43 ** **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
46 ** **
47 ** Do not change this file, changes should be done in the derived **
48 ** class CameraDecorator
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGCAMERADECORATORBASE_H_
55 #define _OSGCAMERADECORATORBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGCamera.h" // Parent
68 #include "OSGCameraFields.h" // Decoratee type
70 #include "OSGCameraDecoratorFields.h"
72 OSG_BEGIN_NAMESPACE
75 class CameraDecorator;
77 //! \brief CameraDecorator Base Class.
79 class OSG_SYSTEM_DLLMAPPING CameraDecoratorBase : public Camera
81 public:
83 typedef Camera Inherited;
84 typedef Camera ParentContainer;
86 typedef Inherited::TypeObject TypeObject;
87 typedef TypeObject::InitPhase InitPhase;
89 OSG_GEN_INTERNALPTR(CameraDecorator);
91 /*========================== PUBLIC =================================*/
93 public:
95 enum
97 DecorateeFieldId = Inherited::NextFieldId,
98 NextFieldId = DecorateeFieldId + 1
101 static const OSG::BitVector DecorateeFieldMask =
102 (TypeTraits<BitVector>::One << DecorateeFieldId);
104 /*---------------------------------------------------------------------*/
105 /*! \name Class Get */
106 /*! \{ */
108 static FieldContainerType &getClassType (void);
109 static UInt32 getClassTypeId (void);
110 static UInt16 getClassGroupId(void);
112 /*! \} */
113 /*---------------------------------------------------------------------*/
114 /*! \name FieldContainer Get */
115 /*! \{ */
117 virtual FieldContainerType &getType (void);
118 virtual const FieldContainerType &getType (void) const;
120 virtual UInt32 getContainerSize(void) const;
122 /*! \} */
123 /*---------------------------------------------------------------------*/
124 /*! \name Field Get */
125 /*! \{ */
127 virtual const SFUnrecCameraPtr *getSFDecoratee(void) const;
128 virtual const SFWeakNodePtr *getSFBeacon (void) const;
129 virtual SFWeakNodePtr *editSFBeacon (void);
131 virtual SFReal32 *editSFNear (void);
132 virtual const SFReal32 *getSFNear (void) const;
134 virtual SFReal32 *editSFFar (void);
135 virtual const SFReal32 *getSFFar (void) const;
137 virtual Camera *getDecoratee(void) const;
139 virtual Node * getBeacon (void) const;
141 virtual Real32 &editNear (void);
142 virtual Real32 getNear (void) const;
144 virtual Real32 &editFar (void);
145 virtual Real32 getFar (void) const;
147 /*! \} */
148 /*---------------------------------------------------------------------*/
149 /*! \name Field Set */
150 /*! \{ */
152 virtual void setDecoratee (Camera * const value);
153 virtual void setBeacon (Node * const value);
154 virtual void setNear (const Real32 value);
155 virtual void setFar (const Real32 value);
157 /*! \} */
158 /*---------------------------------------------------------------------*/
159 /*! \name Ptr Field Set */
160 /*! \{ */
162 /*! \} */
163 /*---------------------------------------------------------------------*/
164 /*! \name Ptr MField Set */
165 /*! \{ */
167 /*! \} */
168 /*---------------------------------------------------------------------*/
169 /*! \name Binary Access */
170 /*! \{ */
172 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
173 virtual void copyToBin (BinaryDataHandler &pMem,
174 ConstFieldMaskArg whichField);
175 virtual void copyFromBin(BinaryDataHandler &pMem,
176 ConstFieldMaskArg whichField);
179 /*! \} */
180 /*========================= PROTECTED ===============================*/
182 protected:
184 static TypeObject _type;
186 static void classDescInserter(TypeObject &oType);
187 static const Char8 *getClassname (void );
189 /*---------------------------------------------------------------------*/
190 /*! \name Fields */
191 /*! \{ */
193 SFUnrecCameraPtr _sfDecoratee;
195 /*! \} */
196 /*---------------------------------------------------------------------*/
197 /*! \name Constructors */
198 /*! \{ */
200 CameraDecoratorBase(void);
201 CameraDecoratorBase(const CameraDecoratorBase &source);
203 /*! \} */
204 /*---------------------------------------------------------------------*/
205 /*! \name Destructors */
206 /*! \{ */
208 virtual ~CameraDecoratorBase(void);
210 /*! \} */
211 /*---------------------------------------------------------------------*/
212 /*! \name onCreate */
213 /*! \{ */
215 void onCreate(const CameraDecorator *source = NULL);
217 /*! \} */
218 /*---------------------------------------------------------------------*/
219 /*! \name Generic Field Access */
220 /*! \{ */
222 GetFieldHandlePtr getHandleDecoratee (void) const;
223 EditFieldHandlePtr editHandleDecoratee(void);
225 virtual GetFieldHandlePtr getHandleBeacon (void) const;
226 virtual EditFieldHandlePtr editHandleBeacon (void);
227 virtual GetFieldHandlePtr getHandleNear (void) const;
228 virtual EditFieldHandlePtr editHandleNear (void);
229 virtual GetFieldHandlePtr getHandleFar (void) const;
230 virtual EditFieldHandlePtr editHandleFar (void);
232 /*! \} */
233 /*---------------------------------------------------------------------*/
234 /*! \name Sync */
235 /*! \{ */
237 #ifdef OSG_MT_CPTR_ASPECT
238 virtual void execSyncV( FieldContainer &oFrom,
239 ConstFieldMaskArg whichField,
240 AspectOffsetStore &oOffsets,
241 ConstFieldMaskArg syncMode ,
242 const UInt32 uiSyncInfo);
244 void execSync ( CameraDecoratorBase *pFrom,
245 ConstFieldMaskArg whichField,
246 AspectOffsetStore &oOffsets,
247 ConstFieldMaskArg syncMode ,
248 const UInt32 uiSyncInfo);
249 #endif
251 /*! \} */
252 /*---------------------------------------------------------------------*/
253 /*! \name Edit */
254 /*! \{ */
256 /*! \} */
257 /*---------------------------------------------------------------------*/
258 /*! \name Aspect Create */
259 /*! \{ */
261 /*! \} */
262 /*---------------------------------------------------------------------*/
263 /*! \name Edit */
264 /*! \{ */
265 /*! \} */
266 /*---------------------------------------------------------------------*/
267 /*! \name Sync */
268 /*! \{ */
270 virtual void resolveLinks(void);
272 /*! \} */
273 /*========================== PRIVATE ================================*/
275 private:
276 /*---------------------------------------------------------------------*/
278 // prohibit default functions (move to 'public' if you need one)
279 void operator =(const CameraDecoratorBase &source);
282 typedef CameraDecoratorBase *CameraDecoratorBaseP;
284 OSG_END_NAMESPACE
286 #endif /* _OSGCAMERADECORATORBASE_H_ */