Initial
This commit is contained in:
60
commctrl/fmtlines.hpp
Normal file
60
commctrl/fmtlines.hpp
Normal file
@@ -0,0 +1,60 @@
|
||||
#ifndef _COMMCTRL_FORMATLINES_HPP_
|
||||
#define _COMMCTRL_FORMATLINES_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_STRING_HPP_
|
||||
#include <common/string.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_BLOCK_HPP_
|
||||
#include <common/block.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_GLOBALDATA_HPP_
|
||||
#include <common/gdata.hpp>
|
||||
#endif
|
||||
|
||||
class FormatLines
|
||||
{
|
||||
public:
|
||||
enum{HexCharsPerLine=0x10,ASCIICharsPerLine=0x20};
|
||||
FormatLines(void);
|
||||
~FormatLines();
|
||||
static DWORD hexLines(Block<String> &lineStrings,BYTE *pBuffer,DWORD byteCount,WORD hexCharsPerLine=HexCharsPerLine);
|
||||
static DWORD hexLines(Block<String> &lineStrings,GlobalData<BYTE> &globalData,WORD hexCharsPerLine=HexCharsPerLine);
|
||||
static DWORD asciiLines(Block<String> &lineStrings,BYTE *pBuffer,DWORD byteCount,WORD asciiCharsPerLine=ASCIICharsPerLine);
|
||||
static DWORD asciiLines(Block<String> &lineStrings,GlobalData<BYTE> &globalData,WORD asciiCharsPerLine=ASCIICharsPerLine);
|
||||
static DWORD hexasciiLines(Block<String> &lineStrings,BYTE *pBuffer,DWORD byteCount);
|
||||
static DWORD hexasciiLines(Block<String> &lineStrings,GlobalData<BYTE> &globalData);
|
||||
private:
|
||||
enum LineType{HexLine,ASCIILine};
|
||||
static DWORD formatLines(Block<String> &lineStrings,BYTE *pBuffer,DWORD byteCount,WORD charsPerLine,LineType lineType);
|
||||
};
|
||||
|
||||
inline
|
||||
FormatLines::FormatLines(void)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
FormatLines::~FormatLines()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD FormatLines::hexLines(Block<String> &lineStrings,GlobalData<BYTE> &globalData,WORD hexCharsPerLine)
|
||||
{
|
||||
return formatLines(lineStrings,&globalData[0],globalData.size(),hexCharsPerLine,HexLine);
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD FormatLines::hexLines(Block<String> &lineStrings,BYTE *pBuffer,DWORD byteCount,WORD hexCharsPerLine)
|
||||
{
|
||||
return formatLines(lineStrings,pBuffer,byteCount,hexCharsPerLine,HexLine);
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD FormatLines::asciiLines(Block<String> &lineStrings,BYTE *pBuffer,DWORD byteCount,WORD asciiCharsPerLine)
|
||||
{
|
||||
return formatLines(lineStrings,pBuffer,byteCount,asciiCharsPerLine,ASCIILine);
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user