28 #ifndef GOB_VARIABLES_H 29 #define GOB_VARIABLES_H 44 uint32 getSize()
const;
46 void writeVar8(uint32 var, uint8 value);
47 void writeVar16(uint32 var, uint16 value);
48 void writeVar32(uint32 var, uint32 value);
50 void writeVarString(uint32 var,
const char *value);
52 void writeOff8(uint32 offset, uint8 value);
53 void writeOff16(uint32 offset, uint16 value);
54 void writeOff32(uint32 offset, uint32 value);
56 void writeOffString(uint32 offset,
const char *value);
58 uint8 readVar8(uint32 var)
const;
59 uint16 readVar16(uint32 var)
const;
60 uint32 readVar32(uint32 var)
const;
62 void readVarString(uint32 var,
char *value, uint32 length);
64 uint8 readOff8(uint32 offset)
const;
65 uint16 readOff16(uint32 offset)
const;
66 uint32 readOff32(uint32 offset)
const;
68 void readOffString(uint32 offset,
char *value, uint32 length);
71 const uint8 *getAddressVar8(uint32 var)
const;
72 uint8 *getAddressVar8(uint32 var);
74 const char *getAddressVarString(uint32 var)
const;
75 char *getAddressVarString(uint32 var);
77 const uint8 *getAddressOff8(uint32 offset)
const;
78 uint8 *getAddressOff8(uint32 offset);
80 const char *getAddressOffString(uint32 offset)
const;
81 char *getAddressOffString(uint32 offset);
84 bool copyTo(uint32 offset, byte *variables, uint32 n)
const;
85 bool copyFrom(uint32 offset,
const byte *variables, uint32 n);
88 virtual void write8(byte *buf, uint8 data)
const = 0;
89 virtual void write16(byte *buf, uint16 data)
const = 0;
90 virtual void write32(byte *buf, uint32 data)
const = 0;
92 virtual uint8 read8(
const byte *buf)
const = 0;
93 virtual uint16 read16(
const byte *buf)
const = 0;
94 virtual uint32 read32(
const byte *buf)
const = 0;
109 void write8(byte *buf, uint8 data)
const override;
110 void write16(byte *buf, uint16 data)
const override;
111 void write32(byte *buf, uint32 data)
const override;
113 uint8 read8(
const byte *buf)
const override;
114 uint16 read16(
const byte *buf)
const override;
115 uint32 read32(
const byte *buf)
const override;
124 void write8(byte *buf, uint8 data)
const override;
125 void write16(byte *buf, uint16 data)
const override;
126 void write32(byte *buf, uint32 data)
const override;
128 uint8 read8(
const byte *buf)
const override;
129 uint16 read16(
const byte *buf)
const override;
130 uint32 read32(
const byte *buf)
const override;
137 Variables::Type type = Variables::kVariableType32);
140 void set(
Variables &vars, uint32 offset, Variables::Type type = Variables::kVariableType32);
150 Variables::Type _type;
158 void pushData(
const Variables &vars, uint32 offset, uint32 size);
159 void pushInt(uint32 value);
161 void pop(
Variables &vars, uint32 offset);
172 #endif // GOB_VARIABLES_H Definition: variables.h:33
Definition: variables.h:118
Definition: variables.h:103
Definition: variables.h:153
Definition: variables.h:133