MemoryStreamStorage Class Reference

An in-memory storage of streamed data. More...

#include <basestrm.h>

List of all members.

Public Member Functions

 MemoryStreamStorage ()
void writetostream (tnstream *stream)
 persist the contents in another stream
void readfromstream (tnstream *stream)
 read persisted contents from another stream
void clear ()
int getMemoryFootprint () const
const char * getBuffer () const
int getSize () const
 ~MemoryStreamStorage ()

Friends

class MemoryStream


Detailed Description

An in-memory storage of streamed data.

A MemoryStream can be used to read or write to it

Definition at line 172 of file basestrm.h.


Constructor & Destructor Documentation

MemoryStreamStorage::MemoryStreamStorage (  ) 

Definition at line 2273 of file basestrm.cpp.

MemoryStreamStorage::~MemoryStreamStorage (  ) 

Definition at line 2281 of file basestrm.cpp.


Member Function Documentation

void MemoryStreamStorage::writetostream ( tnstream stream  ) 

persist the contents in another stream

Definition at line 2289 of file basestrm.cpp.

References tnstream::writedata(), and tnstream::writeInt().

Referenced by LogActionIntoReplayInfo::saveCommand(), ClipBoardBase::write(), RemoveObject::writeData(), RemoveMine::writeData(), Reinforcements::writeData(), DestructContainer::writeData(), and AbstractTaskContainer::writeStorage().

void MemoryStreamStorage::readfromstream ( tnstream stream  ) 

read persisted contents from another stream

Definition at line 2302 of file basestrm.cpp.

References max(), tnstream::readdata(), and tnstream::readInt().

Referenced by trunreplay::execnextreplaymove(), GameMap::ReplayInfo::read(), ClipBoardBase::read(), RemoveObject::readData(), RemoveMine::readData(), Reinforcements::readData(), DestructContainer::readData(), and AbstractTaskContainer::readStorage().

void MemoryStreamStorage::clear (  )  [inline]

Definition at line 190 of file basestrm.h.

Referenced by ClipBoardBase::clear(), and Reinforcements::setup().

int MemoryStreamStorage::getMemoryFootprint (  )  const [inline]

Definition at line 192 of file basestrm.h.

Referenced by GameMap::getMemoryFootprint().

const char* MemoryStreamStorage::getBuffer (  )  const [inline]

Definition at line 194 of file basestrm.h.

References MemoryStream::buf.

int MemoryStreamStorage::getSize ( void   )  const [inline]

Definition at line 195 of file basestrm.h.

Referenced by LogActionIntoReplayInfo::saveCommand().


Friends And Related Function Documentation

friend class MemoryStream [friend]

Definition at line 173 of file basestrm.h.


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:47:03 2012 for Advanced Strategic Command by  doxygen 1.5.1