sinfo
a compact graphical system performance monitor
Loading...
Searching...
No Matches
K3Buffer.h
1#ifndef K3BUFFER_H
2#define K3BUFFER_H
3#define CODE_BY "Kaloyan Krastev"
4
5#include <stdio.h>
6#include <vector>
7#include <cmath>
8#include <algorithm>
9
15struct K3List
16{
17 const char* name;
18 std::vector<float>* buffer;
19 float mini;
20 float maxi;
21 struct K3List* next;
22};
23
30{
31private:
32 struct K3List* head;
33 int buffer_size;
35 std::vector<float>* get(const char*);
36 void info(float, const char*);
37 struct K3List* emerge(const char*);
38 void reset(std::vector<float>*);
39 void dump(std::vector<float>*);
40 void setminmax(struct K3List*, float);
41 void statistique(std::vector<float>, int, float, float, float*, float*);
43public:
44 ~K3Buffer();
50 K3Buffer(int size) : head(nullptr), buffer_size(size) {}
51
52 struct K3List* node(const char*);
53 const char* overtext(const char*, float, float, float, const char*, float, float);
55 float min(std::vector<float>*);
56 float max(std::vector<float>*);
58 void reset();
59 void dump();
60 void fill(const char*, float);
61 void build(const char*, std::vector<float>*, float*, float*, float*, float*, float*, float*, float*);
62};
63
64#endif // K3BUFFER_H
65
66
class to control data containers
Definition K3Buffer.h:30
struct K3List * node(const char *)
Definition K3Buffer.cpp:46
float min(std::vector< float > *)
Definition K3Buffer.cpp:83
void dump()
Definition K3Buffer.cpp:165
void reset()
Definition K3Buffer.cpp:176
void fill(const char *, float)
Definition K3Buffer.cpp:72
float max(std::vector< float > *)
Definition K3Buffer.cpp:88
K3Buffer(int size)
public constructor
Definition K3Buffer.h:50
~K3Buffer()
Definition K3Buffer.cpp:3
void build(const char *, std::vector< float > *, float *, float *, float *, float *, float *, float *, float *)
Definition K3Buffer.cpp:126
const char * overtext(const char *, float, float, float, const char *, float, float)
Definition K3Buffer.cpp:186
a linked list of data containers
Definition K3Buffer.h:16
const char * name
Definition K3Buffer.h:17
struct K3List * next
Definition K3Buffer.h:21
float maxi
Definition K3Buffer.h:20
std::vector< float > * buffer
Definition K3Buffer.h:18
float mini
Definition K3Buffer.h:19