git-svn-id: svn://db.shs.com.ru/libs@378 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
66
cd_utils/cdutils_interface.h
Normal file
66
cd_utils/cdutils_interface.h
Normal file
@@ -0,0 +1,66 @@
|
||||
#ifndef CDUTILS_INTERFACE_H
|
||||
#define CDUTILS_INTERFACE_H
|
||||
|
||||
#include "cdutils_types.h"
|
||||
#include "piobject.h"
|
||||
|
||||
|
||||
namespace CDUtils {
|
||||
|
||||
class CDCore;
|
||||
|
||||
|
||||
class Interface: public PIObject
|
||||
{
|
||||
PIOBJECT(CDUtils::Interface)
|
||||
public:
|
||||
Interface(CDType::cdT type_);
|
||||
|
||||
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 file_;}
|
||||
int fileSize() const {return file_size;}
|
||||
|
||||
void setFileName(const PIString & _file);
|
||||
bool configure(const PIString & config);
|
||||
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();
|
||||
|
||||
protected:
|
||||
CDCore * core;
|
||||
CDSection * s;
|
||||
CDType::cdT type;
|
||||
PIString file_;
|
||||
int file_size;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif // CDUTILS_K_H
|
||||
Reference in New Issue
Block a user