ZNC  trunk
Public Member Functions | Protected Attributes | List of all members
CBuffer Class Reference

#include <Buffer.h>

+ Inheritance diagram for CBuffer:
+ Collaboration diagram for CBuffer:

Public Member Functions

 CBuffer (unsigned int uLineCount=100)
 
 ~CBuffer ()
 
size_type AddLine (const CMessage &Format, const CString &sText="")
 
size_type UpdateLine (const CString &sCommand, const CMessage &Format, const CString &sText="")
 
size_type UpdateExactLine (const CMessage &Format, const CString &sText="")
 
size_type AddLine (const CString &sFormat, const CString &sText="", const timeval *ts=nullptr, const MCString &mssTags=MCString::EmptyMap)
 
size_type UpdateLine (const CString &sMatch, const CString &sFormat, const CString &sText="")
 Same as AddLine, but replaces a line whose format string starts with sMatch if there is one. More...
 
size_type UpdateExactLine (const CString &sFormat, const CString &sText="")
 Same as UpdateLine, but does nothing if this exact line already exists. More...
 
const CBufLineGetBufLine (unsigned int uIdx) const
 
CString GetLine (size_type uIdx, const CClient &Client, const MCString &msParams=MCString::EmptyMap) const
 
size_type Size () const
 
bool IsEmpty () const
 
void Clear ()
 
bool SetLineCount (unsigned int u, bool bForce=false)
 
unsigned int GetLineCount () const
 

Protected Attributes

unsigned int m_uLineCount
 

Constructor & Destructor Documentation

◆ CBuffer()

CBuffer::CBuffer ( unsigned int  uLineCount = 100)

◆ ~CBuffer()

CBuffer::~CBuffer ( )

Member Function Documentation

◆ AddLine() [1/2]

size_type CBuffer::AddLine ( const CMessage Format,
const CString sText = "" 
)

◆ AddLine() [2/2]

size_type CBuffer::AddLine ( const CString sFormat,
const CString sText = "",
const timeval *  ts = nullptr,
const MCString mssTags = MCString::EmptyMap 
)

◆ Clear()

void CBuffer::Clear ( )
inline

◆ GetBufLine()

const CBufLine& CBuffer::GetBufLine ( unsigned int  uIdx) const

◆ GetLine()

CString CBuffer::GetLine ( size_type  uIdx,
const CClient Client,
const MCString msParams = MCString::EmptyMap 
) const

◆ GetLineCount()

unsigned int CBuffer::GetLineCount ( ) const
inline

◆ IsEmpty()

bool CBuffer::IsEmpty ( ) const
inline

◆ SetLineCount()

bool CBuffer::SetLineCount ( unsigned int  u,
bool  bForce = false 
)

◆ Size()

size_type CBuffer::Size ( ) const
inline

◆ UpdateExactLine() [1/2]

size_type CBuffer::UpdateExactLine ( const CMessage Format,
const CString sText = "" 
)

◆ UpdateExactLine() [2/2]

size_type CBuffer::UpdateExactLine ( const CString sFormat,
const CString sText = "" 
)

Same as UpdateLine, but does nothing if this exact line already exists.

We need this because "/version" sends us the 005 raws again

◆ UpdateLine() [1/2]

size_type CBuffer::UpdateLine ( const CString sCommand,
const CMessage Format,
const CString sText = "" 
)

◆ UpdateLine() [2/2]

size_type CBuffer::UpdateLine ( const CString sMatch,
const CString sFormat,
const CString sText = "" 
)

Same as AddLine, but replaces a line whose format string starts with sMatch if there is one.

Member Data Documentation

◆ m_uLineCount

unsigned int CBuffer::m_uLineCount
protected

Referenced by GetLineCount().


The documentation for this class was generated from the following file: