![]() |
MapLink Pro 11.2
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This class provides binary-mode output file-streaming.
Public Member Functions | |
| TSLofstream () | |
| TSLofstream (const char *s) | |
| ~TSLofstream () | |
| bool | bad () const |
| void | clear (int state=0) |
| void | close () |
| bool | eof () const |
| bool | good () const |
| bool | is_open () const |
| void * | ofs () const |
| void | open (const char *s) |
| void | open_append (const char *s) |
| void | put (char c) |
| int | rdstate () const |
| void | seekp (TSLFilePosition pos) |
| void | setstate (int state) |
| TSLFilePosition | tellp () const |
| TSLofstream & | write (const char *s, int n) |
| TSLofstream & | write (const TSLVariant *s) |
Static Public Member Functions | |
| static TSLTextEncoding | legacyGetEncodingOverride () |
| static void | legacySetEncodingOverride (TSLTextEncoding encoding) |
| TSLofstream::TSLofstream | ( | ) |
Default constructor.
| TSLofstream::TSLofstream | ( | const char * | s | ) |
This constructor tries to open the file with the given filename, s.
| s | The name of the file to open. |
| TSLofstream::~TSLofstream | ( | ) |
Destructor.
| bool TSLofstream::bad | ( | ) | const |
Returns true to indicate a serious I/O error.
| void TSLofstream::clear | ( | int | state = 0 | ) |
Sets or clears the error-state flags.
| state | If 0, all error-state bits are cleared; otherwise the bits are set according to ios enumerator masks. |
| void TSLofstream::close | ( | ) |
This method closes the file.
| bool TSLofstream::eof | ( | ) | const |
Returns true if end of file has been reached.
| bool TSLofstream::good | ( | ) | const |
Returns true if all error bits are clear.
| bool TSLofstream::is_open | ( | ) | const |
Returns a nonzero value if this stream is attached to an open disk file identified by a file descriptor; otherwise 0.
|
static |
Get the legacy encoding override.
If set, this override specifies the encoding which text will be converted to when writing pre-MapLink 7.6 file formats.
This function is only for use with legacy applications, and will be removed in a future release.
Returns the legacy text encoding override.
|
static |
Set the legacy text encoding override.
If set, this override specifies the encoding which text will be converted to when writing pre-MapLink 7.6 file formats.
This function is only for use with legacy applications, and will be removed in a future release.
This function is not thread safe, and should be called once at the start of an application.
| encoding | The text encoding to use. |
| void * TSLofstream::ofs | ( | ) | const |
| void TSLofstream::open | ( | const char * | s | ) |
This method tries to open the file with the given filename, s.
| s | The name of the file to open. |
| void TSLofstream::open_append | ( | const char * | s | ) |
This method tries to open the file with the given filename, s for appending.
| s | The name of the file to open. |
| void TSLofstream::put | ( | char | c | ) |
Insert a single character into the stream.
| c | The char. |
| int TSLofstream::rdstate | ( | ) | const |
The member function returns the stored stream state information.
| void TSLofstream::seekp | ( | TSLFilePosition | pos | ) |
Changes the put pointer for the stream.
| pos | The new position value. |
| void TSLofstream::setstate | ( | int | state | ) |
The member function effectively calls clear (state | rdstate() ).
| TSLFilePosition TSLofstream::tellp | ( | ) | const |
Get the value for the stream's put pointer.
| TSLofstream & TSLofstream::write | ( | const char * | s, |
| int | n ) |
This unformatted output method inserts up to n char elements from the buffer s.
| s | A pointer to the character array. |
| n | The number of elements to be written. |
| TSLofstream & TSLofstream::write | ( | const TSLVariant * | s | ) |
This unformatted output method inserts one TSLVariant .
| s | A pointer to the TSLVariant. |