GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SOINPUT (3)

NAME

SoInput — used to read Inventor data files

CONTENTS

Inherits From
Synopsis
Description
Methods
See Also

INHERITS FROM

SoInput

SYNOPSIS

#include <Inventor/SoInput.h>

Methods from class SoInput:

       
                             
                              SoInput()    
   
                             
                              ~SoInput()    
static void    
                             
static void                   addDirectoryFirst(const char *dirName)    
static void    
                             
static void                   addDirectoryLast(const char *dirName)    
static void    
                             
static void                   addEnvDirectoriesFirst(const char *envVarName)    
static void    
                             
static void                   addEnvDirectoriesLast(const char *envVarName)    
static void    
                             
static void                   removeDirectory(const char *dirName)    
static void    
                             
static void                   clearDirectories()    
static const SbStringList &    
                             
static const SbStringList &   getDirectories()    
void    
                             
void                          setFilePointer(FILE *newFP)    
SbBool    
                             
SbBool                        openFile(const char *fileName, SbBool okIfNotFound = FALSE)    
SbBool    
                             
SbBool                        pushFile(const char *fileName)    
   
                             
                              closeFile()    
SbBool    
                             
SbBool                        isValidFile()    
FILE *    
                             
FILE *                        getCurFile() const    
const char *    
                             
const char *                  getCurFileName() const    
void    
                             
void                          setBuffer(void *bufPointer, size_t bufSize)    
SbString    
                             
SbString                      getHeader()    
float    
                             
float                         getIVVersion()

DESCRIPTION

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.

METHODS

       
                             
                              SoInput()    
   
                             
                              ~SoInput()
Constructor and destructor. The default SoInput reads from stdin. The destructor closes any files opened by the SoInput.

    static void    
                             
static void                   addDirectoryFirst(const char *dirName)    
static void    
                             
static void                   addDirectoryLast(const char *dirName)    
static void    
                             
static void                   addEnvDirectoriesFirst(const char *envVarName)    
static void    
                             
static void                   addEnvDirectoriesLast(const char *envVarName)
The SoInput class maintains a global list of directories that is searched to find files when opening them. Directories are searched in order. Each of these routines adds directories to the list, either at the beginning ("First") or the end ("Last"). The last two routines add directories named in the value of the given environment variable. Directories may be separated by colons or whitespace in the variable’s value.

    static void    
                             
static void                   removeDirectory(const char *dirName)
Removes named directory from the list.

    static void    
                             
static void                   clearDirectories()
Clears the list of directories (including the current directory).

    static const SbStringList &    
                             
static const SbStringList &   getDirectories()
Returns the list of directories as an SbStringList.

    void    
                             
void                          setFilePointer(FILE *newFP)
Sets file pointer to read from. Clears the stack of input files if necessary.

    SbBool    
                             
SbBool                        openFile(const char *fileName, SbBool okIfNotFound = FALSE)
Opens named file, sets file pointer to result. Clears the stack of input files if necessary. This returns FALSE on error; if okIfNotFound is FALSE (the default), this prints an error message if the file could not be found.

    SbBool    
                             
SbBool                        pushFile(const char *fileName)
Opens named file, pushing the resulting file pointer onto the stack. Returns FALSE on error.

       
                             
                              closeFile()
Closes all files on stack opened with openFile() or pushFile().

    SbBool    
                             
SbBool                        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.

    FILE *    
                             
FILE *                        getCurFile() const
Returns a pointer to the current file, or NULL if reading from a buffer.

    const char *    
                             
const char *                  getCurFileName() const
Returns full name (including directory path) of current file, or NULL if reading from a buffer.

    void    
                             
void                          setBuffer(void *bufPointer, size_t bufSize)
Sets an in-memory buffer to read from, along with its size.

    SbString    
                             
SbString                      getHeader()
Returns the header of the file being read.

    float    
                             
float                         getIVVersion()
Returns the Inventor file version of the file being read (e.g. 2.1). If the file has a header registered through SoDB::registerHeader(), the returned version is the Inventor version registered with the header.

SEE ALSO

SoDB, SoOutput, SoTranReceiver

Search for    or go to Top of page |  Section 3 |  Main Index


SOINPUT(3IV) (-->)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.