OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
StdBuf.h File Reference
#include <zlib.h>
Include dependency graph for StdBuf.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  StdBuf
 
class  StdCopyBuf
 
class  StdStrBuf
 
class  StdCopyStrBuf
 

Functions

template<class elem_t >
const elem_t * getBufPtr (const StdBuf &Buf, size_t iPos=0)
 
template<class elem_t >
elem_t * getMBufPtr (StdBuf &Buf, size_t iPos=0)
 
StdStrBuf FormatString (const char *szFmt,...) GNUC_FORMAT_ATTRIBUTE
 
StdStrBuf FormatStringV (const char *szFmt, va_list args)
 

Function Documentation

StdStrBuf FormatString ( const char *  szFmt,
  ... 
)

Definition at line 270 of file StdBuf.cpp.

References FormatStringV().

Referenced by C4Network2IRCClient::Action(), C4Object::ActivateMenu(), C4Shader::AddDefine(), C4GUI::ComboBox_FillCB::AddEntry(), AlgoScript(), C4PlayerInfoList::AssignPlayerIDs(), c4_mapgen_handle_new(), C4ClientPlayerInfos::C4ClientPlayerInfos(), C4MapScriptAlgoModifier::C4MapScriptAlgoModifier(), C4StartupOptionsDlg::C4StartupOptionsDlg(), C4StartupPlrPropertiesDlg::C4StartupPlrPropertiesDlg(), C4GameControlNetwork::CalcPerformance(), C4PropList::Call(), C4Playback::Check(), C4Game::CheckObjectEnumeration(), C4AulFunc::CheckParTypes(), C4StartupPlrSelDlg::CheckPlayerName(), C4Scoreboard::CompileFunc(), C4ConfigDeveloper::CompileFunc(), C4SDefinitions::CompileFunc(), C4Object::CompileFunc(), C4ConfigGamepad::CompileFunc(), C4KeyCodeEx::CompileFunc(), C4Scenario::CompileFunc(), C4Game::CompileFunc(), C4Config::CompileFunc(), ConstructionCheck(), C4Object::Contact(), C4AulDebug::ControlScriptEvaluated(), C4MapFolderData::CreateGUIElements(), CreateValueProviderFromArray(), C4MaterialMap::CrossMapMaterials(), CStdVectorFont::CStdVectorFont(), DateString(), C4AulDebug::DebugStep(), DialogWinProc(), C4Effect::DoCall(), C4EditCursor::DoContextMenu(), C4EditCursor::DoContextObjCommand(), C4StartupNetDlg::DoOK(), C4MainMenu::DoRefillInternal(), C4StartupNetDlg::DoRefresh(), C4UpdatePackage::DoUpdate(), C4DownloadDlg::DownloadFile(), C4LoaderScreen::Draw(), C4ScriptGuiWindow::Draw(), C4Viewport::DrawMenu(), C4Game::DropDef(), C4Game::DropFile(), C4Player::Eliminate(), StdMeshLoader::StdMeshXML::Error(), C4Object::ExecLife(), C4PlayerControlDefs::FinalInit(), FnParAlgo(), C4GameLobby::C4PacketCountdown::GetCountdownMsg(), C4Value::GetDataString(), C4StartupPlrSelDlg::PlayerListItem::GetDelWarning(), C4FoWBeam::getDesc(), C4Network2Reference::getGameGoalString(), C4GameParameters::GetGameGoalString(), StdCompilerBinRead::getPosition(), StdCompilerINIRead::getPosition(), C4GameVersion::GetString(), C4Game::GetTranslatedString(), C4MapScriptAlgo::GetXYProps(), C4Network2IO::HandlePacket(), C4LoaderScreen::Init(), C4ViewportWindow::Init(), C4MapScriptMatTexMask::Init(), C4Shader::Init(), C4GUI::DialogWindow::Init(), C4FontLoader::InitFont(), C4Network2::InitLeague(), C4GameRes::InitNetwork(), C4Game::InitNetworkFromAddress(), C4Game::InitNetworkFromReference(), C4Game::InitPlayers(), C4KeyCodeEx::KeyCode2String(), C4StartupScenSelDlg::KeyDelete(), C4Network2::LeagueEnd(), C4Network2::LeaguePlrAuth(), C4Network2::LeaguePlrAuthCheck(), C4Network2::LeagueStart(), C4Network2::LeagueUpdateProcessReply(), C4Object::Lift(), C4DefList::Load(), C4Landscape::Load(), C4StartupPlrSelDlg::PlayerListItem::Load(), StdMeshLoader::StdMeshXML::LoadBoneAssignments(), C4Def::LoadDefCore(), StdMeshLoader::StdMeshXML::LoadGeometry(), StdMeshLoader::LoadMeshXml(), C4Player::LoadRuntimeData(), C4Game::LoadScenarioComponents(), StdMeshSkeletonLoader::LoadSkeletonXml(), LogFatal(), C4Network2IRCClient::Message(), C4Network2IRCClient::Notice(), ObjectComDig(), C4StartupNetDlg::OnChatTitleChange(), C4ChatDlg::OnChatTitleChange(), C4GameLobby::MainDlg::OnClientAddPlayer(), C4ChatControl::OnConnectBtn(), C4DownloadDlg::OnIdle(), C4Group::Open(), C4Playback::Open(), C4Game::OpenScenario(), StdMeshMatManager::Parse(), CStdGL::PrepareMaterial(), C4ControlJoinPlayer::PreRec(), C4ValueGetCompiler::ProcessChar(), C4MessageInput::ProcessCommand(), C4ChatControl::ProcessInput(), C4Object::Promote(), C4Object::Push(), C4Network2IRCClient::Quit(), C4PlayerInfoList::RecreatePlayers(), C4Shader::Refresh(), C4GraphicsResource::RegisterGlobalGraphics(), C4Network2IRCClient::RegisterNick(), C4GroupSet::RegisterParentFolders(), C4PlayerList::RemoveAtClient(), C4PlayerList::RemoveAtRemoteClient(), C4PlayerList::RemoveLocal(), StdMeshLoader::StdMeshXML::RequireFirstChild(), StdMeshLoader::StdMeshXML::RequireFloatAttribute(), StdMeshLoader::StdMeshXML::RequireIntAttribute(), StdMeshLoader::StdMeshXML::RequireStrAttribute(), C4PlayerControlAssignment::ResolveRefs(), C4GameResList::RetrieveFiles(), C4Network2::RetrieveRes(), C4Network2::RetrieveScenario(), C4GameSave::Save(), C4Def::Save(), C4Game::SaveGameTitle(), C4Console::SaveScenario(), C4PlayerInfoList::SetAsRestoreInfos(), C4GUI::FrameDecoration::SetByDef(), C4Player::SetHostility(), C4StartupPlrSelDlg::PlayerListItem::SetSelectionInfo(), C4Network2HTTPClient::SetServer(), C4Game::SlowDown(), C4Game::SpeedUp(), C4Playback::Strip(), C4Player::Surrender(), TimeString(), C4Value::ToJSON(), C4EditCursor::ToolFailure(), C4Network2Address::toString(), C4NetIO::EndpointAddress::ToString(), C4ChatControl::ChatSheet::NickItem::Update(), C4LeagueSignupDialog::UserClose(), C4FullScreen::ViewportCheck(), ViewportWinProc(), C4AulCompiler::ConstexprEvaluator::visit(), and C4StringTable::~C4StringTable().

