JunkBox_Lib++ (for Windows) 1.10.1
|
#include <LogRingBuffer.h>
Public Member Functions | |
CLogRingBuffer (int size) | |
virtual | ~CLogRingBuffer (void) |
int | init (int size) |
void | clear (void) |
void | putRingBuffer (Buffer buf, int input=LOG_RB_MESG, int kind=LOG_RB_UNKNOWN_DATA) |
void | rewriteBinHexRingBuffer (int n, int input) |
void | putRingFormat (int input, char *fmt,...) |
void | putRingFormat (int input, char *fmt, va_list args) |
Buffer | getRingBuffer (void) |
Buffer | getRingBuffer (int pos) |
int | getMaxBufSize (void) |
int | getMaxLineX (void) |
int | getMaxLineY (void) |
int | getTotalSize (void) |
int | getLastPosition (void) |
int | getLengthX (int n) |
int | getKindData (int n) |
Public Attributes | |
Buffer * | pBuf |
Protected Attributes | |
int | maxBufSize |
int | tlDataSize |
int | maxLineX |
int | maxLineY |
int | indentSize |
int | rPos |
int | wPos |
int * | kindData |
int * | inputSrc |
Definition at line 35 of file LogRingBuffer.h.
|
inline |
Definition at line 38 of file LogRingBuffer.h.
References CLogRingBuffer::init().
|
virtual |
Definition at line 13 of file LogRingBuffer.cpp.
References del_Buffer_dim(), and CLogRingBuffer::pBuf.
void clear | ( | void | ) |
Definition at line 66 of file LogRingBuffer.cpp.
References Buffer::buf, CLogRingBuffer::maxBufSize, CLogRingBuffer::maxLineX, CLogRingBuffer::maxLineY, CLogRingBuffer::pBuf, CLogRingBuffer::rPos, CLogRingBuffer::tlDataSize, Buffer::vldsz, and CLogRingBuffer::wPos.
|
inline |
Definition at line 59 of file LogRingBuffer.h.
References CLogRingBuffer::kindData, and CLogRingBuffer::maxBufSize.
|
inline |
|
inline |
Definition at line 58 of file LogRingBuffer.h.
References CLogRingBuffer::maxBufSize, and CLogRingBuffer::pBuf.
Referenced by CLogRingBuffer::putRingBuffer().
|
inline |
|
inline |
|
inline |
Buffer getRingBuffer | ( | int | pos | ) |
Buffer CLogRingBuffer::getRingBuffer(int pos)
バッファの位置を指定して読み込む.データポインタの移動無し.
Definition at line 305 of file LogRingBuffer.cpp.
References copy_Buffer(), init_Buffer(), CLogRingBuffer::inputSrc, LBUF, make_Buffer(), CLogRingBuffer::maxBufSize, CLogRingBuffer::pBuf, and Buffer::state.
Buffer getRingBuffer | ( | void | ) |
Buffer CLogRingBuffer::getRingBuffer(void)
バッファの先頭のデータを読み込む.データポインタを移動させる.
Definition at line 284 of file LogRingBuffer.cpp.
References copy_Buffer(), CLogRingBuffer::inputSrc, LBUF, make_Buffer(), CLogRingBuffer::maxBufSize, CLogRingBuffer::pBuf, CLogRingBuffer::rPos, and Buffer::state.
|
inline |
int init | ( | int | size | ) |
Definition at line 23 of file LogRingBuffer.cpp.
References del_Buffer_dim(), CLogRingBuffer::indentSize, CLogRingBuffer::inputSrc, CLogRingBuffer::kindData, LBUF, make_Buffer(), CLogRingBuffer::maxBufSize, CLogRingBuffer::maxLineX, CLogRingBuffer::maxLineY, CLogRingBuffer::pBuf, CLogRingBuffer::rPos, Buffer::state, CLogRingBuffer::tlDataSize, and CLogRingBuffer::wPos.
Referenced by CLogRingBuffer::CLogRingBuffer().
void putRingBuffer | ( | Buffer | buf, |
int | input = LOG_RB_MESG, | ||
int | kind = LOG_RB_UNKNOWN_DATA ) |
void CLogRingBuffer::putRingBuffer(Buffer buf, int input, int kind)
バッファの最後にデータを追加する.
buf | 追加するデータ. |
input | データのタグ LOG_RB_MESG, LOG_RB_INFO, LOG_RB_DEBUG, LOG_RB_WARN, LOG_RB_ERR |
kind | データの種類 LOG_RB_UNKNOWN_DATA, LOG_RB_TEXT_DATA, LOG_RB_TEXT_HALF_DATA, LOG_RB_BINARY_DATA, LOG_RB_BINHEX_DATA |
Definition at line 90 of file LogRingBuffer.cpp.
References Buffer::buf, cat_Buffer(), cat_s2Buffer, CHAR_CR, CHAR_LF, copy_Buffer(), copy_s2Buffer, decompline_Buffer_dim(), del_Buffer_dim(), free_Buffer(), CLogRingBuffer::getLengthX(), CLogRingBuffer::inputSrc, isText_Buffer(), CLogRingBuffer::kindData, LOG_RB_BINARY_DATA, LOG_RB_DEBUG, LOG_RB_ERROR, LOG_RB_INFO, LOG_RB_TEXT_DATA, LOG_RB_TEXT_HALF_DATA, LOG_RB_UNKNOWN_DATA, LOG_RB_WARNING, Max, CLogRingBuffer::maxBufSize, CLogRingBuffer::maxLineX, CLogRingBuffer::maxLineY, ON, CLogRingBuffer::pBuf, rept_Buffer(), snprintf, Buffer::state, CLogRingBuffer::tlDataSize, Buffer::vldsz, and CLogRingBuffer::wPos.
Referenced by CLogRingBuffer::putRingFormat(), CLogRingBuffer::putRingFormat(), and CLogRingBuffer::rewriteBinHexRingBuffer().
void putRingFormat | ( | int | input, |
char * | fmt, | ||
va_list | args ) |
void CLogRingBuffer::putRingFormat(int input, char* fmt, va_list args)
可変数変数用の書き込み用関数.バッファの最後に生成された文字列を追加する. 上位の関数から呼び出して使用する.
Definition at line 253 of file LogRingBuffer.cpp.
References Buffer::buf, free_Buffer(), LBUF, LOG_RB_TEXT_DATA, make_Buffer(), CLogRingBuffer::putRingBuffer(), recalc_strlen_Buffer(), and vsnprintf.
void putRingFormat | ( | int | input, |
char * | fmt, | ||
... ) |
void CLogRingBuffer::putRingFormat(int input, char* fmt, ...)
可変数変数用の書き込み用関数.バッファの最後に生成された文字列を追加する.
Definition at line 218 of file LogRingBuffer.cpp.
References Buffer::buf, free_Buffer(), LBUF, LOG_RB_TEXT_DATA, make_Buffer(), CLogRingBuffer::putRingBuffer(), recalc_strlen_Buffer(), and vsnprintf.
void rewriteBinHexRingBuffer | ( | int | n, |
int | input ) |
void CLogRingBuffer::rewriteBinHexRingBuffer(int n, int input)
バッファ位置 nにあるデータを 16進表示で書き直す. 主に,位置 nにあるデータがバイナリの場合に使用する.
Definition at line 196 of file LogRingBuffer.cpp.
References Buffer::buf, dump_Buffer(), free_Buffer(), CLogRingBuffer::indentSize, LOG_RB_BINHEX_DATA, CLogRingBuffer::maxBufSize, CLogRingBuffer::pBuf, CLogRingBuffer::putRingBuffer(), Buffer::vldsz, and CLogRingBuffer::wPos.
|
protected |
Definition at line 70 of file LogRingBuffer.h.
Referenced by CLogRingBuffer::init(), and CLogRingBuffer::rewriteBinHexRingBuffer().
|
protected |
Definition at line 76 of file LogRingBuffer.h.
Referenced by CLogRingBuffer::getRingBuffer(), CLogRingBuffer::getRingBuffer(), CLogRingBuffer::init(), and CLogRingBuffer::putRingBuffer().
|
protected |
Definition at line 75 of file LogRingBuffer.h.
Referenced by CLogRingBuffer::getKindData(), CLogRingBuffer::init(), and CLogRingBuffer::putRingBuffer().
|
protected |
Definition at line 65 of file LogRingBuffer.h.
Referenced by CLogRingBuffer::clear(), CLogRingBuffer::getKindData(), CLogRingBuffer::getLengthX(), CLogRingBuffer::getMaxBufSize(), CLogRingBuffer::getRingBuffer(), CLogRingBuffer::getRingBuffer(), CLogRingBuffer::init(), CLogRingBuffer::putRingBuffer(), and CLogRingBuffer::rewriteBinHexRingBuffer().
|
protected |
Definition at line 68 of file LogRingBuffer.h.
Referenced by CLogRingBuffer::clear(), CLogRingBuffer::getMaxLineX(), CLogRingBuffer::init(), and CLogRingBuffer::putRingBuffer().
|
protected |
Definition at line 69 of file LogRingBuffer.h.
Referenced by CLogRingBuffer::clear(), CLogRingBuffer::getMaxLineY(), CLogRingBuffer::init(), and CLogRingBuffer::putRingBuffer().
Buffer* pBuf |
Definition at line 62 of file LogRingBuffer.h.
Referenced by CLogRingBuffer::clear(), CLogRingBuffer::getLengthX(), CLogRingBuffer::getRingBuffer(), CLogRingBuffer::getRingBuffer(), CLogRingBuffer::init(), CLogRingBuffer::putRingBuffer(), CLogRingBuffer::rewriteBinHexRingBuffer(), and CLogRingBuffer::~CLogRingBuffer().
|
protected |
Definition at line 72 of file LogRingBuffer.h.
Referenced by CLogRingBuffer::clear(), CLogRingBuffer::getRingBuffer(), and CLogRingBuffer::init().
|
protected |
Definition at line 66 of file LogRingBuffer.h.
Referenced by CLogRingBuffer::clear(), CLogRingBuffer::getTotalSize(), CLogRingBuffer::init(), and CLogRingBuffer::putRingBuffer().
|
protected |
Definition at line 73 of file LogRingBuffer.h.
Referenced by CLogRingBuffer::clear(), CLogRingBuffer::getLastPosition(), CLogRingBuffer::init(), CLogRingBuffer::putRingBuffer(), and CLogRingBuffer::rewriteBinHexRingBuffer().