# TMCiostream Class Reference
[MCCore]

Inheritance diagram for TMCiostream:

List of all members.

## Public Types
enum | open_mode { in = IMCFile::eRead, out = IMCFile::eWrite, current = 0x0020, nocreate = 0x0040 }
enum | seek_dir { beg = IMCFile::eBegin, cur = IMCFile::eCurrent, end = IMCFile::eEnd }
| Direction of seek. More...
enum | io_state { goodbit = 0, eofbit = 1, failbit = 2 }
## Public Member Functions
| TMCiostream ()
virtual | ~TMCiostream ()
virtual int32 | tell ()=0
virtual void | seek (int32 off, seek_dir dir=beg)=0
int32 | tellg ()
int32 | tellp ()
void | seekp (int32 off, seek_dir dir=beg)
void | seekg (int32 off, seek_dir dir=beg)
virtual void | read (int8 *s, int32 n)=0
void | read (uint8 *s, int32 n)
virtual void | get (int8 &c)
void | get (int8 *pstr, int nCount, int8 delim='\n')
void | getline (int8 *pstr, int nCount, int8 delim='\n')
void | getLine (TMCDynamicString &outLine, int8 delim='\n')
virtual void | putback (int8 c)=0
| can only be used on (some) input streams
int32 | gcount () const
virtual void | write (const int8 *s, int32 n)=0
void | put (int8 c)
int | precision (int precision)
int | precision ()
int | width (int width)
int | width ()
virtual TMCiostream & | operator>> (int8 *p)
virtual TMCiostream & | operator>> (uint8 *p)
virtual TMCiostream & | operator>> (int8 &v)
virtual TMCiostream & | operator>> (uint8 &v)
virtual TMCiostream & | operator>> (int32 &v)
virtual TMCiostream & | operator>> (uint32 &v)
virtual TMCiostream & | operator>> (int16 &v)
virtual TMCiostream & | operator>> (uint16 &v)
virtual TMCiostream & | operator>> (real32 &v)
virtual TMCiostream & | operator>> (real64 &v)
virtual TMCiostream & | operator>> (TMCString &ioStr)
virtual TMCiostream & | operator>> (TMCiostream &(*f)(TMCiostream &))
virtual TMCiostream & | operator<< (const int8 *p)
virtual TMCiostream & | operator<< (const uint8 *v)
virtual TMCiostream & | operator<< (int8 v)
virtual TMCiostream & | operator<< (uint8 v)
virtual TMCiostream & | operator<< (int32 v)
virtual TMCiostream & | operator<< (uint32 v)
virtual TMCiostream & | operator<< (int16 v)
virtual TMCiostream & | operator<< (uint16 v)
virtual TMCiostream & | operator<< (int64 v)
virtual TMCiostream & | operator<< (uint64 v)
virtual TMCiostream & | operator<< (real32 v)
virtual TMCiostream & | operator<< (real64 v)
virtual TMCiostream & | operator<< (const TMCString &outStr)
virtual TMCiostream & | operator<< (TMCiostream &(*f)(TMCiostream &))
int | rdstate () const
void | clear (int state=0)
int | good () const
int | eof () const
int | fail () const
boolean | operator! () const
| operator void * () const
virtual void | readFileRef (int8 *p)
virtual void | writeFileRef (const int8 *p)
virtual void | GetPathRelativeFolder (TMCString &outString)
void | readQuotedString (TMCString &outString)
boolean | ReadSingleLineQuotedString (TMCString &outString, uint32 stringSize)
void | writeQuotedString (const TMCString &string)
int32 | GetStreamSize ()
void | SetInfo (IDType infoID, void *info, uint32 size)
void * | GetInfo (IDType infoID)
virtual TMCiostreamContext * | GetContext ()
virtual IStreamContext * | GetStreamContext ()
virtual void | SetStreamContext (IStreamContext *context)
virtual void | WriteLocalizedString (const TMCString &string)
virtual boolean | ReadLocalizedString (TMCString &string)
virtual void | ReadLocalizedDynamicString (TMCDynamicString &string)
boolean | ReadString (int8 *p, int32 bufferSize)
ITranscoder * | GetTranscoder ()
void | SetTranscoder (TranscoderType type)
void | WriteIdentifier ()
void | CheckIdentifier ()
## Protected Member Functions
void | readstring (int8 *p)
void | readlong (int32 &v)
void | readunsignedlong (uint32 &v)
void | readdouble (double &v)
void | writestring (const int8 *p)
void | writelong (int32 v)
void | writeunsignedlong (uint32 v)
void | writefloat (float v)
void | writedouble (double v)
void | streamfail (int32 err)
int32 | flags () const
int32 | setf (int32 setbits, int32 field)
int32 | setf (int32 setbits)
int32 | unsetf (int32 unsetbits)
void | changestate (int state)
## Protected Attributes
int32 | fFlags
int32 | fState
IMCFile::EFilePermission | fMode
int | fPrecision
int | fWidth
int32 | fgcount
int8 * | fSeparators
TMCiostreamInfoStruct * | fInfos
uint32 | fInfosCount
TMCCountedPtr< ITranscoder > | fEncoding
uint8 | fIDOffset
## Private Member Functions
boolean | isWhite (int8)
int8 | myipfx ()
uint32 | myreadunsignedlong (int8 &c)
int8 | mygetline (int8 *pstr, int nCount, int8 delim='\n')
## Private Attributes
TMCCountedPtr< IStreamContext > | fStreamContext
## Friends
TMCiostream & | dec (TMCiostream &s)
TMCiostream & | hex (TMCiostream &s)

