IShFileStream Struct Reference
[Shell Utilities]

Simple stream interface to provide basic file access services. More...

Inheritance diagram for IShFileStream:
IMCUnknown

List of all members.

Public Member Functions

virtual MCCOMErr MCCOMAPI InitFileStream (int8 *fileName, uint32 mode)=0
virtual uint32 MCCOMAPI Tell ()=0
virtual MCCOMErr MCCOMAPI Seek (uint32 offset, int16 direction)=0
virtual MCCOMErr MCCOMAPI Read (int8 *s, uint32 n)=0
virtual MCCOMErr MCCOMAPI Write (int8 *s, uint32 n)=0
virtual MCCOMErr MCCOMAPI Append (uint32 n)=0
virtual MCCOMErr MCCOMAPI Get (int8 *c)=0
virtual MCCOMErr MCCOMAPI GetString (int8 *str, uint32 count, int8 delim)=0
virtual MCCOMErr MCCOMAPI GetLine (int8 *str, uint32 count)=0
virtual MCCOMErr MCCOMAPI GetInt32 (int32 *num)=0
virtual MCCOMErr MCCOMAPI GetDouble (double *num)=0
virtual MCCOMErr MCCOMAPI Put (int8 c)=0
virtual MCCOMErr MCCOMAPI PutString (int8 *str)=0
virtual MCCOMErr MCCOMAPI PutLine (int8 *str)=0
virtual MCCOMErr MCCOMAPI PutEOL ()=0
virtual MCCOMErr MCCOMAPI PutInt32 (int32 num)=0
virtual MCCOMErr MCCOMAPI PutDouble (double num)=0
virtual MCCOMErr MCCOMAPI PutBack (int8 c)=0
virtual boolean MCCOMAPI Good ()=0
virtual boolean MCCOMAPI Fail ()=0
virtual boolean MCCOMAPI Eof ()=0
virtual MCCOMErr MCCOMAPI SetMacOSInfo (uint32 creator, uint32 type)=0
virtual uint32 MCCOMAPI GetFileSize ()=0

Detailed Description

Simple stream interface to provide basic file access services.


Member Function Documentation

virtual MCCOMErr MCCOMAPI IShFileStream::Append ( uint32  n  )  [pure virtual]

Increases file size by n bytes

Parameters:
n Number of bytes to append
virtual boolean MCCOMAPI IShFileStream::Eof (  )  [pure virtual]
Returns:
true if the file stream has reached the end of the file
virtual boolean MCCOMAPI IShFileStream::Fail (  )  [pure virtual]
Returns:
true if the file stream has encountered a failure in reading or writing
virtual MCCOMErr MCCOMAPI IShFileStream::Get ( int8 c  )  [pure virtual]

Read one text character

Parameters:
c pointer to structure to hold the character
virtual MCCOMErr MCCOMAPI IShFileStream::GetDouble ( double *  num  )  [pure virtual]

Reads a double from the stream

Parameters:
num Pointer to the double into which the function will read
virtual uint32 MCCOMAPI IShFileStream::GetFileSize (  )  [pure virtual]
Returns:
the size of the file in bytes
virtual MCCOMErr MCCOMAPI IShFileStream::GetInt32 ( int32 *  num  )  [pure virtual]

Reads an int32 from the stream

Parameters:
num Pointer to the int32 into which the function will read
virtual MCCOMErr MCCOMAPI IShFileStream::GetLine ( int8 str,
uint32  count 
) [pure virtual]

Reads one line (terminated by CR or CR/LF) from the stream.

Parameters:
str Pointer to structure to hold the string
count Maximum number of characters to read
virtual MCCOMErr MCCOMAPI IShFileStream::GetString ( int8 str,
uint32  count,
int8  delim 
) [pure virtual]

Reads a text string

Parameters:
str Pointer to structure to hold the string
count Maximum number of characters to read
delim End-of-string delimiter
virtual boolean MCCOMAPI IShFileStream::Good (  )  [pure virtual]
Returns:
true if the file stream has not encountered errors.
virtual MCCOMErr MCCOMAPI IShFileStream::InitFileStream ( int8 fileName,
uint32  mode 
) [pure virtual]

Initializes the file stream.

Parameters:
fileName C string filename for the file to open.
mode Pass kShStreamIn for reading or kShStreamOut for writing.
virtual MCCOMErr MCCOMAPI IShFileStream::Put ( int8  c  )  [pure virtual]

Writes a character to the stream

Parameters:
c character to write
virtual MCCOMErr MCCOMAPI IShFileStream::PutBack ( int8  c  )  [pure virtual]

Returns c to the file stream's buffer, moving the file seek position back by one byte

Parameters:
c Character to put back
virtual MCCOMErr MCCOMAPI IShFileStream::PutDouble ( double  num  )  [pure virtual]

Writes a double to the stream

Parameters:
num double to write
virtual MCCOMErr MCCOMAPI IShFileStream::PutEOL (  )  [pure virtual]

Writes an EOL to the stream

virtual MCCOMErr MCCOMAPI IShFileStream::PutInt32 ( int32  num  )  [pure virtual]

Writes an int32 to the stream

Parameters:
num int32 to write
virtual MCCOMErr MCCOMAPI IShFileStream::PutLine ( int8 str  )  [pure virtual]

Writes a (
-terminated) line to the stream

Parameters:
str Pointer to the string to write
virtual MCCOMErr MCCOMAPI IShFileStream::PutString ( int8 str  )  [pure virtual]

Writes a (null-terminated) string to the stream

Parameters:
str Pointer to the string to write
virtual MCCOMErr MCCOMAPI IShFileStream::Read ( int8 s,
uint32  n 
) [pure virtual]

Binary read of n bytes

Parameters:
s Pointer to structure to hold the read
n Number of bytes to read
virtual MCCOMErr MCCOMAPI IShFileStream::Seek ( uint32  offset,
int16  direction 
) [pure virtual]

Seek within the file.

Parameters:
offset Offset in bytes to seek
direction Direction specifier: pass kShStreamBegin, kShStreamCurrent, or kShStreamEnd
virtual MCCOMErr MCCOMAPI IShFileStream::SetMacOSInfo ( uint32  creator,
uint32  type 
) [pure virtual]

Sets the creator and file type designators in the resource fork of a MacOS file.

Parameters:
creator Creator type (ie 'CRRA')
type File type (ie 'JPEG')
virtual uint32 MCCOMAPI IShFileStream::Tell (  )  [pure virtual]
Returns:
Current offset in the file
virtual MCCOMErr MCCOMAPI IShFileStream::Write ( int8 s,
uint32  n 
) [pure virtual]

Binary write n bytes

Parameters:
s Location of data to write
n Number of bytes to write

The documentation for this struct was generated from the following file:
Generated on Mon Apr 26 22:47:51 2010 for Carrara SDK Doc by  doxygen 1.6.3