ProtocolData.hpp

00001 /*
00002  *  This program is free software; you can redistribute it and/or modify
00003  *  it under the terms of the GNU General Public License as published by
00004  *  the Free Software Foundation; either version 2 of the License, or
00005  *  (at your option) any later version.
00006  *
00007  *  This program is distributed in the hope that it will be useful,
00008  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00009  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010  *  GNU General Public License for more details.
00011  *
00012  *  You should have received a copy of the GNU General Public License
00013  *  along with this program; if not, write to the Free Software
00014  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00015  *
00016  * (c)Copyright 2006 Hewlett-Packard Development Company, LP.
00017  *
00018  */
00019 
00020 #ifndef _PROTOCOLDATA_H
00021 #define _PROTOCOLDATA_H
00022 
00023 #include "iostream_t.hpp"
00024 #include "ProtocolDataType.hpp"
00025 
00026 extern const char* type_type_table [] ;
00027 
00028 T_TypeType typeFromString (char *P_type);
00029 T_ValueData valueFromString (char *P_value, T_TypeType P_type, int &P_result);
00030 const char* defaultStringValue(T_TypeType P_type);
00031 void resetMemory(T_ValueData &P_value);
00032 
00033 void resetValue(T_Value& P_value);
00034 
00035 void copyValue(T_ValueData& P_dest, T_ValueData& P_Source, bool P_reset);
00036 bool copyBinaryVal(T_ValueData& P_dest, int  P_begin, int P_size,
00037                    T_ValueData& P_source);
00038 bool copyBinaryVal(T_Value& P_dest, int P_begin, int P_size,
00039                    T_Value& P_source);
00040 
00041 bool extractBinaryVal(T_ValueData& P_dest, int  P_begin, int P_size,
00042                       T_ValueData& P_source);
00043 bool extractBinaryVal(T_Value& P_dest, int  P_begin, int P_size,
00044                       T_Value& P_source);
00045 
00046 bool compare_value(T_Value& P_left, 
00047                    T_Value& P_rigth);
00048 
00049 char* create_string(T_ValueData& P_src);
00050 
00051 
00052 bool operator< (const T_ValueData&, 
00053                 const T_ValueData&);
00054 
00055 bool operator== (const T_ValueData&, 
00056                 const T_ValueData&);
00057 
00058 
00059 
00060 iostream_output& operator<< (iostream_output& P_ostream, 
00061                              T_TypeType& P_value);
00062 
00063 iostream_output& operator<< (iostream_output& P_ostream, 
00064                              T_ValueData&     P_valueData);
00065 
00066 
00067 void valueToString (T_ValueData& P_value, char *P_result, size_t &P_size);
00068 
00069 typedef struct _internal_value_data : public T_ValueData {
00070   struct _internal_value_data* m_next_instance ;
00071   struct _internal_value_data* m_next ;
00072   struct _internal_value_data* m_header ;
00073 } T_InternalValueData, *T_pInternalValueData ;
00074 
00075 
00076 #endif  // _PROTOCOLDATA_H
00077 
00078 
00079 
00080 
00081 
00082 
00083 
00084 
00085 
00086 

Generated on Wed Mar 7 14:57:54 2007 for Seagull by  doxygen 1.4.6