MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLofstream Class Reference

Detailed Description

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
 
TSLofstreamwrite (const char *s, int n)
 
TSLofstreamwrite (const TSLVariant *s)
 

Static Public Member Functions

static TSLTextEncoding legacyGetEncodingOverride ()
 
static void legacySetEncodingOverride (TSLTextEncoding encoding)
 

Constructor & Destructor Documentation

◆ TSLofstream() [1/2]

TSLofstream::TSLofstream ( )

Default constructor.

◆ TSLofstream() [2/2]

TSLofstream::TSLofstream ( const char * s)

This constructor tries to open the file with the given filename, s.

Parameters
sThe name of the file to open.

◆ ~TSLofstream()

TSLofstream::~TSLofstream ( )

Destructor.

Member Function Documentation

◆ bad()

bool TSLofstream::bad ( ) const

Returns true to indicate a serious I/O error.

◆ clear()

void TSLofstream::clear ( int state = 0)

Sets or clears the error-state flags.

Parameters
stateIf 0, all error-state bits are cleared; otherwise the bits are set according to ios enumerator masks.

◆ close()

void TSLofstream::close ( )

This method closes the file.

◆ eof()

bool TSLofstream::eof ( ) const

Returns true if end of file has been reached.

◆ good()

bool TSLofstream::good ( ) const

Returns true if all error bits are clear.

◆ is_open()

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.

◆ legacyGetEncodingOverride()

static TSLTextEncoding TSLofstream::legacyGetEncodingOverride ( )
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.

◆ legacySetEncodingOverride()

static void TSLofstream::legacySetEncodingOverride ( TSLTextEncoding encoding)
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.

Parameters
encodingThe text encoding to use.

◆ ofs()

void * TSLofstream::ofs ( ) const

◆ open()

void TSLofstream::open ( const char * s)

This method tries to open the file with the given filename, s.

Parameters
sThe name of the file to open.

◆ open_append()

void TSLofstream::open_append ( const char * s)

This method tries to open the file with the given filename, s for appending.

Parameters
sThe name of the file to open.

◆ put()

void TSLofstream::put ( char c)

Insert a single character into the stream.

Parameters
cThe char.

◆ rdstate()

int TSLofstream::rdstate ( ) const

The member function returns the stored stream state information.

◆ seekp()

void TSLofstream::seekp ( TSLFilePosition pos)

Changes the put pointer for the stream.

Parameters
posThe new position value.

◆ setstate()

void TSLofstream::setstate ( int state)

The member function effectively calls clear (state | rdstate() ).

◆ tellp()

TSLFilePosition TSLofstream::tellp ( ) const

Get the value for the stream's put pointer.

◆ write() [1/2]

TSLofstream & TSLofstream::write ( const char * s,
int n )

This unformatted output method inserts up to n char elements from the buffer s.

Parameters
sA pointer to the character array.
nThe number of elements to be written.

◆ write() [2/2]

TSLofstream & TSLofstream::write ( const TSLVariant * s)

This unformatted output method inserts one TSLVariant .

Parameters
sA pointer to the TSLVariant.