38 const virtual void fieldsToJSON(std::stringstream& outs,
size_t level) = 0;
49 const virtual bool toJSON(std::stringstream& outs,
size_t level)
82 const bool skipPadding =
true;
83 const size_t data_size = buffer.
getDataSize(skipPadding);
84 const BYTE* data_buf = buffer.
getData(skipPadding);
85 if (!data_size || !data_buf) {
89 std::cerr <<
"Settings initialization failed!\n";
93 for (
size_t i = 0; i < data_size; ++i) {
94 const BYTE val = data_buf[i];
A class responsible for filling in the statistics with the data from the particular buffer.
bool fill(AreaStats &stats, StatsSettings *settings)
AreaStatsCalculator(const util::ByteBuffer &_buffer)
Base class for the statistics from analyzed buffer.
virtual void _appendVal(BYTE val)=0
virtual const bool toJSON(std::stringstream &outs, size_t level)
virtual void summarize()=0
void setStartOffset(size_t _area_start)
virtual bool fillSettings(StatsSettings *_settings)
virtual const void fieldsToJSON(std::stringstream &outs, size_t level)=0
Base class for settings defining what type of stats should be collected.
virtual bool isFilled()=0
size_t getDataSize(bool trimmed=false) const
const BYTE * getData(bool trimmed=false) const
size_t getStartOffset(bool trimmed) const