271 {
272  va_list args; va_start(args, szFmt);
273  return FormatStringV(szFmt, args);
274 }
StdStrBuf FormatStringV(const char *szFmt, va_list args)
Definition: StdBuf.cpp:276

Here is the call graph for this function:

StdStrBuf FormatStringV ( const char *  szFmt,
va_list  args 
)

Definition at line 276 of file StdBuf.cpp.

References StdStrBuf::FormatV().

Referenced by StdCompiler::excCorrupt(), StdCompiler::excEOF(), StdCompiler::excNotFound(), FormatString(), C4InteractiveThread::ThreadLog(), C4InteractiveThread::ThreadLogDebug(), C4InteractiveThread::ThreadLogFatal(), C4InteractiveThread::ThreadLogS(), and C4ScriptHost::Warn().

277 {
278  StdStrBuf Buf;
279  Buf.FormatV(szFmt, args);
280  return Buf;
281 }
void FormatV(const char *szFmt, va_list args)
Definition: StdBuf.cpp:182

Here is the call graph for this function:

Here is the caller graph for this function:

template<class elem_t >
const elem_t* getBufPtr ( const StdBuf Buf,
size_t  iPos = 0 
)

Definition at line 336 of file StdBuf.h.

References StdBuf::getData().

337 {
338  // assert(iPos + sizeof(elem_t) <= Buf.getSize());
339  const void *pPos = reinterpret_cast<const char *>(Buf.getData()) + iPos;
340  return reinterpret_cast<const elem_t *>(pPos);
341 }
const void * getData() const
Definition: StdBuf.h:99

Here is the call graph for this function:

template<class elem_t >
elem_t* getMBufPtr ( StdBuf Buf,
size_t  iPos = 0 
)

Definition at line 343 of file StdBuf.h.

References StdBuf::getMData().

344 {
345  // assert(iPos + sizeof(elem_t) <= Buf.getSize());
346  void *pPos = reinterpret_cast<char *>(Buf.getMData()) + iPos;
347  return reinterpret_cast<elem_t *>(pPos);
348 }
void * getMData()
Definition: StdBuf.h:100

Here is the call graph for this function: