home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1995 November
/
PCWK1195.iso
/
inne
/
win
/
sieciowe
/
oiv_demo.lzh
/
disk2
/
DATA.2
/
include
/
Ivf
/
IvfArchiveInput.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-05-23
|
2KB
|
77 lines
#ifndef __IVF_ARCHIVE_INPUT_H__
#define __IVF_ARCHIVE_INPUT_H__
#include <Inventor/SoInput.h>
class CArchive ;
class CFile ;
class IvfArchiveInput : public SoInput {
public:
IvfArchiveInput() ;
IvfArchiveInput(CArchive *ar) ;
virtual ~IvfArchiveInput() ;
// Reads next character from current file/buffer. Returns FALSE on
// EOF or error.
virtual SbBool get(char &c);
// Reads item of particular type from current file pointer/buffer. All
// skip white space before reading and return FALSE on EOF or if
// item could not be read.
virtual SbBool read(char &c);
// C-api: name=readStr
virtual SbBool read(SbString &s);
// C-api: name=readName
virtual SbBool read(SbName &n, SbBool validIdent = FALSE);
// C-api: name=readInt
virtual SbBool read(int &i);
// C-api: name=readUInt
virtual SbBool read(unsigned int &i);
// C-api: name=readShort
virtual SbBool read(short &s);
// C-api: name=readUShort
virtual SbBool read(unsigned short &s);
// C-api: name=readLong
virtual SbBool read(long &l);
// C-api: name=readULong
virtual SbBool read(unsigned long &l);
// C-api: name=readFloat
virtual SbBool read(float &f);
// C-api: name=readDbl
virtual SbBool read(double &d);
// C-api: name=readBinLongArray
virtual SbBool readBinaryArray(long *l, int length);
// C-api: name=readBinFloatArray
virtual SbBool readBinaryArray(float *f, int length);
// C-api: name=readBinDblArray
virtual SbBool readBinaryArray(double *d, int length);
// Returns TRUE if current file/buffer is at EOF
virtual SbBool eof() const;
// Puts a just-read character or string back in input stream/buffer
virtual void putBack(char c);
virtual void putBack(const char *string);
private:
CArchive *m_pAr ;
CFile *m_pFile ;
SbBool isEof ;
int nBackCharIndex ;
int nMaxBackChar ;
char *backChar ;
SbBool openFromArchive(SbBool okIfNotFound);
void findFromArchive() ;
void initFromArchive(
SbBool openedHere,
SbDict *refDict = NULL);
} ;
#endif