LAPTOP-SNT8I5JK\Boounion
2025-02-18 5efff0895ad06eb0c5f04df7efe67a22b358beb3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma once
#include "CBonder.h"
#include "Configuration.h"
#include "CPanel.h"
#include "GB2860SQLite.h"
 
 
class CModel
{
public:
    CModel();
    ~CModel();
 
public:
    IObservable* getObservable();
    void setWorkDir(const char* pszWorkDir);
    int init();
    int term();
    void onTimer(UINT nTimerid);
    CBonder& getBonder();
    BEQ::IEquipment* getEquipment();
 
public:
    int notify(int code);
    int notifyPtr(int code, void* ptr = NULL);
    int notifyObj(int code, IRxObject* pObj);
    int notifyObjAndPtr(int code, IRxObject* pObj, void* ptr);
    int notifyObjAndInt(int code, IRxObject* pObj1, IRxObject* pObj2, int exCode);
    int notifyInt(int code, int exCode);
    int notifyInt2(int code, int exCode, int exCode2);
    int notifyDouble(int code, double dValue);
    int notifyText(int code, const char* pszText);
    int notifyPtrAndInt(int code, void* ptr1, void* ptr2, int exCode);
    int notifyTextAndInt(int code, const char* pszText, int exCode);
    int notifyMesMsg(int code, int stream, int function, const char* pszText);
 
private:
    int savePanel(CPanel* pPanel, CComponent* pComponent);
 
public:
    CConfiguration m_configuration;
 
 
private:
    IObservable* m_pObservable;
    IObservableEmitter* m_pObservableEmitter;
    CString m_strWorkDir;
    CString m_strDataDir;
 
private:
    CBonder m_bonder;
    BEQ::IEquipment* m_pEquipment;
    int m_nTimerID;
    CGB2860SQLite m_sqlite;
};