## Detailed Description

Base class for all the core classes used to read from or write into something (text file, string, binary file, socket...)

## Member Enumeration Documentation

enum TMCiostream::io_state

Enumerator:

  goodbit |
  eofbit |
  failbit |

enum TMCiostream::open_mode

Enumerator:

  in |
  out |
  current |
  nocreate |

enum TMCiostream::seek_dir

Direction of seek.

Enumerator:

  beg |
  cur |
  end |

## Constructor & Destructor Documentation

TMCiostream::TMCiostream | ( |  | ) |

virtual TMCiostream::~TMCiostream | ( |  | ) | `[virtual]`

## Member Function Documentation

void TMCiostream::changestate | ( | int | state | ) | `[inline, protected]`

void TMCiostream::CheckIdentifier | ( |  | ) |

void TMCiostream::clear | ( | int | state = `0` | ) | `[inline]`

int TMCiostream::eof | ( |  | ) | const`[inline]`

int TMCiostream::fail | ( |  | ) | const`[inline]`

int32 TMCiostream::flags | ( |  | ) | const`[inline, protected]`

int32 TMCiostream::gcount | ( |  | ) | const`[inline]`

void TMCiostream::get | ( | int8 * | pstr,
|  | int | nCount,
|  | int8 | delim = `'\n'` |
| ) |  |  |

virtual void TMCiostream::get | ( | int8 & | c | ) | `[inline, virtual]`

Reimplemented in TMCNetStream, and TMCstrstream.

virtual TMCiostreamContext* TMCiostream::GetContext | ( |  | ) | `[inline, virtual]`

Reimplemented in TMCfstream.

void* TMCiostream::GetInfo | ( | IDType | infoID | ) |

void TMCiostream::getLine | ( | TMCDynamicString & | outLine,
|  | int8 | delim = `'\n'` |
| ) |  |  |

void TMCiostream::getline | ( | int8 * | pstr,
|  | int | nCount,
|  | int8 | delim = `'\n'` |
| ) |  |  |

virtual void TMCiostream::GetPathRelativeFolder | ( | TMCString & | outString | ) | `[virtual]`

Reimplemented in TMCfstream.

