Advanced Strategic Command
Public Types | Public Member Functions | Protected Attributes | List of all members
tnstream Class Referenceabstract

The interface for all kinds of IO stream. More...

#include <basestreaminterface.h>

Inheritance diagram for tnstream:
Inheritance graph
[legend]

Public Types

enum  IOMode { uninitialized, reading, writing, appending }
 the modes in which a stream can operate More...
 

Public Member Functions

 tnstream ()
 
virtual void writedata (const void *buf, int size)=0
 writes data to the stream More...
 
virtual int readdata (void *buf, int size, bool excpt=true)=0
 Reads data from the stream. More...
 
virtual void readpchar (char **pc, int maxlength=0)
 Reads a string. More...
 
virtual void readpnchar (char **pc, int maxlength=0)
 Reads a string. More...
 
virtual bool readTextString (ASCString &s, bool includeCR=false)
 Reads a string. More...
 
virtual ASCString readString (bool includeCR=false)
 Reads and returns a string. More...
 
virtual void writepchar (const char *pc)
 write the C-String pc to the stream More...
 
virtual void writeString (const string &pc, bool binary=true)
 writes the C++ String pc to the stream. More...
 
virtual int readInt (void)
 Reads a 32 bit signed Integer. In the stream little-endian byte order is used and a translation is performed, if necessary. More...
 
virtual int readWord (void)
 Reads a 16 bit unsigned Integer. In the stream little-endian byte order is used and a translation is performed, if necessary. More...
 
virtual Uint8 readUint8 (void)
 Reads a 8 bit unsigned Integer. More...
 
virtual char readCharacter (void)
 Read a 8 bit character. More...
 
template<size_t N>
void writeBitset (const std::bitset< N > &bs)
 
template<size_t N>
void readBitset (std::bitset< N > &bs)
 
virtual float readFloat (void)
 Reads a flaot variable. More...
 
virtual void writeInt (int i)
 Writes a 32 bit signed Integer. In the stream little-endian byte order is used and a translation is performed, if necessary. More...
 
virtual void writeInt (unsigned int i)
 
void writeInt (bool b)
 
virtual void writeWord (int w)
 Writes a 16 bit unsigned Integer. In the stream little-endian byte order is used and a translation is performed, if necessary. More...
 
virtual void writeUint8 (Uint8 c)
 Writes a 8 bit unsigned Integer. More...
 
virtual void writeCharacter (char c)
 Writes a 8 bit character. More...
 
virtual void writeFloat (float f)
 Write a floating point variable. More...
 
virtual void writerlepict (const void *buf)
 Writes an image to the stream and compresses it using RLE. More...
 
virtual void writeImage (const void *buf, bool compress=true)
 Writes an image to the stream. More...
 
virtual void readrlepict (void **pnter, bool allocated, int *size)
 Writes an RLE compressed or uncompressed image from the stream. More...
 
virtual ASCString getDeviceName ()
 returns the name of the stream. More...
 
virtual ASCString getLocation ()
 returns the location of the stream. More...
 
virtual ASCString getArchive ()
 returns the archive name if the stream is located inside an archive; or "" if not. More...
 
virtual void seek (int newpos)
 Sets the stream pointer to a new location. An exception is thrown if the stream does not support seeking. More...
 
virtual int getSize (void)
 returns the size of the stream or -1 if the stream does not have a size More...
 
virtual ~tnstream ()
 

Protected Attributes

ASCString devicename
 

Detailed Description

The interface for all kinds of IO stream.

Because ASC was originally written in Pascal, the streams don't have any relation to the C++ streams

Definition at line 35 of file basestreaminterface.h.

Member Enumeration Documentation

the modes in which a stream can operate

Enumerator
uninitialized 
reading 
writing 
appending 

Definition at line 40 of file basestreaminterface.h.

Constructor & Destructor Documentation

tnstream::tnstream ( void  )

Definition at line 194 of file basestrm.cpp.

