|
bool | Open (FILE *file, bool append=false, unsigned int encoding=0, LineEndMode mode=Text) |
| Bind on a FILE pointer. More...
|
|
bool | Open (HANDLE fileHandle, bool append=false, unsigned int encoding=0, LineEndMode mode=Text) |
| Bind on a file File handle This service is used to allow a developer to access a file open with fopen but with the advantage to use the SDK API. More...
|
|
| Writer () |
| Default Constructor. More...
|
|
virtual | ~Writer () |
| Destructor. More...
|
|
bool | Open (const MCHAR *fileName, bool append=false, unsigned int encoding=0, LineEndMode mode=Text) |
| Open a file. More...
|
|
bool | Open (const MaxString &fileName, bool append=false, unsigned int encoding=0, LineEndMode mode=Text) |
| Open a file. More...
|
|
void | Close () |
| Close the file. More...
|
|
MaxString | LastError () const |
| Returns the last error return by the BinaryStream. More...
|
|
unsigned int | Encoding () const |
| Returns the actual encoding used. More...
|
|
size_t | Write (const char *string, size_t nbchars=(size_t) -1) |
| Write string to file. More...
|
|
size_t | Write (const wchar_t *string, size_t nbchars=(size_t) -1) |
| Write string to file. More...
|
|
size_t | Write (const MaxString &string) |
| Write string to file. More...
|
|
size_t | WriteChar (char character) |
| Write an ASCII char. More...
|
|
size_t | WriteChar (wchar_t character) |
| Write an ASCII char. More...
|
|
bool | CanWrite () const |
| Returns true if we can write to file. More...
|
|
virtual bool | IsFileOpen () const |
| Returns true if file is open. More...
|
|
virtual bool | IsEndOfFile () const |
| Returns true if file pointer is at end if file. More...
|
|
virtual size_t | Position () const |
| Get the current position in the file. More...
|
|
virtual size_t | Seek (long offset, int origin) |
| Seek inside the stream. More...
|
|
void | Flush () |
| Make sure that all the buffer are synced with the OS native objects. More...
|
|
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...
|
|
Write Text files.
This class was intended to be used to write text file. It differ from the ANSI fopen, fprintf, et al, because it's smarter when it's to modify existing files. It detect the underlying file format and match it intelligently.
It was designed to resolve the following problems:
- Avoid mixing different text format in the same file.
- Convert intelligently strings into binary data.