Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoRasterImageFile.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2017 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : C. OGNIER (Jun 2003)
22**=======================================================================*/
23
24
25#ifndef _SORASTERIMAGEFILE_
26#define _SORASTERIMAGEFILE_
27
28
29#include <Inventor/image/SoRasterImageIO.h>
30#include <Inventor/image/SoRasterImageRW.h>
31
49{
50 SO_IMAGE_RASTER_RW_HEADER()
51
52public:
57
63 SoNONUNICODE SoRasterImageFile(const char* fileName);
64
68 SoRasterImageFile( const SbString& fileName );
69
73 SoRasterImageFile(const FILE* fp);
74
75
80
81
90 SoNONUNICODE virtual const char* getFileName() const;
91
98 virtual SbString getStringFileName() const;
99
110 SoNONUNICODE virtual const char* getFullPathFileName() const;
111
120
126 SoNONUNICODE virtual void setFileName(const char* fileName);
127
131 virtual void setFileName( const SbString& fileName );
132
137 virtual void setFilePointer(const FILE* fp);
138
142 virtual FILE* getFilePointer() const;
143
157 virtual SbBool openRead( const SbStringList * directoryList );
158
169 virtual SbBool checkRead( const SbStringList * directoryList );
170
175 virtual SbBool openWrite( void );
176
180 virtual void closeFile();
181
186 virtual void nullFilePtr();
187
191 virtual void setBinary(SbBool isBinary);
192
193
197 virtual SbBool isBinary() const;
198
199
203 virtual SbString getFileSuffix() const;
204
205#if 1 SoDEPRECATED
212
213#endif
215private:
216
221 virtual void setFileSuffix( const SbString& suffix);
222
223private:
224 void constructorCommon();
225
226 SbString m_fileName;
227 SbString m_fullPath; // full path, after a successful openRead
228 SbString m_fileSuffix;
229 FILE* m_fp;
230 SbBool m_isBinary;
231 SoRasterImageRW::OpenMode m_openMode;
232};
233
234#endif
235
236
Class for smart character strings.
Definition SbString.h:202
Maintains a list of pointers to SbString instances.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class for raster...
virtual SbBool isBinary() const
Returns the file open binary mode.
virtual void setBinary(SbBool isBinary)
Sets the file open binary mode.
virtual void nullFilePtr()
Sets the filePointer to NULL for files closed internally such as RGB files.
virtual SoNONUNICODE const char * getFileName() const
Returns the file name that was given in the filename constructor.
virtual void setFilePointer(const FILE *fp)
Sets the file pointer.
virtual SbBool openWrite(void)
Open the file (specified with setFileName) for writing.
virtual FILE * getFilePointer() const
Returns the file pointer.
virtual SoDEPRECATED SbBool openFile(SoRasterImageRW::OpenMode openMode)
Opens the file with the specified open mode.
virtual SbString getStringFullPathFileName() const
Returns the file name as a full path.
virtual SoNONUNICODE void setFileName(const char *fileName)
Sets the file name.
virtual SoNONUNICODE const char * getFullPathFileName() const
Returns the file name as a full path.
virtual void closeFile()
Close the file.
virtual SbString getFileSuffix() const
Returns the file suffix.
virtual SbBool checkRead(const SbStringList *directoryList)
Try to access the file for reading.
virtual SbString getStringFileName() const
Returns the file name that was given in the filename constructor.
virtual SbBool openRead(const SbStringList *directoryList)
Opens the file (specified with setFileName) for reading.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
OpenMode
open Mode enumeration values.
int SbBool
Boolean type.
Definition SbBase.h:87