virtual tnstream::~tnstream ( )
inlinevirtual

Definition at line 196 of file basestreaminterface.h.

Member Function Documentation

ASCString tnstream::getArchive ( )
virtual

returns the archive name if the stream is located inside an archive; or "" if not.

Reimplemented in tn_c_lzw_filestream.

Definition at line 279 of file basestrm.cpp.

Referenced by PropertyWritingContainer::getArchive().

ASCString tnstream::getDeviceName ( )
virtual
ASCString tnstream::getLocation ( )
virtual
virtual int tnstream::getSize ( void  )
inlinevirtual

returns the size of the stream or -1 if the stream does not have a size

Reimplemented in tn_c_lzw_filestream, MemoryStreamCopy, and tn_file_buf_stream.

Definition at line 194 of file basestreaminterface.h.

template<size_t N>
void tnstream::readBitset ( std::bitset< N > &  bs)
inline
char tnstream::readCharacter ( void  )
virtual

Read a 8 bit character.

Definition at line 298 of file basestrm.cpp.

References readdata2.

virtual int tnstream::readdata ( void *  buf,
int  size,
bool  excpt = true 
)
pure virtual

Reads data from the stream.

Parameters
bufthe buffer which the data is written to
sizethe number of bytes which should be read
excptIf true the operation will throw an exception if the desired number of bytes cannot be read.
Returns
the number of bytes which were read.

Implemented in StreamDecompressionFilter, StreamCompressionFilter, ASCIIDecodingStream, ASCIIEncodingStream, tn_c_lzw_filestream, tn_lzw_file_buf_stream, MemoryStream, MemoryStreamCopy, and tnbufstream.

Referenced by loadfont(), MemoryStreamCopy::MemoryStreamCopy(), tpcxheader::read(), Surface::read(), toldfont::read(), GameMap::read(), CompressionStreamAdapter::readcmpdata(), MemoryStreamStorage::readfromstream(), readOldEvent(), readpchar(), readpnchar(), readrlepict(), and readTextString().

float tnstream::readFloat ( void  )
virtual

Reads a flaot variable.

Definition at line 328 of file basestrm.cpp.

References readdata2, and SwapFloat().

Referenced by ResourceMatrix::read(), ObjectType::read(), WeatherArea::read(), VehicleType::read(), WeatherSystem::read(), AI::read(), and GameMap::read().

int tnstream::readInt ( void  )
virtual

Reads a 32 bit signed Integer. In the stream little-endian byte order is used and a translation is performed, if necessary.

Definition at line 284 of file basestrm.cpp.

References readdata2.

