chenluhua1980
2026-01-10 9198ac12e4e2ff64a2cf65c32d576f02d54c346a
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#pragma once
 
enum SITYPE
{
    L = 000,
    B = 010,
    Bool = 011,
    A = 020,
    J = 021,
    SLASH = 022,
    I8 = 030,
    I1 = 031,
    I2 = 032,
    I4 = 034,
    F8 = 040,
    F4 = 044,
    U8 = 050,
    U1 = 051,
    U2 = 052,
    U4 = 054
};
 
class ISECS2Item
{
public:
    virtual SITYPE getType() = 0;
    virtual const char* toString() = 0;
    virtual bool getString(const char*& pszText) = 0;
    virtual bool getBinary(const char*& pszData, unsigned int& len) = 0;
    virtual bool getBool(bool& boolValue) = 0;
    virtual bool getI8(long long& value) = 0;
    virtual bool getI4(int& value) = 0;
    virtual bool getI2(short& value) = 0;
    virtual bool getI1(char& value) = 0;
    virtual bool getF8(double& value) = 0;
    virtual bool getF4(float& value) = 0;
    virtual bool getU8(unsigned long long& value) = 0;
    virtual bool getU4(unsigned int& value) = 0;
    virtual bool getU2(unsigned short& value) = 0;
    virtual bool getU1(unsigned char& value) = 0;
    virtual int getSubItemSize() = 0;
    virtual ISECS2Item* getSubItem(int index) = 0;
    virtual bool getSubItemString(int index, const char*& pszText) = 0;
    virtual bool getSubItemBinary(int index, const char*& pszData, unsigned int& len) = 0;
    virtual bool getSubItemBool(int index, bool& boolValue) = 0;
    virtual bool getSubItemI8(int index, long long& value) = 0;
    virtual bool getSubItemI4(int index, int& value) = 0;
    virtual bool getSubItemI2(int index, short& value) = 0;
    virtual bool getSubItemI1(int index, char& value) = 0;
    virtual bool getSubItemF8(int index, double& value) = 0;
    virtual bool getSubItemF4(int index, float& value) = 0;
    virtual bool getSubItemU8(int index, unsigned long long& value) = 0;
    virtual bool getSubItemU4(int index, unsigned int& value) = 0;
    virtual bool getSubItemU2(int index, unsigned short& value) = 0;
    virtual bool getSubItemU1(int index, unsigned char& value) = 0;
    virtual void reset() = 0;
    virtual ISECS2Item* addItem(const char* pszText, const char* pszNote) = 0;
    virtual ISECS2Item* addBinaryItem(const char* pszData, unsigned int len, const char* pszNote) = 0;
    virtual ISECS2Item* addBoolItem(bool boolValue, const char* pszNote) = 0;
    virtual ISECS2Item* addI8Item(long long value, const char* pszNote) = 0;
    virtual ISECS2Item* addI4Item(int value, const char* pszNote) = 0;
    virtual ISECS2Item* addI2Item(short value, const char* pszNote) = 0;
    virtual ISECS2Item* addI1Item(char value, const char* pszNote) = 0;
    virtual ISECS2Item* addF8Item(double value, const char* pszNote) = 0;
    virtual ISECS2Item* addF4Item(float value, const char* pszNote) = 0;
    virtual ISECS2Item* addU8Item(unsigned long long value, const char* pszNote) = 0;
    virtual ISECS2Item* addU4Item(unsigned int value, const char* pszNote) = 0;
    virtual ISECS2Item* addU2Item(unsigned short value, const char* pszNote) = 0;
    virtual ISECS2Item* addU1Item(unsigned char value, const char* pszNote) = 0;
    virtual void setBinary(const char* pszData, unsigned int len, const char* pszNote) = 0;
    virtual void setString(const char* pszText, const char* pszNote) = 0;
    virtual void setU1(unsigned char value, const char* pszNote) = 0;
    virtual void setBool(bool value, const char* pszNote) = 0;
    virtual ISECS2Item* addItem() = 0;
};