fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / State / Base / OSGFullStateChunk.cpp
blobee69733cf493298720983e08055080a1dc74e5fd
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright(C) 2000-2002 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 //---------------------------------------------------------------------------
40 // Includes
41 //---------------------------------------------------------------------------
43 #include <cstdlib>
44 #include <cstdio>
46 #include "OSGConfig.h"
48 #include "OSGFullStateChunk.h"
49 #include "OSGLog.h"
51 OSG_BEGIN_NAMESPACE
53 /***************************************************************************\
54 * Class variables *
55 \***************************************************************************/
57 StateChunkClass FullStateChunk::_class("FullStateChunk", 1, 6);
59 /***************************************************************************\
60 * Class methods *
61 \***************************************************************************/
63 void FullStateChunk::initMethod(InitPhase ePhase)
65 Inherited::initMethod(ePhase);
68 /***************************************************************************\
69 * Instance methods *
70 \***************************************************************************/
72 /*-------------------------------------------------------------------------*\
73 - public -
74 \*-------------------------------------------------------------------------*/
77 /*------------- constructors & destructors --------------------------------*/
79 FullStateChunk::FullStateChunk(void) :
80 Inherited()
84 FullStateChunk::FullStateChunk(const FullStateChunk &source) :
85 Inherited(source)
89 FullStateChunk::~FullStateChunk(void)
93 /*------------------------------- Sync -----------------------------------*/
95 void FullStateChunk::changed(ConstFieldMaskArg whichField,
96 UInt32 origin,
97 BitVector details)
99 Inherited::changed(whichField, origin, details);
102 /*------------------------------ Output ----------------------------------*/
104 void FullStateChunk::dump( UInt32 OSG_CHECK_ARG(uiIndent),
105 const BitVector OSG_CHECK_ARG(bvFlags )) const
107 SLOG << "Dump FullStateChunk NI" << std::endl;
111 /*---------------------- Chunk Class Access -------------------------------*/
113 const StateChunkClass *FullStateChunk::getClass(void) const
115 return &_class;
118 void FullStateChunk::activate(DrawEnv *,
119 UInt32 )
121 SFATAL << "FullStateChunk::activate" << std::endl;
124 void FullStateChunk::changeFrom(DrawEnv *,
125 StateChunk *,
126 UInt32 )
128 SFATAL << "FullStateChunk::changeFrom" << std::endl;
131 void FullStateChunk::deactivate(DrawEnv *,
132 UInt32 )
134 SFATAL << "FullStateChunk::deactivate" << std::endl;
137 /*-------------------------- Comparison -----------------------------------*/
139 /*! Calculate how expensive it is to switch from one instance of the chunk
140 class to another. In most cases not implemented yet, will return 0.
143 Real32 FullStateChunk::switchCost(StateChunk *OSG_CHECK_ARG(chunk))
145 return 0;
148 bool FullStateChunk::operator <(const StateChunk &other) const
150 return this < &other;
153 /*! Compare two chunks. In most cases not implemented yet, will return false.
156 bool FullStateChunk::operator ==(const StateChunk &OSG_CHECK_ARG(other)) const
158 return false;
161 bool FullStateChunk::operator !=(const StateChunk &other) const
163 return !(*this == other);
166 OSG_END_NAMESPACE