CSIBCFileRam Class Reference

This class implements a memory file object. More...

#include <SIBCFileRam.h>

List of all members.

Public Member Functions

  CSIBCFileRam ()
  CSIBCFileRam (SI_Char *pFileName, _SI_FILE_MODE pAccessRights, void *pMemoryBlock, SI_Int nMemorySize)
  ~CSIBCFileRam ()
SI_Void  Init ()
SI_Bool  IsValid ()
SI_Void  Open (SI_Char *pFileName, _SI_FILE_MODE pAccessRights, SI_Void *pMemoryBlock, SI_Int nMemorySize)
SI_Void  Close ()
SI_Int  Read (void *pDest, SI_Int nDestSize, SI_Int nCount)


Detailed Description

This class implements a memory file object.


Constructor & Destructor Documentation

CSIBCFileRam (  )  [inline]

Constructor

Returns:
An instance of CSIBCFileRam

CSIBCFileRam ( SI_Char *  pFileName,
_SI_FILE_MODE  pAccessRights,
void *  pMemoryBlock,
SI_Int  nMemorySize  
) [inline]

Constructor with user specified parameters

Parameters:
pFileName  pointer to a character array storing the file name
pAccessRights  file access modes
__SI_FILE_READ_TEXT : opens a text file in read mode
__SI_FILE_READ_BINARY : opens a binary file in read mode
__SI_FILE_WRITE_TEXT : unsupported mode
__SI_FILE_WRITE_BINARY : unsupported mode
pMemoryBlock  pointer to the read/write memory block to use
nMemorySize  size of the memory block
Returns:
an instance of CSIBCFileRam

~CSIBCFileRam (  )  [inline]

Destructor


Member Function Documentation

SI_Void Init (  )  [inline]

Set a CSIBCFileRam instance default values

Returns:
SI_Void

SI_Bool IsValid (  )  [inline]

Checks if the memory file object is valid

Returns:
SI_Bool
Return values:
TRUE  memory file object is valid
FALSE  memory file object is invalid

SI_Void Open ( SI_Char *  pFileName,
_SI_FILE_MODE  pAccessRights,
SI_Void *  pMemoryBlock,
SI_Int  nMemorySize  
) [inline]

Opens a memory file

Parameters:
pFileName  Pointer to a character array storing the name of the file.
pAccessRights  Pointer to access rights.
pMemoryBlock  Pointer to a memory block.
nMemorySize  the memory block size.
Returns:
SI_Void

SI_Void Close (  )  [inline]

Close the memory file

Returns:
SI_Void

SI_Int Read ( void *  pDest,
SI_Int  nDestSize,
SI_Int  nCount  
) [inline]

Read from the open memory file

Parameters:
pDest  Pointer to the read buffer
nDestSize  size in bytes of the buffer element
nCount  counts how many items have been read
Returns:
SI_Int the percentage of the file read


The documentation for this class was generated from the following file: