57 lines
1.1 KiB
C++
57 lines
1.1 KiB
C++
#ifndef CDUTILS_K_H
|
|
#define CDUTILS_K_H
|
|
|
|
#include "cdutils_types.h"
|
|
#include "piobject.h"
|
|
|
|
|
|
namespace CDUtils {
|
|
|
|
class CDCore;
|
|
|
|
|
|
class KInterface: public PIObject
|
|
{
|
|
PIOBJECT(CDUtils::KInterface)
|
|
public:
|
|
KInterface();
|
|
|
|
bool test(int v);
|
|
CDType & operator [](int v);
|
|
const CDType operator [](int v) const;
|
|
CDSection & section(int v);
|
|
const CDSection section(int v) const;
|
|
const CDSection & root() const;
|
|
|
|
int count(bool recursive = true) const;
|
|
const PIString file() const {return k_file;}
|
|
int fileSize() const {return k_file_size;}
|
|
|
|
EVENT(sended)
|
|
EVENT(received)
|
|
EVENT1(keepNamesRequest, bool*, kn)
|
|
EVENT_HANDLER(void, send);
|
|
EVENT_HANDLER(void, request);
|
|
bool configure(const PIString & config, const PIString & sect = PIStringAscii("k"));
|
|
void write(PIIODevice * d);
|
|
void read(PIIODevice * d);
|
|
void parse(PIIODevice * d);
|
|
void update(PIIODevice * d);
|
|
|
|
void readFile();
|
|
void writeFile();
|
|
|
|
private:
|
|
CDCore * core;
|
|
PIString k_file;
|
|
int k_file_size;
|
|
|
|
};
|
|
|
|
|
|
static KInterface K;
|
|
|
|
}
|
|
|
|
#endif // CDUTILS_K_H
|