FTS memory bytestream
[FTS bytestream class.]


Detailed Description

The FTS memorystream bytestream.

A bytestream that writes its data into a string (array of unsigned char). The buffer automatically grows as data is written to it. The data can be retrieved using fts_memorystream_get_bytes()


Typedefs

typedef struct fts_memorystream fts_memorystream_t
 FTS memorystream data type.

Functions

FTS_API unsigned char * fts_memorystream_get_bytes (fts_memorystream_t *stream)
 Get the current content of the memorystream as a string (unsigned char *).
FTS_API int fts_memorystream_get_size (fts_memorystream_t *stream)
 Get the size of a memorystream.
FTS_API void fts_memorystream_reset (fts_memorystream_t *stream)
 Resets the stream to empty, so that all currently accumulated output is discarded.

Variables

FTS_API fts_class_tfts_memorystream_class
 The FTS memorystream class identifier (pointer to class instance).


Function Documentation

FTS_API unsigned char* fts_memorystream_get_bytes ( fts_memorystream_t stream  ) 

Get the current content of the memorystream as a string (unsigned char *).

The function returns a pointer to an internal buffer that shouldn't be modified.

Note: as the memorystream can reallocate its internal buffer when outputing a character to it, the value returned by this function must be considered invalid after the next output operation to the stream.

Parameters:
stream the memorystream
Returns:
pointer to character buffer in memorystream

FTS_API int fts_memorystream_get_size ( fts_memorystream_t stream  ) 

Get the size of a memorystream.

Parameters:
stream the memory stream
Returns:
the size (number of characters)

FTS_API void fts_memorystream_reset ( fts_memorystream_t stream  ) 

Resets the stream to empty, so that all currently accumulated output is discarded.

Parameters:
stream the memory stream


Generated on Wed Aug 24 18:28:43 2011 for FTM API by  doxygen 1.5.6