Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SoRasterReaderSet.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-2022 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 _SORASTERREADERSET_
26#define _SORASTERREADERSET_
27
28#include <Inventor/image/SoRasterImageRW.h>
29#include <Inventor/threads/SbThreadRWMutex.h>
30
31#include <Inventor/STL/map>
32
33class SoRasterImageFile; //FORWARD
34
63
64public:
70
74 static void addReader(SoRasterImageRW* reader);
75
80 static void deleteReaders(int start, int num = -1);
81
85 static SoType getReaderAt(int index);
86
90 static int getNumReaders();
91
92
93private:
94 static void initClasses();
95 static void exitClasses();
96
97 static SoRasterImageRW* getReader(SoRasterImageFile* imageFile, const SbString& suffix);
98
100 static SoRasterImageRW* getReader(const SbString& filename);
101
102private:
105
106private:
107 typedef std::vector<SoRasterImageRW*> SoRasterImageRWVector;
108
109 struct ThreadDataStruct
110 {
111 bool isLoaded;
112 SoRasterImageRWVector* readersList;
113 };
114
115
116 static void loadAllReaders();
117 static ThreadDataStruct* getCurrentThreadData();
118
119 static SbThreadRWMutex s_readersMutex;
120 static SbThreadMutex s_getReaderMutex;
121 static std::map<SbThreadId_t, ThreadDataStruct*> s_threadsReaders;
122
123};
124
125#endif
126
127
Class for smart character strings.
Definition SbString.h:202
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Portable mutex c...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Portable readers...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class for raster...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class referencin...
static void deleteReaders(int start, int num=-1)
Removes num readers (including default ones) at start position.
static SoType getReaderAt(int index)
Returns the type of reader at the specified index.
static int getNumReaders()
Returns the number of raster readers currently in the set.
static SoRasterImageRW * getReader(SoRasterImageIO *imageIO)
Returns an instance of the reader class if found in the set of raster readers.
static void addReader(SoRasterImageRW *reader)
Adds a raster reading class to the set of raster readers.
Stores runtime type information.
Definition SoType.h:98