Referenced by AutoProgressBar::AutoProgressBar(), trunreplay::execnextreplaymove(), Reinforcements::execute(), FileCache::FileCache(), findNextCampaignMap(), getGraphicSetIdFromFilename(), GraphicSetManager_Base::loadData(), tsavegameloaders::loadgame(), loadmapfromstream(), tsavegameloaders::loadMapimageFromFile(), tnetworkloaders::loadnwgame(), loadreplay(), Building::newFromStream(), Vehicle::newFromStream(), ClipBoardBase::pasteUnit(), ClipBoardBase::place(), PackageRepository::read(), TerrainBits::read(), Package::PackageDependency::read(), TaskHibernatingContainer::read(), Poly_gon::read(), GameTransferMechanism::read(), DiscoverResources::ResourceViewState::read(), Password::read(), PackageData::read(), VersionIdentifier::read(), AStar3D::PathPoint::read(), MusicPlayList::read(), TaskContainer::read(), AiThreat::read(), Package::read(), Mine::read(), tpcxheader::read(), ClipBoardBase::read(), Object::read(), TerrainAccess::read(), TechDependency::read(), BI3TranslationTableLoader::read(), ActionContainer::read(), Building::read(), AiValue::read(), Surface::read(), DiplomaticStateVector::read(), TerrainType::MoveMalus::read(), TechAdapter::read(), GameAction::read(), TechAdapterDependency::read(), ItemRepositoryLoader< T >::read(), AiParameter::read(), BuildingType::read(), Resources::read(), TerrainType::Weather::read(), toldfont::read(), TerrainType::read(), Bi3MapTranslationTable::Terrain2id::read(), Event::read(), Technology::read(), ResourceMatrix::read(), ObjectType::read(), ItemFiltrationSystem::ItemFilter::read(), Bi3MapTranslationTable::Terraincombixlat::read(), ContainerBaseType::TransportationIO::read(), ItemFiltrationSystem::DataLoader::read(), Bi3MapTranslationTable::Objecttranslataion::read(), ContainerBaseType::read(), WeatherArea::read(), MapCoordinate::read(), Player::read(), Bi3MapTranslationTable::read(), WeatherField::read(), MapCoordinate3D::read(), Properties::read(), VehicleType::HeightChangeMethod::read(), VehicleType::read(), WeatherSystem::read(), IntRange::read(), GameMap::ResourceTribute::read(), Vehicle::read(), GameMap::ReplayInfo::read(), tfindfile::FileInfo::read(), AI::read(), GameMap::read(), Research::read_struct(), Research::read_techs(), tgameloaders::readAI(), readBitset(), FileTransfer::readChildData(), readClassContainer(), readClassContainerStaticConstructor(), UnitAction::readData(), ContainerCommand::readData(), ContainerAction::readData(), DestructUnitCommand::readData(), PowerGenerationSwitchCommand::readData(), ReactionFireSwitchCommand::readData(), RepairBuildingCommand::readData(), UnitCommand::readData(), CargoMoveCommand::readData(), CancelResearchCommand::readData(), TrainUnitCommand::readData(), RecycleUnitCommand::readData(), JumpDriveCommand::readData(), RemoveProductionLineCommand::readData(), SetResourceProcessingRateCommand::readData(), BuildProductionLineCommand::readData(), InternalAmmoTransferCommand::readData(), TransferControlCommand::readData(), RegisterUnitRFTarget::readData(), RenameContainerCommand::readData(), ConstructBuildingCommand::readData(), RepairUnitCommand::readData(), VehicleAttackAction::readData(), ConsumeResource::readData(), DestructBuildingCommand::readData(), ChangeDiplomaticState::readData(), InflictDamage::readData(), ChangeView::readData(), ConvertContainer::readData(), DirectResearchCommand::readData(), SpawnBuilding::readData(), ConstructUnitCommand::readData(), PutObjectCommand::readData(), RemoveMine::readData(), SpawnObject::readData(), DiplomacyCommand::readData(), RemoveObject::readData(), MoveUnit::readData(), AttackCommand::readData(), ViewRegistration::readData(), ServiceCommand::readData(), SpawnMine::readData(), PutMineCommand::readData(), UnitFieldRegistration::readData(), DestructContainer::readData(), SpawnUnit::readData(), CampaignActionLogger::readData(), ChangeContainerProperty::readData(), ConsumeAmmo::readData(), ChangeUnitProperty::readData(), MoveUnitCommand::readData(), DiscoverResources::readData(), ChangeObjectProperty::readData(), ChangeUnitMovement::readData(), Command::readData(), TurnPassed::readData(), UnitTrigger::readData(), AllBuildingsLost::readData(), AllUnitsLost::readData(), EventTriggered::readData(), GameMap::IDManager::readData(), AllEnemyUnitsDestroyed::readData(), AllEnemyBuildingsDestroyed::readData(), SpecificUnitEntersPolygon::readData(), AnyUnitEntersPolygon::readData(), ResourceTribute::readData(), Action_Nothing::readData(), WindChange::readData(), ChangeGameParameter::readData(), DisplayMessage::readData(), WeatherChange::readData(), MapChange::readData(), AddObject::readData(), ChangeBuildingDamage::readData(), NextMap::readData(), DisplayEllipse::readData(), ChangeBuildingOwner::readData(), DisplayImmediateMessage::readData(), AddProductionCapability::readData(), ChangeDiplomaticStatus::readData(), SetViewSharing::readData(), Reinforcements::readData(), ChangePlayerState::readData(), tspfldloaders::readdissections(), tspfldloaders::readfields(), GameAction::readFromStream(), MemoryStreamStorage::readfromstream(), readLegacyNetworkData(), FieldAddressing::readMapModificationData(), tspfldloaders::readmessagelist(), tspfldloaders::readmessages(), readOldEvent(), readOldEventLists(), tspfldloaders::readoldevents(), readPointerContainer(), ClipBoardBase::readProperties(), readSDLPixelFormat(), AbstractTaskContainer::readStorage(), tncontainerstream::tncontainerstream(), RemoveObject::undoAction(), validateemlfile(), validatemapfile(), validatesavfile(), and versionTest().

