fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Image / FileIO / OSGDDSImageFileType.h
blob9dadaaeb4543ecf766a1711eaaaa4be1a308b6f8
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 #ifndef _OSGDDSIMAGEFILETYPE_H_
40 #define _OSGDDSIMAGEFILETYPE_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGImageFileIODef.h"
46 #include "OSGImageFileType.h"
48 OSG_BEGIN_NAMESPACE
50 /*! \brief DDS File Handler. Used to read/write DDS files.
51 See \ref PageSystemImage for a detailed description.
53 \ingroup GrpImageFileIODDS
54 \ingroup GrpLibOSGImageFileIO
57 class OSG_IMGFILEIO_DLLMAPPING DDSImageFileType : public ImageFileType
59 /*========================== PUBLIC =================================*/
61 public:
63 /*---------------------------------------------------------------------*/
64 /*! \name Destructor */
65 /*! \{ */
67 virtual ~DDSImageFileType (void);
69 /*! \} */
70 /*---------------------------------------------------------------------*/
71 /*! \name Get Methods */
72 /*! \{ */
74 void setFlipImage (bool s);
75 bool getFlipImage (void );
77 void setFlipCubeMap(bool s);
78 bool getFlipCubeMap(void );
80 void setSwapCubeMap(bool s);
81 bool getSwapCubeMap(void );
83 /*! \} */
84 /*---------------------------------------------------------------------*/
85 /*! \name Read/Write */
86 /*! \{ */
88 virtual bool read ( Image *pImage,
89 std::istream &is,
90 const std::string &mimetype);
92 virtual bool write(const Image *pImage,
93 std::ostream &os,
94 const std::string &mimetype);
96 /*! \} */
97 /*---------------------------------------------------------------------*/
98 /*! \name Read/Write */
99 /*! \{ */
101 virtual std::string determineMimetypeFromStream(std::istream &is);
103 /*! \} */
104 /*========================= PROTECTED ===============================*/
106 protected:
108 bool _flipImage;
109 bool _flipCubeMap;
110 bool _swapCubeMap;
112 /*---------------------------------------------------------------------*/
113 /*! \name Default Constructor */
114 /*! \{ */
116 DDSImageFileType(const Char8 *mimeType,
117 const Char8 *suffixArray[],
118 UInt16 suffixByteCount,
119 UInt32 flags );
121 /*! \} */
122 /*---------------------------------------------------------------------*/
123 /*! \name Copy Op */
124 /*! \{ */
126 DDSImageFileType (const DDSImageFileType &obj);
127 const DDSImageFileType &operator =(const DDSImageFileType &obj);
129 /*! \} */
130 /*========================== PRIVATE ================================*/
132 private:
134 static DDSImageFileType _the;
136 typedef ImageFileType Inherited;
139 typedef DDSImageFileType *DDSImageFileTypeP;
141 OSG_END_NAMESPACE
143 #endif // _OSGDDSIMAGEFILETYPE_H_