git-svn-id: svn://db.shs.com.ru/libs@97 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
49
cd_utils/cdutils_core.h
Normal file
49
cd_utils/cdutils_core.h
Normal file
@@ -0,0 +1,49 @@
|
||||
#ifndef CDUTILS_CORE_H
|
||||
#define CDUTILS_CORE_H
|
||||
|
||||
#include "cdutils_k_types.h"
|
||||
#include "piconnection.h"
|
||||
#include "pidatatransfer.h"
|
||||
|
||||
|
||||
namespace CDUtils {
|
||||
|
||||
class Core;
|
||||
|
||||
|
||||
class __Core_Initializer__ {
|
||||
public:
|
||||
__Core_Initializer__();
|
||||
~__Core_Initializer__();
|
||||
static int count_;
|
||||
static Core * __instance__;
|
||||
};
|
||||
|
||||
|
||||
class Core: public PIObject
|
||||
{
|
||||
PIOBJECT(CDUtils::Core)
|
||||
friend class __Core_Initializer__;
|
||||
public:
|
||||
static Core * instance() {return __Core_Initializer__::__instance__;}
|
||||
|
||||
EVENT(K_Received)
|
||||
EVENT_HANDLER(void, K_Send);
|
||||
|
||||
private:
|
||||
Core();
|
||||
EVENT_HANDLER2(void, dataReceived, const PIString &, from, const PIByteArray &, data);
|
||||
|
||||
PIConnection connection;
|
||||
|
||||
KSection k_plain;
|
||||
PIMap<int, PIMap<int, KSection> > k_sections; // [enum KSection][index] = CDUtils::KSection
|
||||
|
||||
};
|
||||
|
||||
|
||||
static __Core_Initializer__ __Core_initializer__;
|
||||
|
||||
}
|
||||
|
||||
#endif // CDUTILS_CORE_H
|
||||
Reference in New Issue
Block a user