1 #ifndef ISPN_HOTROD_BASICMARSHALLER_H
2 #define ISPN_HOTROD_BASICMARSHALLER_H
47 char *buf =
new char[4];
48 for (
int i = 0 ; i < 4 ; i++) {
49 buf[3-i] = (char) ((s) >> (8*i));
55 for (
int i = 0; i < 4 ; i++) {
57 result ^= (int) *(b.
getBytes()+i) & 0xFF;
59 int* s =
new int(result);
int * unmarshall(const ScopedBuffer &b)
Definition: BasicMarshaller.h:53
size_t getLength() const
Definition: ScopedBuffer.h:36
std::string * unmarshall(const ScopedBuffer &b)
Definition: BasicMarshaller.h:37
static void noRelease(ScopedBuffer *)
Definition: BasicMarshaller.h:22
static void release(ScopedBuffer *buf)
Definition: BasicMarshaller.h:23
char * getBytes() const
Definition: ScopedBuffer.h:35
Definition: ScopedBuffer.h:20
Definition: BasicMarshaller.h:17
Definition: BasicMarshaller.h:20
void set(char *b, size_t l, ReleaseFunc m=0)
Definition: ScopedBuffer.h:31
Definition: Marshaller.h:14
void marshall(const int &s, ScopedBuffer &b)
Definition: BasicMarshaller.h:46
void marshall(const std::string &s, ScopedBuffer &b)
Definition: BasicMarshaller.h:34