-
Notifications
You must be signed in to change notification settings - Fork 2
/
LightNdr.h
49 lines (39 loc) · 1.3 KB
/
LightNdr.h
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
#ifndef __UBQNDR_H
#define __UBQNDR_H
class UbqNdr
{
private:
void ensureSpace(UbqUlong len);
protected:
UbqBool incoming;
char UBQ_HUGE* buf;
UbqUlong size;
char UBQ_HUGE* position;
public:
UbqNdr();
UbqNdr(UbqUlong len, const char UBQ_HUGE* data);
virtual ~UbqNdr();
// state query methods
UbqBool hasSpace(UbqUlong len);
UbqBool isOk() const;
UbqBool isIncoming() const;
UbqUlong getLength() const;
UbqUlong getSize() const;
const char UBQ_HUGE* getData() const;
const char UBQ_HUGE* atOffset(UbqUlong offset) const;
void dump(char v);
void dump(UbqUchar v);
void dump(UbqUshort v, UbqBool doTranslate = UBQ_TRUE);
void dump(UbqUlong v, UbqBool doTranslate = UBQ_TRUE);
void dump(UbqBool v);
// void dump(const CString& v);
void dump(UbqUlong len, const char UBQ_HUGE* v);
UbqBool load(char& v);
UbqBool load(UbqUchar& v);
UbqBool load(UbqUshort& v, UbqBool doTranslate = UBQ_TRUE);
UbqBool load(UbqUlong& v, UbqBool doTranslate = UBQ_TRUE);
UbqBool load(UbqBool& v);
UbqBool load(CString& v);
UbqBool load(UbqUlong len, char UBQ_HUGE* v);
};
#endif /* __UBQNDR_H */