void tnstream::readpchar ( char **  pc,
int  maxlength = 0 
)
virtual

Reads a string.

All bytes of the files are stored in the allocated memory until either a 0 Byte is read or the maximum number of character have been reached. The string will always be 0 terminated in both cases.

Parameters
pcpointer to an uninitialized pointer which will contain the string. The memory will be allocated using new char[length of string] .
maxlengthThe maximum number of bytes that will be read. If zero, the maximum length is not limited.

Definition at line 390 of file basestrm.cpp.

References CharBuf::buf, and readdata().

Referenced by findNextCampaignMap(), tnetworkloaders::loadnwgame(), GameMap::read(), tncontainerstream::tncontainerstream(), validateemlfile(), validatemapfile(), and validatesavfile().

void tnstream::readpnchar ( char **  pc,
int  maxlength = 0 
)
virtual

Reads a string.

All bytes of the files are stored in the allocated memory until either a 0 Byte or a newline character is read or the maximum number of character have been reached. The string will always be 0 terminated. Carriage return bytes will be filtered out.

Parameters
pcpointer to an uninitialized pointer which will contain the string. The memory will be allocated using new char[length of string] .
maxlengthThe maximum number of bytes that will be read. If zero, the maximum length is not limited.

Definition at line 440 of file basestrm.cpp.

References CharBuf::buf, readdata(), and red.

void tnstream::readrlepict ( void **  pnter,
bool  allocated,
int *  size 
)
virtual

Writes an RLE compressed or uncompressed image from the stream.

Parameters
pnterPointer to a void* , which will contain the new image.
allocatedIf false, a sufficient amount of memory will be allocated for the image. If true it is assumed that a sufficiently large amount of memory has already been allocated.
sizeWill contain the size of the image. Must not be NULL.

Definition at line 202 of file basestrm.cpp.

References trleheader::id, readdata(), readUint8(), readWord(), trleheader::rle, trleheader::size, trleheader::x, and trleheader::y.

Referenced by loadcursor().

ASCString tnstream::readString ( bool  includeCR = false)
virtual

Reads and returns a string.

Carriage Return character will be filtered. If the very first read operation fails because the end of the stream was already reached, a readafterend exception will be thrown. If some data could be read before the end was reached, this data will be returned.

Parameters
includeCRif true, the reading will stop only at 0 Bytes or the end of stream, so all newline character will be part of the text string. Useful for binary files. If false reading will stop at 0 Bytes and newline characters. The newline character will not be part of the resulting string.

Definition at line 535 of file basestrm.cpp.

References getLocation(), and readTextString().

