git-svn-id: svn://db.shs.com.ru/libs@378 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -1,38 +1,18 @@
|
||||
#ifndef CDUTILS_K_H
|
||||
#define CDUTILS_K_H
|
||||
|
||||
#include "cdutils_types.h"
|
||||
#include "piobject.h"
|
||||
#include "cdutils_interface.h"
|
||||
|
||||
|
||||
namespace CDUtils {
|
||||
|
||||
class CDCore;
|
||||
|
||||
|
||||
class KInterface: public PIObject
|
||||
class KInterface: public Interface
|
||||
{
|
||||
PIOBJECT(CDUtils::KInterface)
|
||||
public:
|
||||
KInterface();
|
||||
|
||||
bool test(int v);
|
||||
CDType & operator [](int v);
|
||||
const CDType operator [](int v) const;
|
||||
CDType & operator [](const PIString & name_);
|
||||
const CDType operator [](const PIString & name_) const;
|
||||
CDType & operator [](const PIDeque<int> & path_);
|
||||
const CDType operator [](const PIDeque<int> & path_) const;
|
||||
CDSection & section(int v);
|
||||
const CDSection section(int v) const;
|
||||
CDSection & section(const PIDeque<int> & path);
|
||||
CDSection & root();
|
||||
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(sendFailed)
|
||||
EVENT(received)
|
||||
@@ -40,31 +20,11 @@ public:
|
||||
EVENT1(keepNamesRequest, bool*, kn)
|
||||
EVENT_HANDLER(void, send);
|
||||
EVENT_HANDLER(void, request);
|
||||
void setFileName(const PIString & file) {k_file = file;}
|
||||
bool configure(const PIString & config, const PIString & sect = PIStringAscii("k"));
|
||||
void reinitConnection(const PIString & configuration);
|
||||
void startPing();
|
||||
void write(PIIODevice * d);
|
||||
void read(PIIODevice * d);
|
||||
void parse(PIIODevice * d);
|
||||
void update(PIIODevice * d, UpdateModeFlags mode = SaveByName);
|
||||
void calculate();
|
||||
|
||||
PIString appConfig();
|
||||
PIString pultConfig();
|
||||
|
||||
void readFile();
|
||||
void writeFile();
|
||||
bool inProgress();
|
||||
|
||||
private:
|
||||
CDCore * core;
|
||||
PIString k_file;
|
||||
int k_file_size;
|
||||
void directChange(const CDType & k, double v);
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
extern CDUtils::KInterface K;
|
||||
|
||||
Reference in New Issue
Block a user