#include <string>
#include <stdio.h>
#include <time.h>
#include <vector>
#include <list>
#include <queue>
#include <SDL.h>
#include "global.h"
#include "basestreaminterface.h"
#include "lzw.h"
#include "errors.h"
#include "simplestream.h"
#include "libs/bzlib/bzlib.h"
#include "basetemp.h"
Include dependency graph for basestrm.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Defines | |
| #define | writedata2(a) writedata ( &(a), sizeof(a) ) |
| #define | readdata2(a) readdata ( &(a), sizeof(a) ) |
Typedefs | |
| typedef t_compressor_stream_interface * | p_compressor_stream_interface |
| typedef tncontainerstream * | pncontainerstream |
| typedef tn_c_lzw_filestream | tnfilestream |
| typedef tnfilestream * | pnfilestream |
Functions | |
| SDL_RWops * | SDL_RWFromStream (pnstream stream) |
| ASCString | listContainer () |
| int | compressrle (const void *p, void *q) |
| bool | patimat (const ASCString &pat, const ASCString &str, bool forceCaseInsensitivity=false) |
| checks whether the regular expression pat matches the string str . | |
| int | checkforvaliddirectory (char *dir) |
| ASCString | getnextfilenumname (const ASCString &first, const ASCString &suffix, int num=-1) |
| bool | exist (const ASCString &s) |
| does a file s exist (wildcards allowed) | |
| time_t | get_filetime (const char *devicename) |
| void | opencontainer (const char *wildcard) |
| int | filesize (const char *name) |
| void | addSearchPath (const ASCString &path) |
| void | appendbackslash (char *String) |
| void | appendbackslash (ASCString &String) |
| char * | constructFileName (char *buf, int directoryLevel, const char *path, const char *filename) |
| ASCString | constructFileName (int directoryLevel, const ASCString &path, ASCString filename) |
| bool | directoryExist (const ASCString &path) |
| char * | extractPath (char *buf, const char *filename) |
| char * | extractFileName (char *buf, const char *filename) |
| ASCString | extractFileName (const ASCString &filename) |
| ASCString | extractFileName_withoutSuffix (const ASCString &filename) |
| int | createDirectory (const char *name) |
| int | getSearchPathNum () |
| ASCString | getSearchPath (int i) |
| bool | isPathRelative (const ASCString &path) |
| void | convertPathDelimitters (ASCString &path) |
| converts path delimitters from foreign operating systems to the ones used by the current operating system. On Linux, this function converts backslashes to slashes, on Windows vice versa | |
| template<typename C> | |
| void | writePointerContainer (const C &c, tnstream &stream) |
| template<typename BaseType> | |
| void | readPointerContainer (vector< BaseType * > &v, tnstream &stream) |
| template<typename BaseType> | |
| void | readPointerContainer (list< BaseType * > &v, tnstream &stream) |
| template<typename C> | |
| void | writeClassContainer (const C &c, tnstream &stream) |
| template<typename C> | |
| void | readClassContainer (C &c, tnstream &stream) |
| template<> | |
| void | writeClassContainer (const vector< ASCString > &c, tnstream &stream) |
| template<> | |
| void | readClassContainer (vector< ASCString > &c, tnstream &stream) |
| template<> | |
| void | writeClassContainer (const vector< int > &c, tnstream &stream) |
| template<> | |
| void | readClassContainer (vector< int > &c, tnstream &stream) |
| template<> | |
| void | writeClassContainer (const vector< pair< int, int > > &c, tnstream &stream) |
| template<> | |
| void | readClassContainer (vector< pair< int, int > > &c, tnstream &stream) |
Variables | |
| const int | maxFileStringSize = 10000 |
| const char * | asc_configurationfile |
| const int | maxfilenamelength |
| const char * | containermagic |
| const char * | filereadmode |
| const char * | filewritemode |
| const char * | filereadmodetext |
| const char * | filewritemodetext |
| const char | pathdelimitter |
| const char * | pathdelimitterstring |
Definition in file basestrm.h.
|
|
Definition at line 597 of file basestrm.h. Referenced by tnstream::readChar(), tnstream::readFloat(), tnstream::readInt(), and tnstream::readWord(). |
|
|
Definition at line 596 of file basestrm.h. Referenced by tnstream::writeChar(), tnstream::writeFloat(), tnstream::writeInt(), and tnstream::writeWord(). |
|
|
Definition at line 339 of file basestrm.h. |
|
|
Definition at line 429 of file basestrm.h. |
|
|
Definition at line 452 of file basestrm.h. |
|
|
Definition at line 451 of file basestrm.h. |
|
|
Definition at line 2299 of file basestrm.cpp. References ascDirectory, constructFileName(), directoryExist(), searchDirNum, and strdup(). Referenced by initFileIO(), main(), and opencontainer(). |
|
|
Definition at line 2384 of file basestrm.cpp. References pathdelimitter, and pathdelimitterstring. |
|
|
Definition at line 2378 of file basestrm.cpp. References pathdelimitter, and pathdelimitterstring. |
|
|
Definition at line 2036 of file basestrm.cpp. References ASC_direct, closedir(), opendir(), and readdir(). |
|
||||||||||||
|
Definition at line 1683 of file basestrm.cpp. References trleheader::id, min(), trleheader::rle, trleheader::size, trleheader::x, and trleheader::y. Referenced by tnstream::writeImage(). |
|
||||||||||||||||
|
Definition at line 946 of file basestrm.cpp. References appendbackslash(), ascDirectory, isPathRelative(), and pathdelimitter. |
|
||||||||||||||||||||
|
Definition at line 865 of file basestrm.cpp. References appendbackslash(), ascDirectory, maxFileStringSize, and pathdelimitter. |
|
|
converts path delimitters from foreign operating systems to the ones used by the current operating system. On Linux, this function converts backslashes to slashes, on Windows vice versa
Definition at line 2428 of file basestrm.cpp. References foreignPathDelimitterString, and pathdelimitterstring. Referenced by tfindfile::tfindfile(). |
|
|
Definition at line 2391 of file basestrm.cpp. References strdup(). Referenced by makeDirectory(). |
|
|
Definition at line 2282 of file basestrm.cpp. References closedir(), opendir(), and readdir(). Referenced by addSearchPath(), getDirectory(), and makeDirectory(). |
|
|
does a file s exist (wildcards allowed)
Definition at line 2226 of file basestrm.cpp. References tfindfile::getnextname(). Referenced by tdlgengine::addkey(), tdlgengine::addmarkedkey(), StartMultiplayerGame::Apply(), CargoGuiFunctions::TransferUnitControl::available(), GameMap::beginTurn(), CargoDialog::CargoDialog(), checkbi3dir(), checkDataVersion(), checkFileLoadability(), checkFileVersion(), GameMap::endRound(), FileCache::FileCache(), getbipath(), ConfigurationFileLocatorCore::getConfigFileName(), loadWave(), MailOptionsDialog::MailOptionsDialog(), mapeditorMainThread(), readgameoptions(), and UnitInfoDialog::UnitInfoDialog(). |
|
|
Definition at line 2361 of file basestrm.cpp. References extractFileName(). |
|
||||||||||||
|
Definition at line 2346 of file basestrm.cpp. References pathdelimitter. |
|
|
Definition at line 2367 of file basestrm.cpp. References extractFileName(). Referenced by BuildingType::runTextIO(), ObjectType::runTextIO(), TerrainType::Weather::runTextIO(), Vehicletype::runTextIO(), ASCImageProperty::toString(), and ASCImageArrayProperty::toString(). |
|
||||||||||||
|
Definition at line 2330 of file basestrm.cpp. References pathdelimitter. Referenced by ContainerCollector::init(), and writegameoptions(). |
|
|
Definition at line 2271 of file basestrm.cpp. |
|
|
Definition at line 2250 of file basestrm.cpp. References constructFileName(), FileLocation::container, FileLocation::directoryLevel, FileLocation::found, tn_file_buf_stream::get_time(), locateFile(), and maxFileStringSize. Referenced by process_ASC_map(), and process_BI_map(). |
|
||||||||||||||||
|
Definition at line 2200 of file basestrm.cpp. References tfindfile::getnextname(), and ASCString::toString(). Referenced by execuseraction(). |
|
|
Definition at line 2321 of file basestrm.cpp. |
|
|
Definition at line 2316 of file basestrm.cpp. |
|
|
Definition at line 926 of file basestrm.cpp. References pathdelimitter. Referenced by constructFileName(), ConfigurationFileLocatorCore::getConfigFileName(), and initFileIO(). |
|
|
Definition at line 1044 of file basestrm.cpp. References ContainerCollector::listContainer(). Referenced by showSearchPath(). |
|
|
Definition at line 2239 of file basestrm.cpp. References addSearchPath(), ContainerCollector::init(), and searchDirNum. Referenced by initFileIO(). |
|
||||||||||||||||
|
checks whether the regular expression pat matches the string str . This functions only understands dos/windows style wildcards: * and ? Definition at line 1803 of file basestrm.cpp. References patimat(). |
|
||||||||||||||||
|
Definition at line 772 of file basestrm.h. |
|
||||||||||||||||
|
Definition at line 749 of file basestrm.h. |
|
||||||||||||||||
|
Definition at line 728 of file basestrm.h. |
|
||||||||||||||||
|
||||||||||||||||
|
Definition at line 675 of file basestrm.h. References tnstream::readInt(). |
|
||||||||||||||||
|
Definition at line 662 of file basestrm.h. References tnstream::readInt(). Referenced by PlayListLoader::read(), BI3TranslationTableLoader::read(), and ItemFiltrationSystem::DataLoader::read(). |
|
|
Definition at line 685 of file basestrm.cpp. References stream_close(), stream_read(), and stream_seek(). Referenced by getFieldMask(), IconRepository::getIcon(), loadASCFieldImage(), loadASCFieldImageArray(), loadWave(), Surface::readImageFile(), ASC_PG_App::setIcon(), and StartupScreen::StartupScreen(). |
|
||||||||||||||||
|
Definition at line 759 of file basestrm.h. |
|
||||||||||||||||
|
Definition at line 738 of file basestrm.h. |
|
||||||||||||||||
|
Definition at line 717 of file basestrm.h. |
|
||||||||||||||||
|
||||||||||||||||
|
Definition at line 652 of file basestrm.h. References tnstream::writeInt(). Referenced by PlayListLoader::write(), BI3TranslationTableLoader::write(), and ItemFiltrationSystem::DataLoader::write(). |
|
|
Definition at line 29 of file unix/fileio.cpp. Referenced by ConfigurationFileLocatorCore::getConfigFileName(). |
|
|
Definition at line 84 of file basestrm.cpp. Referenced by tncontainerstream::tncontainerstream(). |
|
|
Definition at line 19 of file unix/fileio.cpp. Referenced by tn_file_buf_stream::tn_file_buf_stream(). |
|
|
Definition at line 21 of file unix/fileio.cpp. |
|
|
Definition at line 20 of file unix/fileio.cpp. Referenced by tn_file_buf_stream::tn_file_buf_stream(). |
|
|
Definition at line 22 of file unix/fileio.cpp. |
|
|
Definition at line 28 of file unix/fileio.cpp. |
|
|
Definition at line 74 of file basestrm.h. Referenced by constructFileName(), get_filetime(), and ContainerCollector::init(). |
|
|
Definition at line 23 of file unix/fileio.cpp. Referenced by appendbackslash(), constructFileName(), extractFileName(), extractPath(), isPathRelative(), tfindfile::tfindfile(), and tn_file_buf_stream::tn_file_buf_stream(). |
|
|
Definition at line 24 of file unix/fileio.cpp. Referenced by appendbackslash(), checkbi3dir(), convertPathDelimitters(), getbipath(), tloadBImap::LoadFromFile(), MusicPlayList::reset(), FileTransfer::send(), FileName::suffix(), and tfindfile::tfindfile(). |
1.4.2