Referenced by tsavegameloaders::loadgame(), tsavegameloaders::loadMapimageFromFile(), loadsinglemessagefile(), Package::PackageDependency::read(), GameTransferMechanism::read(), MusicPlayList::read(), PackageData::read(), Package::read(), TechAdapter::read(), TechAdapterDependency::read(), ItemRepositoryLoader< T >::read(), BuildingType::read(), TerrainType::Weather::read(), TerrainType::read(), Event::read(), Technology::read(), ObjectType::read(), ItemFiltrationSystem::ItemFilter::read(), ContainerBaseType::read(), Bi3MapTranslationTable::read(), VehicleType::read(), tfindfile::FileInfo::read(), GameMap::read(), FileTransfer::readChildData(), RenameContainerCommand::readData(), DisplayImmediateMessage::readData(), readLegacyNetworkData(), tspfldloaders::readmessages(), and LuaRunner::runFile().

bool tnstream::readTextString ( ASCString s,
bool  includeCR = false 
)
virtual

Reads a string.

Carriage Return character will be filtered.

Parameters
sThe ASCString which will contain the data read.
includeCRif true, the reading will stop only a 0 Bytes or the end of stream, so all newline character will be part of the text string. Useful for binary files. If false reading will stop and 0 Bytes and newline characters. The newline character will not be part of the resulting string.
Returns
true if there is remaining data after the string, false if the reading was ended because the end of the stream was reached.

Definition at line 511 of file basestrm.cpp.

References readdata(), and red.

Referenced by MailOptionsDialog::MailOptionsDialog(), SingleUnitSet::read(), Properties::read(), CampaignActionLogger::readData(), and readString().

Uint8 tnstream::readUint8 ( void  )
virtual
int tnstream::readWord ( void  )
virtual
void tnstream::seek ( int  newpos)
virtual

Sets the stream pointer to a new location. An exception is thrown if the stream does not support seeking.

Reimplemented in MemoryStreamCopy, and tn_file_buf_stream.

Definition at line 197 of file basestrm.cpp.

References getDeviceName().

template<size_t N>
void tnstream::writeBitset ( const std::bitset< N > &  bs)
inline
void tnstream::writeCharacter ( char  c)
virtual

Writes a 8 bit character.

Definition at line 375 of file basestrm.cpp.

References writedata2.

virtual void tnstream::writedata ( const void *  buf,
int  size 
)
pure virtual
void tnstream::writeFloat ( float  f)
virtual

Write a floating point variable.

Definition at line 385 of file basestrm.cpp.

References writedata2.

Referenced by ResourceMatrix::write(), ObjectType::write(), WeatherArea::write(), VehicleType::write(), WeatherSystem::write(), and AI::write().

void tnstream::writeImage ( const void *  buf,
bool  compress = true 
)
virtual

Writes an image to the stream.

Definition at line 241 of file basestrm.cpp.

References compressrle(), trleheader::id, trleheader::rle, trleheader::size, writedata(), writeWord(), trleheader::x, and trleheader::y.

Referenced by writerlepict().

void tnstream::writeInt ( int  i)
virtual

Writes a 32 bit signed Integer. In the stream little-endian byte order is used and a translation is performed, if necessary.

Definition at line 363 of file basestrm.cpp.

References writedata2.

