fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Image / FileIO / OSGEXRImageFileType.h
blobc637635906a522f36b293a84d489d8b9d4dfe7b7
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 OSGEXRIMAGEFILETYPE
40 #define OSGEXRIMAGEFILETYPE
41 #ifdef __sig
42 #pragma once
43 #endif
45 #include "OSGImageFileIODef.h"
46 #include "OSGImageFileType.h"
48 OSG_BEGIN_NAMESPACE
50 /*! \brief EXR File Handler. Used to read/write ILM OpenEXR files.
51 See \ref PageSystemImage for a detailed description.
53 \ingroup GrpImageFileIOEXR
54 \ingroup GrpLibOSGImageFileIO
57 class OSG_IMGFILEIO_DLLMAPPING EXRImageFileType : public ImageFileType
59 /*========================== PUBLIC =================================*/
61 public:
63 /*---------------------------------------------------------------------*/
64 /*! \name Destructor */
65 /*! \{ */
67 virtual ~EXRImageFileType (void);
69 /*! \} */
70 /*---------------------------------------------------------------------*/
71 /*! \name Get Methods */
72 /*! \{ */
74 /*! \} */
75 /*---------------------------------------------------------------------*/
76 /*! \name Read/Write */
77 /*! \{ */
79 virtual bool read ( Image *image,
80 std::istream &is,
81 const std::string &mimeType);
83 virtual bool write (const Image *image,
84 std::ostream &os,
85 const std::string &mimeType);
87 /*! \} */
89 /*========================= PROTECTED ===============================*/
91 protected:
93 /*---------------------------------------------------------------------*/
94 /*! \name Default Constructor */
95 /*! \{ */
97 EXRImageFileType(const Char8 *mimeType,
98 const Char8 *suffixArray[],
99 UInt16 suffixByteCount,
100 UInt32 flags );
102 /*! \} */
103 /*---------------------------------------------------------------------*/
104 /*! \name Buffer */
105 /*! \{ */
107 virtual UInt64 restoreData( Image *image,
108 const UChar8 *buffer,
109 Int32 memSize = -1) const;
111 virtual UInt64 storeData (const Image *image,
112 UChar8 *buffer,
113 Int32 memSize = -1) const;
114 /*! \} */
115 /*---------------------------------------------------------------------*/
116 /*! \name File I/O */
117 /*! \{ */
119 bool isOpenExrFile(std::istream &is);
121 /*! \} */
123 /*========================== PRIVATE ================================*/
125 private:
127 EXRImageFileType(const EXRImageFileType &obj);
129 typedef ImageFileType Inherited;
131 static EXRImageFileType _the;
135 typedef EXRImageFileType* EXRImageFileTypeP;
137 OSG_END_NAMESPACE
139 #endif // OSGEXRIMAGEFILETYPE