Open Inventor Release 2024.2.1
 
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-2024 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#include <Inventor/image/SoRasterImageIO.h>
29#include <Inventor/image/SoRasterImageRW.h>
30
46{
47 SO_IMAGE_RASTER_RW_HEADER()
48
49public:
54
60 SoNONUNICODE SoRasterImageFile(const char* fileName);
61
65 SoRasterImageFile( const SbString& fileName );
66
70 SoRasterImageFile(const FILE* fp);
71
76
85 SoNONUNICODE virtual const char* getFileName() const;
86
93 virtual SbString getStringFileName() const;
94
105 SoNONUNICODE virtual const char* getFullPathFileName() const;
106
115
121 SoNONUNICODE virtual void setFileName(const char* fileName);
122
126 virtual void setFileName( const SbString& fileName );
127
131 virtual void setFilePointer(const FILE* fp);
132
136 virtual FILE* getFilePointer() const;
137
151 virtual SbBool openRead( const SbStringList * directoryList );
152
163 virtual SbBool checkRead( const SbStringList * directoryList );
164
169 virtual SbBool openWrite( void );
170
174 virtual void closeFile();
175
180 virtual void nullFilePtr();
181
185 virtual void setBinary(SbBool isBinary);
186
190 virtual SbBool isBinary() const;
191
195 virtual SbString getFileSuffix() const;
196
197#if 1 SoDEPRECATED
204
205#endif
207private:
208
213 virtual void setFileSuffix( const SbString& suffix);
214
215private:
216 void constructorCommon();
217
218 SbString m_fileName;
219 SbString m_fullPath; // full path, after a successful openRead
220 SbString m_fileSuffix;
221 FILE* m_fp;
222 SbBool m_isBinary;
223 SoRasterImageRW::OpenMode m_openMode;
224};
225
226#endif
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