#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 |
|
inline |
Definition at line 254 of file StdBuf.h.
References Grow(), iSize, and Write().
Referenced by Append(), operator+(), operator+=(), C4Network2RefServer::PackPacket(), C4Playback::ReadBinary(), and CStdFile::SaveBuffer().
|
inline |
Definition at line 190 of file StdBuf.h.
Referenced by C4ControlReInitScenario::C4ControlReInitScenario(), C4Playback::Clear(), StdStrBuf::Clear(), C4HTTPClient::Clear(), C4NetIOPacket::Clear(), C4Record::ClearStreamingBuf(), CStdVectorFont::CStdVectorFont(), C4Group::LoadEntry(), New(), C4Playback::ReadBinary(), Ref(), C4Network2::StopStreaming(), Take(), and ~StdBuf().
|
inline |
|
inline |
Definition at line 165 of file StdBuf.h.
References getPtr(), and getSize().
Referenced by Compare(), StdStrBuf::Compare(), C4NetIOUDP::DoLoopbackTest(), and operator==().
void StdBuf::CompileFunc | ( | class StdCompiler * | pComp, |
int | iType = 0 |
||
) |
Definition at line 114 of file StdBuf.cpp.
References getData(), getMData(), StdCompiler::isDeserializer(), iSize, mkIntPackAdapt(), New(), StdCompiler::Raw(), StdCompiler::SEP_PART2, StdCompiler::Separator(), and StdCompiler::Value().
|
inline |
Definition at line 233 of file StdBuf.h.
References iSize.
Referenced by StdStrBuf::Copy(), Copy(), GrabPointer(), Grow(), StdCopyBuf::operator=(), Shrink(), and StdBuf().
|
inline |
|
inline |
|
inline |
Definition at line 225 of file StdBuf.h.
References getData(), iSize, isNull(), New(), and Write().
Referenced by Duplicate(), and C4PktBuf::operator=().
|
inlinestatic |
Definition at line 196 of file StdBuf.h.
Referenced by C4ID::CompileFunc(), 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.
References fRef.
Referenced by C4Network2ResChunk::AddTo(), Append(), Compare(), CompileFunc(), Copy(), CStdVectorFont::CStdVectorFont(), getBufPtr(), C4PktBuf::getData(), GetDbgRecPktData(), GetHash(), getPtr(), getRef(), isNull(), C4KeyboardInput::LoadCustomConfig(), C4Network2IODiscoverClient::OnPacket(), C4HTTPClient::Query(), StdCompilerINIRead::ReadString(), C4Record::Rec(), Ref(), SaveToFile(), C4Network2::StreamOut(), and Write().
|
inline |
|
inline |
Definition at line 100 of file StdBuf.h.
References fRef.
Referenced by C4Group::Add(), C4Playback::Check(), CompileFunc(), CStdVectorFont::CStdVectorFont(), getMBufPtr(), getMPtr(), GrabPointer(), C4TextureShape::Load(), C4SoundEffect::Load(), C4Group::LoadEntry(), LoadFromFile(), C4SolidMask::LoadMaskFromFile(), C4Playback::NextSequentialChunk(), and C4Network2::StartStreaming().
|
inline |
|
inline |
Definition at line 107 of file StdBuf.h.
References getPtr(), iSize, and StdBuf().
Referenced by C4NetIOPacket::getPBuf(), C4NetIOTCP::Peer::OnRecv(), C4Playback::ReadBinary(), and C4NetIOTCP::UnpackPacket().
|
inline |
Definition at line 104 of file StdBuf.h.
References getData().
Referenced by Compare(), getPart(), Move(), StdCompilerBinRead::Raw(), and StdCompilerBinRead::String().
|
inline |
Definition at line 271 of file StdBuf.h.
References getData(), getSize(), and StdBuf().
Referenced by C4NetIOPacket::getRef(), operator+(), and C4Playback::ReadBinary().
|
inline |
Definition at line 101 of file StdBuf.h.
References iSize.
Referenced by C4Group::Add(), C4Network2ResChunk::AddTo(), Append(), C4Record::ClearStreamingBuf(), Compare(), Copy(), CStdVectorFont::CStdVectorFont(), C4NetIOUDP::DoLoopbackTest(), C4Network2::DrawStatus(), GetDbgRecPktData(), GetHash(), C4NetIOPacket::getPBuf(), C4NetIOPacket::getPData(), C4Network2::getPendingStreamData(), C4NetIOPacket::getPSize(), getRef(), StdCompilerBinRead::getRemainingBytes(), StdStrBuf::getSize(), C4PktBuf::getSize(), C4NetIOPacket::getStatus(), C4Network2IO::HandlePacket(), C4TextureShape::Load(), C4SoundEffect::Load(), LoadFromFile(), C4SolidMask::LoadMaskFromFile(), C4Network2IO::OnPacket(), C4Network2IODiscover::OnPacket(), C4Network2IODiscoverClient::OnPacket(), C4NetIOUDP::Peer::OnRecv(), operator==(), C4NetIOTCP::PackPacket(), C4HTTPClient::Query(), StdCompilerBinRead::Raw(), C4Playback::ReadBinary(), StdCompilerBinRead::ReadValue(), C4Record::Rec(), Ref(), C4Playback::ReWriteBinary(), SaveToFile(), C4NetIOSimpleUDP::Send(), C4Network2::StreamIn(), C4Playback::StreamToRecord(), StdCompilerBinRead::String(), Take(), C4NetIOTCP::UnpackPacket(), C4Network2RefServer::UnpackPacket(), and Write().
|
inline |
Definition at line 133 of file StdBuf.h.
References Copy(), fRef, getMData(), and isNull().
Referenced by C4Group::Add(), StdStrBuf::GrabPointer(), and Take().
|
inline |
Definition at line 171 of file StdBuf.h.
References Copy(), fRef, and iSize.
Referenced by Append(), StdStrBuf::Grow(), C4NetIOTCP::PackPacket(), C4Playback::ReWriteBinary(), SetSize(), C4Network2::StreamIn(), and C4Playback::StreamToRecord().
|
inline |
Definition at line 98 of file StdBuf.h.
References getData().
Referenced by Copy(), C4NetIOUDP::Packet::Empty(), GetHash(), GrabPointer(), C4NetIOTCP::Peer::hasWaitingData(), C4NetIOUDP::InitBroadcast(), StdStrBuf::isNull(), and operator!().
|
inline |
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(), C4ControlReInitScenario::C4ControlReInitScenario(), C4Playback::StreamToRecord(), and C4ControlJoinPlayer::Strip().
|
inline |
Definition at line 159 of file StdBuf.h.
References getMPtr(), getPtr(), and iSize.
Referenced by C4Record::ClearStreamingBuf(), StdStrBuf::Move(), C4NetIOTCP::Peer::OnRecv(), C4Playback::ReadBinary(), and C4Network2::StreamOut().
|
inline |
Definition at line 146 of file StdBuf.h.
References Clear(), fRef, and iSize.
Referenced by StdCompilerBinWrite::BeginSecond(), C4NetIOPacket::C4NetIOPacket(), CompileFunc(), Copy(), C4NetIOSimpleUDP::Execute(), C4Group::LoadEntry(), LoadFromFile(), C4Playback::NextSequentialChunk(), C4NetpuncherPacket::PackTo(), StdCompilerINIRead::ReadString(), StdStrBuf::Replace(), C4Network2::StartStreaming(), and C4Playback::StreamToRecord().
|
inline |
|
inline |
Definition at line 312 of file StdBuf.h.
References operator==().
|
inline |
|
inline |
|
inline |
Definition at line 118 of file StdBuf.h.
References Clear(), fRef, and iSize.
Referenced by Copy(), operator=(), StdStrBuf::Ref(), Ref(), and StdBuf().
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 C4Playback::Open(), C4DownloadDlg::ShowModal(), C4Playback::StreamToRecord(), and C4ControlJoinPlayer::Strip().
|
inline |
Definition at line 204 of file StdBuf.h.
References Grow(), iSize, and Shrink().
Referenced by StdStrBuf::AppendFormatV(), C4Playback::Check(), C4Record::ClearStreamingBuf(), CStdVectorFont::CStdVectorFont(), C4NetIOSimpleUDP::Execute(), C4Playback::NextSequentialChunk(), C4Playback::ReWriteBinary(), and C4Playback::StreamToRecord().
|
inline |
Definition at line 180 of file StdBuf.h.
References Copy(), fRef, and iSize.
Referenced by C4Playback::ReadBinary(), StdCompilerINIRead::ReadString(), SetSize(), and StdStrBuf::Shrink().
|
inline |
|
inline |
Definition at line 276 of file StdBuf.h.
References getSize(), GrabPointer(), and Take().
|
inline |
Definition at line 124 of file StdBuf.h.
References Clear(), fRef, and iSize.
Referenced by C4Network2IO::HandlePacket(), operator=(), C4Network2ResChunk::Set(), StdBuf(), StdStrBuf::Take(), and Take().
|
inline |
|
inline |
Definition at line 153 of file StdBuf.h.
References getMPtr(), and iSize.
Referenced by StdStrBuf::Append(), Append(), C4NetIOPacket::C4NetIOPacket(), Copy(), C4NetIOTCP::PackPacket(), StdCompilerBinWrite::Raw(), C4Playback::ReWriteBinary(), Write(), and StdCompilerBinWrite::WriteData().
union { ... } |
|
protected |
|
protected |
Definition at line 92 of file StdBuf.h.
Referenced by StdStrBuf::Append(), Append(), StdStrBuf::AppendFormatV(), Clear(), CompileFunc(), Copy(), StdStrBuf::copyPart(), getPart(), getSize(), Grow(), Move(), New(), Ref(), SetSize(), Shrink(), Take(), and Write().