NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
CrossPlatformFileIO.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CP_FILE_OPEN_ERROR   10000
 
#define CP_FILE_CLOSE_ERROR   10001
 
#define CP_FILE_EOF_ERROR   10002
 
#define CP_FILE_READ_ERROR   10003
 
#define CP_FILE_WRITE_ERROR   10004
 
#define CP_FILE_POS_ERROR   10005
 
#define CP_FILE_REF   FILE*
 

Functions

int CPCreateFile (const char *fullFilePath, int overwrite, long macCreator, long macFileType)
 
int CPDeleteFile (const char *fullFilePath)
 
int CPOpenFile (const char *fullFilePath, int readOrWrite, CP_FILE_REF *fileRefPtr)
 
int CPCloseFile (CP_FILE_REF fileRef)
 
int CPReadFile (CP_FILE_REF fileRef, unsigned long count, void *buffer, unsigned long *numBytesReadPtr)
 
int CPReadFile2 (CP_FILE_REF fileRef, unsigned long count, void *buffer, unsigned long *numBytesReadPtr)
 
int CPWriteFile (CP_FILE_REF fileRef, unsigned long count, const void *buffer, unsigned long *numBytesWrittenPtr)
 
int CPGetFilePosition (CP_FILE_REF fileRef, unsigned long *filePosPtr)
 
int CPSetFilePosition (CP_FILE_REF fileRef, long filePos, int mode)
 
int CPAtEndOfFile (CP_FILE_REF fileRef)
 
int CPNumberOfBytesInFile (CP_FILE_REF fileRef, unsigned long *numBytesPtr)
 

Macro Definition Documentation

◆ CP_FILE_CLOSE_ERROR

#define CP_FILE_CLOSE_ERROR   10001

Definition at line 5 of file CrossPlatformFileIO.h.

◆ CP_FILE_EOF_ERROR

#define CP_FILE_EOF_ERROR   10002

Definition at line 6 of file CrossPlatformFileIO.h.

◆ CP_FILE_OPEN_ERROR

#define CP_FILE_OPEN_ERROR   10000

Definition at line 4 of file CrossPlatformFileIO.h.

◆ CP_FILE_POS_ERROR

#define CP_FILE_POS_ERROR   10005

Definition at line 9 of file CrossPlatformFileIO.h.

◆ CP_FILE_READ_ERROR

#define CP_FILE_READ_ERROR   10003

Definition at line 7 of file CrossPlatformFileIO.h.

◆ CP_FILE_REF

#define CP_FILE_REF   FILE*

Definition at line 11 of file CrossPlatformFileIO.h.

◆ CP_FILE_WRITE_ERROR

#define CP_FILE_WRITE_ERROR   10004

Definition at line 8 of file CrossPlatformFileIO.h.

Function Documentation

◆ CPAtEndOfFile()

int CPAtEndOfFile ( CP_FILE_REF  fileRef)

Definition at line 339 of file CrossPlatformFileIO.cpp.

Referenced by CPReadFile(), and CPReadFile2().

◆ CPCloseFile()

int CPCloseFile ( CP_FILE_REF  fileRef)

Definition at line 139 of file CrossPlatformFileIO.cpp.

References CP_FILE_CLOSE_ERROR.

Referenced by NumeRe::IgorBinaryWave::readFile().

◆ CPCreateFile()

int CPCreateFile ( const char *  fullFilePath,
int  overwrite,
long  macCreator,
long  macFileType 
)

Definition at line 41 of file CrossPlatformFileIO.cpp.

References CPDeleteFile().

Here is the call graph for this function:

◆ CPDeleteFile()

int CPDeleteFile ( const char *  fullFilePath)

Definition at line 85 of file CrossPlatformFileIO.cpp.

Referenced by CPCreateFile().

◆ CPGetFilePosition()

int CPGetFilePosition ( CP_FILE_REF  fileRef,
unsigned long *  filePosPtr 
)

Definition at line 281 of file CrossPlatformFileIO.cpp.

References CP_FILE_POS_ERROR.

Referenced by ReadWave().

◆ CPNumberOfBytesInFile()

int CPNumberOfBytesInFile ( CP_FILE_REF  fileRef,
unsigned long *  numBytesPtr 
)

Definition at line 357 of file CrossPlatformFileIO.cpp.

References CP_FILE_POS_ERROR.

◆ CPOpenFile()

int CPOpenFile ( const char *  fullFilePath,
int  readOrWrite,
CP_FILE_REF fileRefPtr 
)

Definition at line 120 of file CrossPlatformFileIO.cpp.

References CP_FILE_OPEN_ERROR.

Referenced by NumeRe::IgorBinaryWave::readFile().

◆ CPReadFile()

int CPReadFile ( CP_FILE_REF  fileRef,
unsigned long  count,
void *  buffer,
unsigned long *  numBytesReadPtr 
)

Definition at line 170 of file CrossPlatformFileIO.cpp.

References CP_FILE_EOF_ERROR, CP_FILE_READ_ERROR, and CPAtEndOfFile().

Referenced by LoadNumericWaveData(), and ReadWave().

Here is the call graph for this function:

◆ CPReadFile2()

int CPReadFile2 ( CP_FILE_REF  fileRef,
unsigned long  count,
void *  buffer,
unsigned long *  numBytesReadPtr 
)

Definition at line 214 of file CrossPlatformFileIO.cpp.

References CP_FILE_EOF_ERROR, CP_FILE_READ_ERROR, and CPAtEndOfFile().

Here is the call graph for this function:

◆ CPSetFilePosition()

int CPSetFilePosition ( CP_FILE_REF  fileRef,
long  filePos,
int  mode 
)

Definition at line 307 of file CrossPlatformFileIO.cpp.

References CP_FILE_POS_ERROR.

Referenced by ReadWave().

◆ CPWriteFile()

int CPWriteFile ( CP_FILE_REF  fileRef,
unsigned long  count,
const void *  buffer,
unsigned long *  numBytesWrittenPtr 
)

Definition at line 252 of file CrossPlatformFileIO.cpp.

References CP_FILE_WRITE_ERROR.