fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / FileIO / OpenFlight / OSGOFControlRecords.h
blobaf00e039a4fa5c386f6147ff3b8f57485998d337
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2011 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 \*---------------------------------------------------------------------------*/
30 #ifndef _OSGOFCONTROLRECORDS_H_
31 #define _OSGOFCONTROLRECORDS_H_
33 #include "OSGFileIODef.h"
34 #include "OSGOFRecords.h"
36 OSG_BEGIN_NAMESPACE
38 //---------------------------------------------------------------------------
39 // Class
40 //---------------------------------------------------------------------------
42 /*! \ingroup GrpFileIOOpenFlight
43 \nohierarchy
46 class OSG_FILEIO_DLLMAPPING OFPushLevelRecord : public OFControlRecord
48 public:
49 static const UInt16 OpCode = 10;
51 /*---------------------------------------------------------------------*/
53 static OFRecordTransitPtr create(const OFRecordHeader &oHeader,
54 OFDatabase &oDB );
56 /*---------------------------------------------------------------------*/
58 virtual bool read(std::istream &is);
60 /*---------------------------------------------------------------------*/
62 virtual UInt16 getOpCode(void) const;
64 protected:
65 typedef OFControlRecord Inherited;
67 OFPushLevelRecord(const OFRecordHeader &oHeader,
68 OFDatabase &oDB );
69 virtual ~OFPushLevelRecord(void );
71 /*---------------------------------------------------------------------*/
73 static OFRecordFactoryBase::RegisterRecord _regHelper;
76 //---------------------------------------------------------------------------
77 // Class
78 //---------------------------------------------------------------------------
80 /*! \ingroup GrpFileIOOpenFlight
81 \nohierarchy
84 class OSG_FILEIO_DLLMAPPING OFPopLevelRecord : public OFControlRecord
86 public:
87 static const UInt16 OpCode = 11;
89 /*---------------------------------------------------------------------*/
91 static OFRecordTransitPtr create(const OFRecordHeader &oHeader,
92 OFDatabase &oDB );
94 /*---------------------------------------------------------------------*/
96 virtual bool read(std::istream &is);
98 /*---------------------------------------------------------------------*/
100 virtual UInt16 getOpCode(void) const;
102 protected:
103 typedef OFControlRecord Inherited;
105 OFPopLevelRecord(const OFRecordHeader &oHeader,
106 OFDatabase &oDB );
107 virtual ~OFPopLevelRecord(void );
109 /*---------------------------------------------------------------------*/
111 static OFRecordFactoryBase::RegisterRecord _regHelper;
114 OSG_END_NAMESPACE
116 #endif /* _OSGOFCONTROLRECORDS_H_ */