____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"#include <iolib.h>
Public Member Functions | |
| CFile () | |
| ~CFile () | |
| int | open (const char *name, long flags) |
| int | close () |
| void | flush () |
| int | read (void *buf, size_t len) |
| int | seek (long offset, int whence) |
| long | tell () |
| int | printf (const char *format,...) |
Definition at line 96 of file iolib.h.
| CFile::CFile | ( | ) |
| CFile::~CFile | ( | ) |
| int CFile::open | ( | const char * | name, | |
| long | openflags | |||
| ) |
CLopen Library file open
| name | File name. | |
| openflags | Open read, or write and compression options |
Definition at line 91 of file iolib.cpp.
References Assert, CL_OPEN_READ, CL_OPEN_WRITE, CL_WRITE_GZ, CLF_TYPE_GZIP, CLF_TYPE_INVALID, CLF_TYPE_PLAIN, and DebugPrint.
Referenced by PatchSaveButtonListener::action(), CEditor::Init(), LoadGraphicPNG(), LoadStratagusMap(), LoadVorbis(), LoadWav(), LuaLoadBuffer(), PlayMovie(), SaveGame(), and Screenshot().
| int CFile::close | ( | ) |
CLclose Library file close
Definition at line 154 of file iolib.cpp.
References CLF_TYPE_GZIP, CLF_TYPE_INVALID, and CLF_TYPE_PLAIN.
Referenced by PatchSaveButtonListener::action(), EndReplayLog(), CEditor::Init(), LoadGraphicPNG(), LoadStratagusMap(), LoadVorbis(), LoadWav(), LuaLoadBuffer(), PlayMovie(), SaveGame(), Screenshot(), ~CFile(), CSampleVorbisStream::~CSampleVorbisStream(), and CSampleWavStream::~CSampleWavStream().
| void CFile::flush | ( | ) |
Definition at line 200 of file iolib.cpp.
References CLF_TYPE_GZIP, CLF_TYPE_INVALID, and CLF_TYPE_PLAIN.
Referenced by AppendLog().
| int CFile::read | ( | void * | buf, | |
| size_t | len | |||
| ) |
CLread Library file read
| buf | Pointer to read the data to. | |
| len | number of bytes to read. |
Definition at line 181 of file iolib.cpp.
References CLF_TYPE_GZIP, CLF_TYPE_INVALID, and CLF_TYPE_PLAIN.
Referenced by CL_png_read_data(), LoadVorbis(), LoadWav(), LuaLoadBuffer(), OggGetNextPage(), OggInit(), and CSampleWavStream::Read().
| int CFile::seek | ( | long | offset, | |
| int | whence | |||
| ) |
CLseek Library file seek
| offset | Seek position | |
| whence | How to seek |
Definition at line 285 of file iolib.cpp.
References CLF_TYPE_GZIP, CLF_TYPE_INVALID, CLF_TYPE_PLAIN, and gzseek().
Referenced by LoadVorbis(), LoadWav(), OggInit(), and CSampleWavStream::Read().
| long CFile::tell | ( | ) |
CLtell Library file tell
Definition at line 308 of file iolib.cpp.
References CLF_TYPE_GZIP, CLF_TYPE_INVALID, and CLF_TYPE_PLAIN.
Referenced by LoadVorbis().
| int CFile::printf | ( | const char * | format, | |
| ... | ||||
| ) |
CLprintf Library file write
| format | String Format. | |
| ... | Parameter List. |
Definition at line 221 of file iolib.cpp.
References CLF_TYPE_GZIP, CLF_TYPE_INVALID, and CLF_TYPE_PLAIN.
Referenced by PatchSaveButtonListener::action(), PrintLogCommand(), CUnitManager::Save(), CMap::Save(), SaveAi(), SaveAiPlayer(), SaveCcl(), SaveFullLog(), SaveGame(), SaveGroups(), Missile::SaveMissile(), SaveMissiles(), SaveOrder(), SavePlayers(), SaveSelections(), SaveTriggers(), SaveUnit(), SaveUpgrades(), and SaveViewports().
1.5.6