fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Dynamics / Base / OSGFrameTaskMixin.inl
blob0890fc2e40a3fbc475b8fdea3f048adc19f79e7e
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 OSG_BEGIN_NAMESPACE
41 /*-------------------------------------------------------------------------*/
42 /*                                Set                                      */
44 /*-------------------------------------------------------------------------*/
45 /*                            Constructors                                 */
47 template <class ParentT> inline
48 FrameTaskMixin<ParentT>::FrameTaskMixin(void) :
49      Inherited       (     ),
50      Interface       (     ),
51     _bNoFrameFunction(false)
55 template <class ParentT> inline
56 FrameTaskMixin<ParentT>::FrameTaskMixin(const FrameTaskMixin &source) :
58      Inherited       (source),
59      Interface       (      ),
60     _bNoFrameFunction(false )
64 template <class ParentT> inline
65 FrameTaskMixin<ParentT>::~FrameTaskMixin(void)
67     // Don't add the prototype instances to the list
68     if(GlobalSystemState < Shutdown && FrameHandler::the() != NULL)
69     {
70         FrameHandler::the()->removeTask(this);
71     }
74 template <class ParentT> inline
75 void FrameTaskMixin<ParentT>::dump(      UInt32    uiIndent,
76                                    const BitVector bvFlags ) const
80 template <class ParentT> inline
81 void FrameTaskMixin<ParentT>::onCreateAspect(
82     const FrameTaskMixin *createAspect,
83     const FrameTaskMixin *source          )
85     Inherited::onCreateAspect(createAspect, source);
87     // Don't add the prototype instances to the list
88     if(GlobalSystemState != Running || FrameHandler::the() == NULL)
89         return;
91     if(this == createAspect)
92     {
93         FrameHandler::the()->addTask(this, _bNoFrameFunction);
94     }
97 template <class ParentT> inline
98 void FrameTaskMixin<ParentT>::onDestroyAspect(
99     UInt32 uiContainerId, UInt32 uiAspect)
101     // Don't add the prototype instances to the list
102     if(GlobalSystemState < Shutdown && FrameHandler::the() != NULL)
103     {
104         FrameHandler::the()->removeTask(this);
105     }
107     Inherited::onDestroyAspect(uiContainerId, uiAspect);
110 /*-------------------------------------------------------------------------*/
111 /*                             Comparison                                  */
113 OSG_END_NAMESPACE