This repository has been archived on 2020-09-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
libs/cd_utils/cdutils_k.h

57 lines
1.0 KiB
C++

#ifndef CDUTILS_K_H
#define CDUTILS_K_H
#include "cdutils_k_types.h"
#include "piobject.h"
namespace CDUtils {
class Core;
class KInterface: public PIObject
{
PIOBJECT(CDUtils::KInterface)
public:
KInterface();
bool test(int v);
KType & operator [](int v);
const KType operator [](int v) const;
KSection & section(int v);
const KSection section(int v) const;
const KSection & 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:
Core * core;
PIString k_file;
int k_file_size;
};
static KInterface K;
}
#endif // CDUTILS_K_H