|
| SoInput () |
| Constructor and destructor. More...
|
|
| ~SoInput () |
| Constructor and destructor. More...
|
|
void | setFilePointer (FILE *newFP) |
| Sets file pointer to read from. Clears the stack of input files if necessary. More...
|
|
bool | openFile (const char *fileName, bool okIfNotFound=FALSE) |
| Opens named file, sets file pointer to result. More...
|
|
bool | pushFile (const char *fileName) |
| Opens named file, pushing the resulting file pointer onto the stack. More...
|
|
void | closeFile () |
| Closes all files on stack opened with openFile() or pushFile(). More...
|
|
bool | isValidFile () |
| Returns TRUE if the currently open file is a valid Inventor file; that is, it begins with a valid Inventor header, or one that has been registered with SoDB::registerHeader. More...
|
|
FILE * | getCurFile () const |
| Returns a pointer to the current file, or NULL if reading from a buffer. More...
|
|
const char * | getCurFileName () const |
| Returns full name (including directory path) of current file, or NULL if reading from a buffer. More...
|
|
void | setBuffer (void *bufPointer, size_t bufSize) |
| Sets an in-memory buffer to read from, along with its size. More...
|
|
size_t | getNumBytesRead () const |
| Returns number of bytes read from buffer. More...
|
|
SbString | getHeader () |
| Returns the header of the file being read. More...
|
|
float | getIVVersion () |
| Returns the Inventor file version of the file being read (e.g. More...
|
|
bool | isBinary () |
| Returns whether current file/buffer being read is binary. More...
|
|
bool | get (char &c) |
| Reads next character from current file/buffer. More...
|
|
bool | getASCIIBuffer (char &c) |
| Reads next ASCII character from current buffer. More...
|
|
bool | getASCIIFile (char &c) |
| Reads next ASCII character from current file. More...
|
|
bool | readHex (uint32_t &l) |
| Reads next ASCII format hex value from current file/buffer. More...
|
|
bool | read (char &c) |
| Reads item of particular type from current file pointer/buffer. More...
|
|
bool | read (SbString &s) |
|
bool | read (SbName &n, bool validIdent=FALSE) |
|
bool | read (int &i) |
|
bool | read (unsigned int &i) |
|
bool | read (short &s) |
|
bool | read (unsigned short &s) |
|
bool | read (float &f) |
| was ... More...
|
|
bool | read (double &d) |
|
bool | readBinaryArray (unsigned char *c, int length) |
|
bool | readBinaryArray (int32_t *l, int length) |
|
bool | readBinaryArray (float *f, int length) |
|
bool | readBinaryArray (double *d, int length) |
|
bool | eof () const |
| Returns TRUE if current file/buffer is at EOF. More...
|
|
| SoInput (SoInput *dictIn) |
| Constructor and destructor. More...
|
|
void | getLocationString (SbString &string) const |
| Fills in passed string to contain description of current location in all open input files. More...
|
|
void | putBack (char c) |
| Puts a just-read character or string back in input stream/buffer. More...
|
|
void | putBack (const char *string) |
|
void | addReference (const SbName &name, SoBase *base, bool addToGlobalDict=TRUE) |
| Adds a reference to dictionary in current file. More...
|
|
void | removeReference (const SbName &name) |
| Removes a reference to dictionary in current file. More...
|
|
SoBase * | findReference (const SbName &name) const |
| Looks up a reference, returning the base pointer or NULL. More...
|
|
This class is used by the SoDB reading routines when reading Inventor data files. It supports both ASCII (default) and binary Inventor formats. Users can also register additional valid file headers. When reading, SoInput skips over Inventor comments (from '#' to end of line) and can stack input files. When EOF is reached, the stack is popped. This class can also be used to read from a buffer in memory.
- See Also
- SoDB, SoOutput, SoTranReceiver
Definition at line 128 of file SoInput.h.