00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __DATACONVERSION_H_
00028 #define __DATACONVERSION_H_
00029
00030 #ifndef WINDOWS
00031
00032 #include "RioUnix.h"
00033 #endif
00034
00035 const int MAX_LONG_STRING_SIZE = 12;
00036 const int MAX_ULONG_STRING_SIZE = 12;
00037 const int MAX_SHORT_STRING_SIZE = 7;
00038 const int MAX_USHORT_STRING_SIZE = 7;
00039 const int MAX_DOUBLE_STRING_SIZE = 14;
00040
00041 bool GetULong(const char* buffer, const int size, unsigned int* value, int* offset);
00042 bool GetLong(const char* buffer, const int size, int* value, int* offset);
00043 bool GetUShort(const char* buffer, const int size, unsigned short* value, int* offset);
00044 bool GetShort(const char* buffer, const int size, short* value, int* offset);
00045 bool GetDouble(const char* buffer, const int size, double* value, int* offset);
00046 bool GetString(const char* buffer, const int size, char** value, int* offset);
00047 void SetULong(char* buffer, const unsigned int value, int* offset);
00048 void SetLong(char* buffer, const int value, int* offset);
00049 void SetUShort(char* buffer, const unsigned short value, int* offset);
00050 void SetShort(char* buffer, const short value, int* offset);
00051 void SetDouble(char* buffer, const double value, int* offset);
00052 void SetString(char* buffer, const char* str, int* offset);
00053
00054 #endif // __DATACONVERSION_H_