#include <StdBuf.h>
Public Member Functions | |
StdBuf ()=default | |
StdBuf (StdBuf &Buf2, bool fCopy=false) | |
StdBuf (const StdBuf &Buf2, bool fCopy=true) | |
StdBuf (StdBuf &&Buf2) noexcept | |
StdBuf (const void *pData, size_t iSize, bool fCopy=false) | |
~StdBuf () | |
bool | isNull () const |
const void * | getData () const |
void * | getMData () |
size_t | getSize () const |
bool | isRef () const |
const void * | getPtr (size_t i) const |
void * | getMPtr (size_t i) |
StdBuf | getPart (size_t iStart, size_t inSize) const |
void | Ref (const void *pnData, size_t inSize) |
void | Take (void *pnData, size_t inSize) |
void * | GrabPointer () |
void | New (size_t inSize) |
void | Write (const void *pnData, size_t inSize, size_t iAt=0) |
void | Move (size_t iFrom, size_t inSize, size_t iTo=0) |
int | Compare (const void *pCData, size_t iCSize, size_t iAt=0) const |
void | Grow (size_t iGrow) |
void | Shrink (size_t iShrink) |
void | Clear () |
void | SetSize (size_t inSize) |
void | Write (const StdBuf &Buf2, size_t iAt=0) |
int | Compare (const StdBuf &Buf2, size_t iAt=0) const |
void | Copy (size_t inSize) |
void | Copy () |
void | Copy (const void *pnData, size_t inSize) |
void | Copy (const StdBuf &Buf2) |
StdBuf | Duplicate () const |
void | Append (const void *pnData, size_t inSize) |
void | Append (const StdBuf &Buf2) |
void | Ref (const StdBuf &Buf2) |
StdBuf | getRef () const |
void | Take (StdBuf &Buf2) |
void | Take (StdBuf &&Buf2) |
bool | LoadFromFile (const char *szFile) |
bool | SaveToFile (const char *szFile) const |
bool | operator! () const |
StdBuf | operator+= (const StdBuf &Buf2) |
StdBuf | operator+ (const StdBuf &Buf2) const |
bool | operator== (const StdBuf &Buf2) const |
bool | operator!= (const StdBuf &Buf2) const |
StdBuf & | operator= (StdBuf &&Buf2) |
int | GetHash () const |
void | CompileFunc (class StdCompiler *pComp, int iType=0) |
Static Public Member Functions | |
static void | DeletePointer (void *data) |
Protected Attributes | |
bool | fRef = true |
union { | |
const void * | pData = nullptr |
void * | pMData |
}; | |
unsigned int | iSize = 0 |
|
default |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
Definition at line 254 of file StdBuf.h.
References Grow(), and Write().
Referenced by Append(), StdStrBuf::Append(), StdStrBuf::AppendFormatV(), StdStrBuf::AppendUntil(), StdStrBuf::Copy(), operator+(), operator+=(), StdStrBuf::operator+=(), C4Network2RefServer::PackPacket(), C4Network2HTTPClient::PackPacket(), C4Playback::ReadBinary(), and CStdFile::SaveBuffer().
|
inline |
|
inline |
Definition at line 190 of file StdBuf.h.
Referenced by C4ControlReInitScenario::C4ControlReInitScenario(), C4NetIOPacket::Clear(), StdStrBuf::Clear(), C4NetIOTCP::Peer::Close(), StdStrBuf::Copy(), StdStrBuf::CopyUntil(), CStdVectorFont::CStdVectorFont(), StdStrBuf::FormatV(), C4Group::LoadEntry(), New(), Ref(), C4NetIOTCP::Peer::Send(), Take(), StdStrBuf::TrimSpaces(), and ~StdBuf().
|
inline |
Definition at line 165 of file StdBuf.h.
References getPtr(), and getSize().
Referenced by C4NetIOUDP::Packet::AddFragment(), Compare(), StdStrBuf::Compare(), StdStrBuf::Compare_(), C4NetIOUDP::DoLoopbackTest(), operator==(), and StdStrBuf::operator==().
|
inline |
void StdBuf::CompileFunc | ( | class StdCompiler * | pComp, |
int | iType = 0 |
||
) |
Definition at line 114 of file StdBuf.cpp.
References getData(), getMData(), getSize(), GetWideChar(), GetWideCharBuf(), StdCompiler::isDeserializer(), iSize, mkIntPackAdapt(), New(), StdCompiler::Raw(), StdCompiler::SEP_PART2, StdCompiler::Separator(), SetSize(), StdStrBuf::StdStrBuf(), and StdCompiler::Value().
Referenced by StdStrBuf::EscapeString(), and GetHash().
|
inline |
Definition at line 225 of file StdBuf.h.
References getData(), iSize, isNull(), New(), and Write().
Referenced by C4PktBuf::C4PktBuf(), C4NetIOUDP::ClearStatistic(), EditorWindowState::CompileFunc(), and Duplicate().
|
inline |
Definition at line 233 of file StdBuf.h.
Referenced by Copy(), StdStrBuf::Copy(), GrabPointer(), Grow(), StdCopyBuf::operator=(), StdCopyStrBuf::operator=(), Shrink(), and StdBuf().
|
inline |
|
inline |
|
inlinestatic |
Definition at line 196 of file StdBuf.h.
Referenced by C4ID::CompileFunc(), C4Group::Open(), and C4GroupEntry::~C4GroupEntry().
|
inline |
Definition at line 248 of file StdBuf.h.
References Copy().
Referenced by C4NetIOPacket::Duplicate().
|
inline |
Definition at line 99 of file StdBuf.h.
Referenced by Append(), Compare(), CompileFunc(), StdStrBuf::CompileFunc(), Copy(), CStdVectorFont::CStdVectorFont(), StdStrBuf::EnsureUnicode(), getBufPtr(), C4PktBuf::getData(), GetDbgRecPktData(), GetHash(), getPtr(), getRef(), StdStrBuf::getRef(), StdStrBuf::GetSection(), isNull(), C4AulDebug::Listen(), C4KeyboardInput::LoadCustomConfig(), C4Network2IODiscoverClient::OnPacket(), StdStrBuf::operator const void *(), StdCopyStrBuf::operator std::string(), StdStrBuf::operator<(), StdCompilerINIRead::Raw(), StdCompilerINIRead::ReadString(), C4Record::Rec(), Ref(), SaveToFile(), StdStrBuf::SaveToFile(), StdStrBuf::SplitAtChar(), StdStrBuf::TrimSpaces(), StdStrBuf::ValidateChars(), Write(), and C4Network2IRCClient::~C4Network2IRCClient().
|
inline |
Definition at line 322 of file StdBuf.h.
References CompileFunc(), getData(), getSize(), and isNull().
Referenced by StdStrBuf::GetHash().
|
inline |
Definition at line 100 of file StdBuf.h.
Referenced by C4Group::Add(), C4Playback::Check(), CompileFunc(), CStdVectorFont::CStdVectorFont(), getMBufPtr(), getMPtr(), GrabPointer(), C4TextureShape::Load(), C4SoundEffect::Load(), C4Group::LoadEntry(), LoadFromFile(), StdStrBuf::LoadFromFile(), C4SolidMask::LoadMaskFromFile(), and C4Playback::NextSequentialChunk().
|
inline |
Definition at line 105 of file StdBuf.h.
References getMData().
Referenced by StdStrBuf::AppendCharacter(), StdStrBuf::AppendChars(), StdStrBuf::AppendFormatV(), C4NetIOTCP::Peer::GetRecvBuf(), StdStrBuf::Grow(), StdStrBuf::InsertChar(), Move(), StdStrBuf::Replace(), StdStrBuf::ReplaceChar(), StdStrBuf::ReplaceEnd(), StdStrBuf::Shrink(), StdStrBuf::ToLowerCase(), StdStrBuf::TrimSpaces(), and Write().
|
inline |
Definition at line 107 of file StdBuf.h.
References getPtr(), and StdBuf().
Referenced by C4NetIOUDP::Packet::AddFragment(), C4NetIOUDP::Packet::GetFragment(), C4NetIOTCP::Peer::OnRecv(), C4Playback::ReadBinary(), and C4Network2HTTPClient::UnpackPacket().
|
inline |
Definition at line 104 of file StdBuf.h.
References getData().
Referenced by StdStrBuf::AppendBackslash(), Compare(), StdStrBuf::copyPart(), StdStrBuf::EnsureUnicode(), getPart(), StdStrBuf::InsertChar(), Move(), StdStrBuf::operator[](), and StdStrBuf::Replace().
|
inline |
Definition at line 271 of file StdBuf.h.
References getData(), getSize(), and StdBuf().
Referenced by C4NetIOPacket::getRef(), operator+(), StdStrBuf::operator+(), and C4Playback::ReadBinary().
|
inline |
Definition at line 101 of file StdBuf.h.
References iSize.
Referenced by C4Group::Add(), C4NetIOUDP::Packet::AddFragment(), Append(), C4ControlJoinPlayer::C4ControlJoinPlayer(), Compare(), CompileFunc(), Copy(), CStdVectorFont::CStdVectorFont(), C4NetIOUDP::DoCheck(), C4NetIOUDP::DoLoopbackTest(), C4Network2::DrawStatus(), StdStrBuf::EnsureUnicode(), C4NetIOUDP::Packet::FragmentCnt(), C4NetIOUDP::Packet::FragmentSize(), GetDbgRecPktData(), C4Group::GetFirstEntry(), C4NetIOUDP::Packet::GetFragment(), GetHash(), StdStrBuf::getLength(), C4Network2::getPendingStreamData(), C4NetIOTCP::Peer::GetRecvBuf(), getRef(), C4PktBuf::getSize(), StdStrBuf::getSize(), StdStrBuf::Grow(), C4Network2IO::HandlePacket(), C4AulDebug::Listen(), C4TextureShape::Load(), C4SoundEffect::Load(), LoadFromFile(), C4SolidMask::LoadMaskFromFile(), C4Network2IODiscover::OnPacket(), C4Network2IODiscoverClient::OnPacket(), C4Network2IO::OnPacket(), C4NetIOTCP::Peer::OnRecv(), C4NetIOUDP::Peer::OnRecv(), operator==(), C4NetIOTCP::PackPacket(), PropertyDlgProc(), C4Network2HTTPClient::Query(), StdCompilerINIRead::Raw(), C4Playback::ReadBinary(), C4Record::Rec(), Ref(), C4Playback::ReWriteBinary(), SaveToFile(), C4NetIOTCP::Peer::Send(), C4NetIOSimpleUDP::Send(), C4Network2::StreamIn(), C4Playback::StreamToRecord(), Take(), C4Network2RefServer::UnpackPacket(), C4Network2HTTPClient::UnpackPacket(), C4NetIOTCP::UnpackPacket(), Write(), and C4Network2IRCClient::~C4Network2IRCClient().
|
inline |
Definition at line 133 of file StdBuf.h.
References Copy(), getMData(), and isNull().
Referenced by C4Group::Add(), C4Group::GetFirstEntry(), StdStrBuf::GrabPointer(), StdCompilerINIRead::String(), and Take().
|
inline |
Definition at line 171 of file StdBuf.h.
References Copy().
Referenced by Append(), StdStrBuf::Append(), StdStrBuf::AppendCharacter(), StdStrBuf::AppendChars(), StdStrBuf::AppendFormatV(), StdStrBuf::Grow(), StdStrBuf::InsertChar(), C4AulDebug::Listen(), C4NetIOTCP::PackPacket(), C4Playback::ReWriteBinary(), StdStrBuf::SetLength(), SetSize(), C4Playback::StreamToRecord(), and C4Network2IRCClient::~C4Network2IRCClient().
|
inline |
Definition at line 98 of file StdBuf.h.
References getData().
Referenced by StdStrBuf::AppendFormatV(), Copy(), C4NetIOUDP::Packet::Empty(), GetHash(), GrabPointer(), C4NetIOTCP::Peer::hasWaitingData(), C4NetIOUDP::InitBroadcast(), StdStrBuf::isNull(), operator!(), StdStrBuf::operator!(), StdStrBuf::ReplaceChar(), C4NetIOTCP::Peer::Send(), StdStrBuf::SetLength(), and StdStrBuf::ToLowerCase().
|
inline |
Definition at line 102 of file StdBuf.h.
References fRef.
Referenced by StdStrBuf::isRef(), and StdBuf().
bool StdBuf::LoadFromFile | ( | const char * | szFile | ) |
Definition at line 32 of file StdBuf.cpp.
References FileSize(), getMData(), getSize(), GetWideChar(), New(), O_BINARY, O_CLOEXEC, and O_SEQUENTIAL.
Referenced by C4ControlJoinPlayer::C4ControlJoinPlayer(), EditorWindowState::CompileFunc(), StdStrBuf::Copy(), C4Record::StopStreaming(), C4Playback::StreamToRecord(), C4ControlJoinPlayer::Strip(), and Take().
|
inline |
Definition at line 159 of file StdBuf.h.
References getMPtr(), and getPtr().
Referenced by StdStrBuf::Move(), C4NetIOTCP::Peer::OnRecv(), and C4NetIOTCP::Peer::Send().
|
inline |
Definition at line 146 of file StdBuf.h.
References Clear().
Referenced by C4NetIOUDP::Packet::AddFragment(), C4NetIOPacket::C4NetIOPacket(), CompileFunc(), Copy(), C4NetIOUDP::Peer::DoCheck(), C4NetIOSimpleUDP::Execute(), C4NetIOUDP::Packet::GetFragment(), C4Group::LoadEntry(), LoadFromFile(), C4Playback::NextSequentialChunk(), C4NetpuncherPacket::PackTo(), StdCompilerINIRead::ReadString(), StdStrBuf::Replace(), and C4Playback::StreamToRecord().
|
inline |
|
inline |
Definition at line 312 of file StdBuf.h.
References operator==().
Definition at line 300 of file StdBuf.h.
References Append(), and getRef().
|
inline |
Definition at line 308 of file StdBuf.h.
References Compare(), and getSize().
Referenced by operator!=(), and StdStrBuf::operator!=().
|
inline |
Definition at line 118 of file StdBuf.h.
References Clear().
Referenced by Copy(), operator=(), StdStrBuf::operator=(), Ref(), StdStrBuf::Ref(), and StdBuf().
|
inline |
bool StdBuf::SaveToFile | ( | const char * | szFile | ) | const |
Definition at line 53 of file StdBuf.cpp.
References getData(), getSize(), GetWideChar(), O_BINARY, O_CLOEXEC, and O_SEQUENTIAL.
Referenced by C4ControlJoinPlayer::C4ControlJoinPlayer(), EditorWindowState::CompileFunc(), StdStrBuf::Copy(), C4DownloadDlg::ShowModal(), C4Playback::StreamToRecord(), C4ControlJoinPlayer::Strip(), and Take().
|
inline |
Definition at line 204 of file StdBuf.h.
References Grow(), and Shrink().
Referenced by StdStrBuf::AppendFormatV(), C4Playback::Check(), CompileFunc(), CStdVectorFont::CStdVectorFont(), C4NetIOSimpleUDP::Execute(), C4NetIOTCP::Peer::GetRecvBuf(), C4Playback::NextSequentialChunk(), C4NetIOTCP::Peer::OnRecv(), PropertyDlgProc(), C4Playback::ReWriteBinary(), and C4Playback::StreamToRecord().
|
inline |
Definition at line 180 of file StdBuf.h.
References Copy().
Referenced by C4NetIOTCP::Peer::OnRecv(), StdCompilerINIRead::ReadString(), C4NetIOTCP::Peer::Send(), StdStrBuf::SetLength(), SetSize(), StdStrBuf::Shrink(), and StdStrBuf::SplitAtChar().
|
inline |
Definition at line 124 of file StdBuf.h.
References Clear().
Referenced by StdStrBuf::AppendFormatV(), StdStrBuf::CompileFunc(), StdStrBuf::EnsureUnicode(), C4Network2IO::HandlePacket(), operator=(), StdStrBuf::Replace(), StdBuf(), Take(), and StdStrBuf::Take().
|
inline |
Definition at line 276 of file StdBuf.h.
References getSize(), GrabPointer(), and Take().
|
inline |
Definition at line 280 of file StdBuf.h.
References LoadFromFile(), SaveToFile(), and Take().
|
inline |
Definition at line 153 of file StdBuf.h.
References getMPtr().
Referenced by C4NetIOUDP::Packet::AddFragment(), Append(), StdStrBuf::Append(), C4NetIOPacket::C4NetIOPacket(), Copy(), C4NetIOUDP::Peer::DoCheck(), C4NetIOUDP::Packet::GetFragment(), C4AulDebug::Listen(), Write(), and C4Network2IRCClient::~C4Network2IRCClient().
|
inline |
union { ... } |
|
protected |
Definition at line 92 of file StdBuf.h.
Referenced by StdStrBuf::Append(), StdStrBuf::AppendFormatV(), CompileFunc(), Copy(), StdStrBuf::copyPart(), and getSize().