This class is used to access text file with both reader and writer functionality.
More...
|
| ReaderWriter () |
| Default Constructor. More...
|
|
virtual | ~ReaderWriter () |
| Destructor. More...
|
|
bool | Open (const MCHAR *fileName, unsigned int streamMode, unsigned int encoding=0, LineEndMode mode=Text) |
| Open a file using a file name. More...
|
|
bool | Open (const MaxSDK::Util::MaxString &fileName, unsigned int streamMode, unsigned int encoding=0, LineEndMode mode=Text) |
| Open a file using a file name. More...
|
|
void | Close () |
| Close the opened file. More...
|
|
void | Flush () |
| Flush to file the cached data. More...
|
|
virtual size_t | Seek (long offset, int origin) |
| Seek inside the file. More...
|
|
virtual Char | ReadChar (bool peek=false) const |
| Read a character from the file. More...
|
|
virtual unsigned int | ReadCharUTF32 (bool peek=false) const |
| Read a char in UTF32 encoding. More...
|
|
virtual MaxString | ReadChars (size_t nchars) const |
| Reads characters from the file. More...
|
|
virtual MaxString | ReadLine (size_t nchars=(size_t) -1, bool dontReturnEOL=false) const |
| Read a line from the file. More...
|
|
virtual bool | IsEndOfFile () const |
| Used to determine if we read the end of file. More...
|
|
virtual size_t | Position () const |
| used to determine the current position in the file More...
|
|
virtual size_t | LineNumber () const |
| Used to obtain the current line number. More...
|
|
virtual size_t | UnreadChar (const Char &c) |
| Unread the passed character. More...
|
|
virtual size_t | Write (const char *string, size_t nchars=(size_t) -1) |
| Write string to file. More...
|
|
virtual size_t | Write (const wchar_t *string, size_t nchars=(size_t) -1) |
| Write string to file. More...
|
|
virtual size_t | Write (const MaxString &string) |
| Write string to file. More...
|
|
virtual bool | CanWrite () const |
| Determine if we can write to the file. More...
|
|
virtual bool | IsFileOpen () const |
| Returns true if file is open. More...
|
|
void | EnsureAllocated (size_t s) |
|
virtual | ~BaseTextReader () |
|
virtual | ~BaseTextWriter () |
|
size_t | Printf (const wchar_t *format,...) |
| Write a formatted string using current locale. More...
|
|
size_t | Vprintf (const wchar_t *format, va_list argList) |
| Write a formatted string using current locale. More...
|
|
size_t | Printf_l (const wchar_t *format, const _locale_t theLocale,...) |
| Write a formatted string using a specified locale. More...
|
|
size_t | Vprintf_l (const wchar_t *format, const _locale_t theLocale, va_list argList) |
| Write a formatted string using a specified locale. More...
|
|
|
static UtilExport void * | operator new (size_t size) |
| Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
|
|
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e) |
| Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
|
|
static UtilExport void * | operator new (size_t size, const char *filename, int line) |
| New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
|
|
static UtilExport void * | operator new (size_t size, int block_type, const char *filename, int line) |
| New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
|
|
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, const char *filename, int line) |
| New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
|
|
static UtilExport void * | operator new (size_t size, unsigned long flags) |
| New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
|
|
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, unsigned long flags) |
| New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
|
|
static UtilExport void * | operator new[] (size_t size) |
| New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
|
|
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e) |
| New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
|
|
static UtilExport void * | operator new[] (size_t size, const char *filename, int line) |
| New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
|
|
static UtilExport void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
| New operator used to allocate arrays of objects. More...
|
|
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line) |
| New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
|
|
static UtilExport void * | operator new[] (size_t size, unsigned long flags) |
| New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
|
|
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, unsigned long flags) |
| New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
|
|
static UtilExport void | operator delete (void *ptr) |
| Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e) |
| Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
|
|
static UtilExport void | operator delete (void *ptr, const char *filename, int line) |
| Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void | operator delete (void *ptr, int block_type, const char *filename, int line) |
| Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
| Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
|
|
static UtilExport void | operator delete (void *ptr, unsigned long flags) |
| Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags) |
| Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
|
|
static UtilExport void | operator delete[] (void *ptr) |
| Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e) |
| Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
|
|
static UtilExport void | operator delete[] (void *ptr, const char *filename, int line) |
| Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void | operator delete[] (void *ptr, int block_type, const char *filename, int line) |
| Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
| Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
|
|
static UtilExport void | operator delete[] (void *ptr, unsigned long flags) |
| Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags) |
| Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void * | operator new (size_t size, void *placement_ptr) |
| Placement new operator. More...
|
|
static UtilExport void | operator delete (void *ptr, void *placement_ptr) |
| Placement delete operator. More...
|
|
static UtilExport void * | aligned_malloc (size_t size, size_t alignment) |
| Allocates memory on a specified alignment boundary. More...
|
|
static UtilExport void * | aligned_realloc (void *ptr, size_t size, size_t alignment) |
| Reallocates memory on a specified alignment boundary. More...
|
|
static UtilExport void | aligned_free (void *ptr) |
| Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
|
|
This class is used to access text file with both reader and writer functionality.
- See also
- Reader class when file IO requirements are only for reading.
-
Writer class when file IO requirements are only for writing.