virtual IStreamContext* TMCiostream::GetStreamContext | ( |  | ) | `[inline, virtual]`

int32 TMCiostream::GetStreamSize | ( |  | ) |

ITranscoder* TMCiostream::GetTranscoder | ( |  | ) | `[inline]`

int TMCiostream::good | ( |  | ) | const`[inline]`

boolean TMCiostream::isWhite | ( | int8 | c | ) | `[inline, private]`

int8 TMCiostream::mygetline | ( | int8 * | pstr,
|  | int | nCount,
|  | int8 | delim = `'\n'` |
| ) |  |  | `[private]`

int8 TMCiostream::myipfx | ( |  | ) | `[private]`

uint32 TMCiostream::myreadunsignedlong | ( | int8 & | c | ) | `[private]`

TMCiostream::operator void * | ( |  | ) | const`[inline]`

boolean TMCiostream::operator! | ( |  | ) | const`[inline]`

virtual TMCiostream& TMCiostream::operator<< | ( | TMCiostream &(*)(TMCiostream &) | f | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator<< | ( | const TMCString & | outStr | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator<< | ( | real64 | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator<< | ( | real32 | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator<< | ( | uint64 | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator<< | ( | int64 | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator<< | ( | uint16 | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator<< | ( | int16 | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator<< | ( | uint32 | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator<< | ( | int32 | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator<< | ( | uint8 | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator<< | ( | int8 | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator<< | ( | const uint8 * | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator<< | ( | const int8 * | p | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator>> | ( | TMCiostream &(*)(TMCiostream &) | f | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator>> | ( | TMCString & | ioStr | ) | `[virtual]`

virtual TMCiostream& TMCiostream::operator>> | ( | real64 & | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator>> | ( | real32 & | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator>> | ( | uint16 & | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator>> | ( | int16 & | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator>> | ( | uint32 & | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator>> | ( | int32 & | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator>> | ( | uint8 & | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator>> | ( | int8 & | v | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator>> | ( | uint8 * | p | ) | `[inline, virtual]`

virtual TMCiostream& TMCiostream::operator>> | ( | int8 * | p | ) | `[inline, virtual]`

int TMCiostream::precision | ( |  | ) | `[inline]`

int TMCiostream::precision | ( | int | precision | ) |

void TMCiostream::put | ( | int8 | c | ) | `[inline]`

virtual void TMCiostream::putback | ( | int8 | c | ) | `[pure virtual]`

can only be used on (some) input streams

Implemented in TMCNetStream, TMCstrstream, TMCfstream, and countstream.

int TMCiostream::rdstate | ( |  | ) | const`[inline]`

void TMCiostream::read | ( | uint8 * | s,
|  | int32 | n |
| ) |  |  | `[inline]`

virtual void TMCiostream::read | ( | int8 * | s,
|  | int32 | n |
| ) |  |  | `[pure virtual]`

Implemented in TMCNetStream, TMCstrstream, TMCfstream, and countstream.

void TMCiostream::readdouble | ( | double & | v | ) | `[protected]`

virtual void TMCiostream::readFileRef | ( | int8 * | p | ) | `[virtual]`

Reimplemented in TMCfstream.

virtual void TMCiostream::ReadLocalizedDynamicString | ( | TMCDynamicString & | string | ) | `[virtual]`

virtual boolean TMCiostream::ReadLocalizedString | ( | TMCString & | string | ) | `[virtual]`

void TMCiostream::readlong | ( | int32 & | v | ) | `[protected]`

void TMCiostream::readQuotedString | ( | TMCString & | outString | ) |

boolean TMCiostream::ReadSingleLineQuotedString | ( | TMCString & | outString,
|  | uint32 | stringSize |
| ) |  |  |

void TMCiostream::readstring | ( | int8 * | p | ) | `[protected]`

boolean TMCiostream::ReadString | ( | int8 * | p,
|  | int32 | bufferSize |
| ) |  |  |

void TMCiostream::readunsignedlong | ( | uint32 & | v | ) | `[protected]`

virtual void TMCiostream::seek | ( | int32 | off,
|  | seek_dir | dir = `beg` |
| ) |  |  | `[pure virtual]`

Implemented in TMCNetStream, TMCstrstream, TMCfstream, and countstream.

void TMCiostream::seekg | ( | int32 | off,
|  | seek_dir | dir = `beg` |
| ) |  |  | `[inline]`

void TMCiostream::seekp | ( | int32 | off,
|  | seek_dir | dir = `beg` |
| ) |  |  | `[inline]`

int32 TMCiostream::setf | ( | int32 | setbits | ) | `[protected]`

int32 TMCiostream::setf | ( | int32 | setbits,
|  | int32 | field |
| ) |  |  | `[protected]`

void TMCiostream::SetInfo | ( | IDType | infoID,
|  | void * | info,
|  | uint32 | size |
| ) |  |  |

virtual void TMCiostream::SetStreamContext | ( | IStreamContext * | context | ) | `[inline, virtual]`

void TMCiostream::SetTranscoder | ( | TranscoderType | type | ) |

void TMCiostream::streamfail | ( | int32 | err | ) | `[protected]`

virtual int32 TMCiostream::tell | ( |  | ) | `[pure virtual]`

Implemented in TMCNetStream, TMCstrstream, TMCfstream, and countstream.

int32 TMCiostream::tellg | ( |  | ) | `[inline]`

int32 TMCiostream::tellp | ( |  | ) | `[inline]`

int32 TMCiostream::unsetf | ( | int32 | unsetbits | ) | `[protected]`

int TMCiostream::width | ( |  | ) | `[inline]`

int TMCiostream::width | ( | int | width | ) |

virtual void TMCiostream::write | ( | const int8 * | s,
|  | int32 | n |
| ) |  |  | `[pure virtual]`

Implemented in TMCNetStream, TMCstrstream, TMCfstream, and countstream.

void TMCiostream::writedouble | ( | double | v | ) | `[protected]`

virtual void TMCiostream::writeFileRef | ( | const int8 * | p | ) | `[virtual]`

Reimplemented in TMCfstream.

void TMCiostream::writefloat | ( | float | v | ) | `[protected]`

void TMCiostream::WriteIdentifier | ( |  | ) |

virtual void TMCiostream::WriteLocalizedString | ( | const TMCString & | string | ) | `[inline, virtual]`

void TMCiostream::writelong | ( | int32 | v | ) | `[protected]`

void TMCiostream::writeQuotedString | ( | const TMCString & | string | ) |

void TMCiostream::writestring | ( | const int8 * | p | ) | `[protected]`

void TMCiostream::writeunsignedlong | ( | uint32 | v | ) | `[protected]`

## Friends And Related Function Documentation

TMCiostream& dec | ( | TMCiostream & | s | ) | `[friend]`

TMCiostream& hex | ( | TMCiostream & | s | ) | `[friend]`

## Member Data Documentation

TMCCountedPtr<ITranscoder> TMCiostream::fEncoding`[protected]`

int32 TMCiostream::fFlags`[protected]`

int32 TMCiostream::fgcount`[protected]`

uint8 TMCiostream::fIDOffset`[protected]`

TMCiostreamInfoStruct* TMCiostream::fInfos`[protected]`

uint32 TMCiostream::fInfosCount`[protected]`

IMCFile::EFilePermission TMCiostream::fMode`[protected]`

int TMCiostream::fPrecision`[protected]`

int8* TMCiostream::fSeparators`[protected]`

int32 TMCiostream::fState`[protected]`

TMCCountedPtr<IStreamContext> TMCiostream::fStreamContext`[private]`

int TMCiostream::fWidth`[protected]`

The documentation for this class was generated from the following file:

- MCStream.h