Referenced by ClipBoardBase::addBuilding(), ClipBoardBase::addUnit(), AutoProgressBar::close(), Event::read(), ObjectRemovalStrategy2::removeObject(), LogActionIntoReplayInfo::saveCommand(), tsavegameloaders::savegame(), tmaploaders::savemap(), tnetworkloaders::savenwgame(), savereplay(), PackageRepository::write(), TerrainBits::write(), TaskHibernatingContainer::write(), Package::PackageDependency::write(), Poly_gon::write(), GameTransferMechanism::write(), DiscoverResources::ResourceViewState::write(), AStar3D::PathPoint::write(), Password::write(), VersionIdentifier::write(), MusicPlayList::write(), PackageData::write(), TaskContainer::write(), AiThreat::write(), Mine::write(), tpcxheader::write(), Package::write(), ClipBoardBase::write(), Object::write(), TerrainAccess::write(), TechDependency::write(), BI3TranslationTableLoader::write(), Building::write(), ActionContainer::write(), AiValue::write(), Surface::write(), DiplomaticStateVector::write(), TerrainType::MoveMalus::write(), TechAdapter::write(), GameAction::write(), TechAdapterDependency::write(), ItemRepositoryLoader< T >::write(), AiParameter::write(), BuildingType::write(), Resources::write(), TerrainType::Weather::write(), TerrainType::write(), Event::write(), Bi3MapTranslationTable::Terrain2id::write(), Technology::write(), ResourceMatrix::write(), ObjectType::write(), ItemFiltrationSystem::ItemFilter::write(), ContainerBaseType::TransportationIO::write(), ItemFiltrationSystem::DataLoader::write(), Bi3MapTranslationTable::Terraincombixlat::write(), Research::write(), WeatherArea::write(), ContainerBaseType::write(), FileCache::write(), Bi3MapTranslationTable::Objecttranslataion::write(), MapCoordinate::write(), Player::write(), Bi3MapTranslationTable::write(), WeatherField::write(), MapCoordinate3D::write(), Properties::write(), VehicleType::HeightChangeMethod::write(), VehicleType::write(), WeatherSystem::write(), IntRange::write(), GameMap::ResourceTribute::write(), Vehicle::write(), GameMap::ReplayInfo::write(), tfindfile::FileInfo::write(), AI::write(), GameMap::write(), tgameloaders::writeAI(), writeBitset(), FileTransfer::writeChildData(), writeClassContainer(), UnitAction::writeData(), ContainerCommand::writeData(), ContainerAction::writeData(), DestructUnitCommand::writeData(), RepairBuildingCommand::writeData(), CargoMoveCommand::writeData(), UnitCommand::writeData(), PowerGenerationSwitchCommand::writeData(), ReactionFireSwitchCommand::writeData(), CancelResearchCommand::writeData(), TrainUnitCommand::writeData(), RecycleUnitCommand::writeData(), JumpDriveCommand::writeData(), RemoveProductionLineCommand::writeData(), SetResourceProcessingRateCommand::writeData(), TransferControlCommand::writeData(), InternalAmmoTransferCommand::writeData(), BuildProductionLineCommand::writeData(), RegisterUnitRFTarget::writeData(), RenameContainerCommand::writeData(), RepairUnitCommand::writeData(), VehicleAttackAction::writeData(), ConstructBuildingCommand::writeData(), ConsumeResource::writeData(), DestructBuildingCommand::writeData(), InflictDamage::writeData(), ChangeDiplomaticState::writeData(), ConvertContainer::writeData(), ChangeView::writeData(), DirectResearchCommand::writeData(), SpawnBuilding::writeData(), ConstructUnitCommand::writeData(), RemoveMine::writeData(), PutObjectCommand::writeData(), SpawnObject::writeData(), ServiceCommand::writeData(), RemoveObject::writeData(), AttackCommand::writeData(), MoveUnit::writeData(), DiplomacyCommand::writeData(), SpawnMine::writeData(), ViewRegistration::writeData(), PutMineCommand::writeData(), UnitFieldRegistration::writeData(), SpawnUnit::writeData(), DestructContainer::writeData(), CampaignActionLogger::writeData(), ChangeContainerProperty::writeData(), ConsumeAmmo::writeData(), ChangeUnitProperty::writeData(), MoveUnitCommand::writeData(), ChangeObjectProperty::writeData(), DiscoverResources::writeData(), ChangeUnitMovement::writeData(), TriggerNothing::writeData(), Command::writeData(), TurnPassed::writeData(), UnitTrigger::writeData(), AllBuildingsLost::writeData(), AllUnitsLost::writeData(), PositionTrigger::writeData(), EventTriggered::writeData(), GameMap::IDManager::writeData(), AllEnemyUnitsDestroyed::writeData(), AllEnemyBuildingsDestroyed::writeData(), SpecificUnitEntersPolygon::writeData(), AnyUnitEntersPolygon::writeData(), ResourceTribute::writeData(), Action_Nothing::writeData(), WindChange::writeData(), ChangeGameParameter::writeData(), DisplayMessage::writeData(), WeatherChange::writeData(), MapChange::writeData(), AddObject::writeData(), ChangeBuildingDamage::writeData(), NextMap::writeData(), DisplayEllipse::writeData(), RemoveAllObjects::writeData(), ChangeBuildingOwner::writeData(), DisplayImmediateMessage::writeData(), AddProductionCapability::writeData(), ChangeDiplomaticStatus::writeData(), SetViewSharing::writeData(), AddResources::writeData(), Reinforcements::writeData(), ChangePlayerState::writeData(), writeDefaultPixelFormat(), tspfldloaders::writedissections(), tspfldloaders::writefields(), FieldAddressing::writeMapModificationData(), writemaptostream(), tspfldloaders::writemessagelist(), tspfldloaders::writemessages(), writePointerContainer(), AbstractTaskContainer::writeStorage(), and MemoryStreamStorage::writetostream().

