27 #include <Inventor/system/inttypes.h> 28 #include <Inventor/SbBasic.h> 29 #include <Inventor/lists/SbList.h> 33 #include <Inventor/SoDB.h> 34 #include <Inventor/SbDict.h> 36 #define COIN_ALLOW_SBDICT // Coin 2.x hack, for ABI compatibility 37 #include <Inventor/SbDict.h> 38 #undef COIN_ALLOW_SBDICT 39 #endif // COIN_INTERNAL 48 class SoInput_FileInfo;
60 SoProto * findProto(
const SbName & name);
61 void addProto(SoProto * proto);
62 void pushProto(SoProto * proto);
63 SoProto * getCurrentProto(
void)
const;
66 void addRoute(
const SbName & fromnode,
const SbName & fromfield,
73 virtual void setFilePointer(FILE * newFP);
74 virtual SbBool openFile(
const char * fileName, SbBool okIfNotFound = FALSE);
75 virtual SbBool pushFile(
const char * fileName);
76 virtual void closeFile(
void);
77 virtual SbBool isValidFile(
void);
78 virtual SbBool isValidBuffer(
void);
79 virtual FILE * getCurFile(
void)
const;
80 virtual const char * getCurFileName(
void)
const;
81 virtual void setBuffer(
void * bufpointer,
size_t bufsize);
82 void setStringArray(
const char * strings[]);
83 virtual size_t getNumBytesRead(
void)
const;
85 virtual float getIVVersion(
void);
86 virtual SbBool isBinary(
void);
88 virtual SbBool
get(
char & c);
89 virtual SbBool getASCIIBuffer(
char & c);
90 virtual SbBool getASCIIFile(
char & c);
91 virtual SbBool readHex(uint32_t & l);
92 virtual SbBool read(
char & c);
93 virtual SbBool read(
char & c, SbBool skip);
95 virtual SbBool read(
SbName & n, SbBool validIdent = FALSE);
96 virtual SbBool read(
int & i);
97 virtual SbBool read(
unsigned int & i);
98 virtual SbBool read(
short & s);
99 virtual SbBool read(
unsigned short & s);
100 virtual SbBool read(
float & f);
101 virtual SbBool read(
double & d);
102 virtual SbBool readBinaryArray(
unsigned char * c,
int length);
103 virtual SbBool readBinaryArray(int32_t * l,
int length);
104 virtual SbBool readBinaryArray(
float * f,
int length);
105 virtual SbBool readBinaryArray(
double * d,
int length);
106 SbBool readByte(int8_t & b);
107 SbBool readByte(uint8_t & b);
108 virtual SbBool eof(
void)
const;
110 SbBool isFileVRML1(
void);
111 SbBool isFileVRML2(
void);
112 virtual void resetFilePointer(FILE * fptr);
114 virtual void getLocationString(
SbString &
string)
const;
115 virtual void putBack(
const char c);
116 virtual void putBack(
const char * str);
117 virtual void addReference(
const SbName & name,
SoBase * base,
118 SbBool addToGlobalDict = TRUE);
119 virtual void removeReference(
const SbName & name);
120 virtual SoBase * findReference(
const SbName & name)
const;
122 static void addDirectoryFirst(
const char * dirName);
123 static void addDirectoryLast(
const char * dirName);
124 static void addEnvDirectoriesFirst(
const char * envVarName,
125 const char * separator =
":\t ");
126 static void addEnvDirectoriesLast(
const char * envVarName,
127 const char * separator =
":\t ");
128 static void removeDirectory(
const char * dirName);
129 static void clearDirectories(
void);
132 static void init(
void);
134 static SbString getPathname(
const char *
const filename);
136 static SbString getBasename(
const char *
const filename);
145 virtual SbBool popFile(
void);
146 void setIVVersion(
float version);
147 FILE * findFile(
const char * fileName,
SbString & fullName);
148 void initFile(FILE * newFP,
const char * fileName,
SbString * fullName,
150 SbBool checkHeader(SbBool bValidateBufferHeader = FALSE);
151 SbBool fromBuffer(
void)
const;
152 SbBool skipWhiteSpace(
void);
153 size_t freeBytesInBuf(
void)
const;
154 SbBool readInteger(int32_t & l);
155 SbBool readUnsignedInteger(uint32_t & l);
156 SbBool readReal(
double & d);
157 SbBool readUnsignedIntegerString(
char * str);
158 int readDigits(
char * str);
159 int readHexDigits(
char * str);
160 int readChar(
char * str,
char charToRead);
162 SbBool makeRoomInBuf(
size_t nBytes);
163 void convertShort(
char * from,
short * s);
164 void convertInt32(
char * from, int32_t * l);
165 void convertFloat(
char * from,
float * f);
166 void convertDouble(
char * from,
double * d);
167 void convertShortArray(
char * from,
short * to,
int len);
168 void convertInt32Array(
char * from, int32_t * to,
int len);
169 void convertFloatArray(
char * from,
float * to,
int len);
170 void convertDoubleArray(
char * from,
double * to,
int len);
171 SbBool isFileURL(
const char * url);
172 char * URLToFile(
char * out_buf,
const char * in_buf);
173 SbBool IsURL(
const char * c_strng);
179 friend class SoInputP;
181 static void clean(
void);
182 void constructorsCommon(
void);
184 static void addDirectoryIdx(
const int idx,
const char * dirName);
185 static void addEnvDirectoriesIdx(
int startidx,
const char * envVarName,
186 const char * separator);
190 SoInput_FileInfo * getTopOfStack(
void)
const {
191 return this->filestack[0];
198 #endif // !COIN_SOINPUT_H The SoBase class is the top-level superclass for a number of class-hierarchies.SoBase provides the ba...
Definition: SoBase.h:41
The SoDB class keeps track of internal global data.This class collects various methods for initializi...
Definition: SoDB.h:46
The SoFieldContainer class is a base class for all classes that contain fields.The classes containing...
Definition: SoFieldContainer.h:35
The SbList class is a template container class for lists.SbList is an extension of the Coin library v...
Definition: SoType.h:46
The SoField class is the top-level abstract base class for fields.Fields is the mechanism used throug...
Definition: SoField.h:38
The SbDict class organizes a dictionary of keys and values.It uses hashing to quickly insert and find...
Definition: SbDict.h:47
The SbTime class instances represents time values.SbTime is a convenient way of doing system independ...
Definition: SbTime.h:41
The SbString class is a string class with convenience functions for string operations.This is the class used for storing and working with character strings. It automatically takes care of supporting all the "bookkeeping" tasks usually associated with working with character strings, like memory allocation and deallocation etc.
Definition: SbString.h:42
The SbName class stores strings by reference.The class is used by Coin for storing keywords...
Definition: SbName.h:31
The SbStringList class is a container for arrays of SbString pointers.Note that upon using the equali...
Definition: SbStringList.h:31