Platform_NULL_FileSystem_File Class Reference

Public Member Functions | |
| Platform_NULL_FileSystem_File () | |
| virtual const char * | GetPath () |
| virtual bool | Exists () |
| virtual bool | Create () |
| virtual bool | Open () |
| virtual bool | Close () |
| virtual void | Delete () |
| virtual int | GetPosition () |
| virtual int | SetPosition (int position, SetPositionOrigin origin) |
| virtual int | Write (const char *value, int count=1) |
| virtual int | Write (const short *value, int count=1) |
| virtual int | Write (const int *value, int count=1) |
| virtual int | Write (const long *value, int count=1) |
| virtual int | Write (const unsigned char *value, int count=1) |
| virtual int | Write (const unsigned short *value, int count=1) |
| virtual int | Write (const unsigned int *value, int count=1) |
| virtual int | Write (const unsigned long *value, int count=1) |
| virtual int | Write (const float *value, int count=1) |
| virtual int | Write (const double *value, int count=1) |
| virtual int | Write (const bool *value, int count=1) |
| virtual int | Read (char *value, int count=1) |
| virtual int | Read (short *value, int count=1) |
| virtual int | Read (int *value, int count=1) |
| virtual int | Read (long *value, int count=1) |
| virtual int | Read (unsigned char *value, int count=1) |
| virtual int | Read (unsigned short *value, int count=1) |
| virtual int | Read (unsigned int *value, int count=1) |
| virtual int | Read (unsigned long *value, int count=1) |
| virtual int | Read (float *value, int count=1) |
| virtual int | Read (double *value, int count=1) |
| virtual int | Read (bool *value, int count=1) |
Detailed Description
Definition at line 20 of file Platform_NULL_FileSystem_File.h.
Constructor & Destructor Documentation
| Platform_NULL_FileSystem_File::Platform_NULL_FileSystem_File | ( | ) |
Definition at line 7 of file Platform_NULL_FileSystem_File.cpp.
Member Function Documentation
| const char * Platform_NULL_FileSystem_File::GetPath | ( | ) | [virtual] |
Retrieves the path specified when this file object was created
- Returns:
- The path for the file object
Implements Platform_FileSystem_File.
Definition at line 14 of file Platform_NULL_FileSystem_File.cpp.
| bool Platform_NULL_FileSystem_File::Exists | ( | ) | [virtual] |
Checks if the file which this file object represents exists.
- Returns:
- True if the file exists, false if it doesn't
Implements Platform_FileSystem_File.
Definition at line 22 of file Platform_NULL_FileSystem_File.cpp.
| bool Platform_NULL_FileSystem_File::Create | ( | ) | [virtual] |
Creates the file which this file object represent. If it already exists, it will be replaced. The file is then left open for writing, and should be closed by a call to Close.
- Returns:
- True if the file was successfully created, false if there was an error
Implements Platform_FileSystem_File.
Definition at line 30 of file Platform_NULL_FileSystem_File.cpp.
| bool Platform_NULL_FileSystem_File::Open | ( | ) | [virtual] |
Opens the file which this file object represent, leaving it ready for reading from. When done, it should be closed by a call to Close.
- Returns:
- True if the file was successfully opened, false if there was an error
Implements Platform_FileSystem_File.
Definition at line 38 of file Platform_NULL_FileSystem_File.cpp.
| bool Platform_NULL_FileSystem_File::Close | ( | ) | [virtual] |
Close a file which was opened for reading by a call to Open, or for writing by a call to Create.
- Returns:
- True if the file was successfully closed, false if there was an error
Implements Platform_FileSystem_File.
Definition at line 46 of file Platform_NULL_FileSystem_File.cpp.
| void Platform_NULL_FileSystem_File::Delete | ( | ) | [virtual] |
Deletes the file which this file object represent, if it exists.
Implements Platform_FileSystem_File.
Definition at line 54 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::GetPosition | ( | ) | [virtual] |
Retrieves the current read or write position of a file which is currently open for reading or writing, respectively. The returned position is relative to the start of the file.
- Returns:
- The current position of the file
Implements Platform_FileSystem_File.
Definition at line 61 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::SetPosition | ( | int | position, | |
| SetPositionOrigin | origin | |||
| ) | [virtual] |
Sets the read or write position of a file which is currently open for reading or writing, respectively. The specified position can be relative to the current position, the start of the file or the end of the file, as specified.
- Returns:
- The new position
Implements Platform_FileSystem_File.
Definition at line 69 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Write | ( | const char * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Writes the specified values to the file. Endianness is handled automatically by the platform-specific implementation, such that everything is written to file as little endian. This is to ensure binary file compatibility across platforms.
- Parameters:
-
value Pointer to the value(s) which is to be written count Number of values to write
- Returns:
- The number of values that was successfully written
Implements Platform_FileSystem_File.
Definition at line 77 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Write | ( | const short * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 82 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Write | ( | const int * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 87 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Write | ( | const long * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 92 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Write | ( | const unsigned char * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 97 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Write | ( | const unsigned short * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 102 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Write | ( | const unsigned int * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 107 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Write | ( | const unsigned long * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 112 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Write | ( | const float * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 117 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Write | ( | const double * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 122 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Write | ( | const bool * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 127 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Read | ( | char * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Reads the specified number of values from the file, into the specified memory area. Endianness is handled automatically by the platform-specific implementation, assuming that values stored in the file are all little endian. This is to ensure binary file compatibility across platforms.
- Parameters:
-
value Pointer to the memory where the values are to be read count Number of values to read
- Returns:
- The number of values that was successfully read
Implements Platform_FileSystem_File.
Definition at line 135 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Read | ( | short * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 140 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Read | ( | int * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 145 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Read | ( | long * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 150 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Read | ( | unsigned char * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 155 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Read | ( | unsigned short * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 160 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Read | ( | unsigned int * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 165 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Read | ( | unsigned long * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 170 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Read | ( | float * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 175 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Read | ( | double * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 180 of file Platform_NULL_FileSystem_File.cpp.
| int Platform_NULL_FileSystem_File::Read | ( | bool * | value, | |
| int | count = 1 | |||
| ) | [virtual] |
Implements Platform_FileSystem_File.
Definition at line 185 of file Platform_NULL_FileSystem_File.cpp.
Reproduction/republishing of any material on this site without permission is strictly prohibited.