void tnstream::writeInt ( unsigned int  i)
virtual

Definition at line 350 of file basestrm.cpp.

References writedata2.

void tnstream::writeInt ( bool  b)

Definition at line 356 of file basestrm.cpp.

References writedata2.

void tnstream::writepchar ( const char *  pc)
virtual

write the C-String pc to the stream

Definition at line 554 of file basestrm.cpp.

References writedata().

Referenced by tsavegameloaders::savegame(), tmaploaders::savemap(), tnetworkloaders::savenwgame(), and writeString().

void tnstream::writerlepict ( const void *  buf)
virtual

Writes an image to the stream and compresses it using RLE.

Definition at line 236 of file basestrm.cpp.

References writeImage().

void tnstream::writeString ( const string &  pc,
bool  binary = true 
)
virtual

writes the C++ String pc to the stream.

Parameters
binaryIf true, all bytes (including 0 bytes) of the string will be written to the stream. Note that a string containing one or more 0 bytes cannot be read with a single stream reading operation. If false, writing will stop at the first 0 character of the string (or its end of course)

Definition at line 545 of file basestrm.cpp.

References writedata(), and writepchar().

Referenced by PropertyWritingContainer::closeBracket(), generateTechTree(), PropertyWritingContainer::openBracket(), tsavegameloaders::savegame(), TextRenderer::saveText(), Package::PackageDependency::write(), GameTransferMechanism::write(), MusicPlayList::write(), PackageData::write(), Package::write(), Building::write(), TechAdapter::write(), TechAdapterDependency::write(), ItemRepositoryLoader< T >::write(), BuildingType::write(), TerrainType::Weather::write(), TerrainType::write(), Event::write(), Technology::write(), ObjectType::write(), ItemFiltrationSystem::ItemFilter::write(), ContainerBaseType::write(), Bi3MapTranslationTable::write(), Properties::write(), VehicleType::write(), Vehicle::write(), tfindfile::FileInfo::write(), GameMap::write(), FileTransfer::writeChildData(), RenameContainerCommand::writeData(), CampaignActionLogger::writeData(), DisplayImmediateMessage::writeData(), TechDependency::writeInvertTreeOutput(), writeMessageFile(), tspfldloaders::writemessages(), PropertyWritingContainer::writeProperty(), and TechDependency::writeTreeOutput().

void tnstream::writeUint8 ( Uint8  c)
virtual
void tnstream::writeWord ( int  w)
virtual

Writes a 16 bit unsigned Integer. In the stream little-endian byte order is used and a translation is performed, if necessary.

Definition at line 369 of file basestrm.cpp.

References writedata2.

Referenced by tsavegameloaders::savegame(), tmaploaders::savemap(), tnetworkloaders::savenwgame(), tpcxheader::write(), Building::write(), Surface::write(), VehicleType::write(), Vehicle::write(), GameMap::write(), tspfldloaders::writefields(), and writeImage().

Member Data Documentation

ASCString tnstream::devicename
protected

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