it_bus/binary_type.h

00001 #ifndef _IT_BUS_BINARY_TYPE_H_
00002 #define _IT_BUS_BINARY_TYPE_H_
00003 
00004 // @Copyright 2004 IONA Technologies, Plc. All Rights Reserved.
00005 //
00006 
00007 #include <it_bus/api_defines.h>
00008 #include <it_bus/binary_buffer.h>
00009 #include <it_bus/qname.h>
00010 
00011 namespace IT_Bus
00012 {
00013     class IT_AFC_API BinaryInParam
00014     {
00015       public:
00016         virtual ~BinaryInParam(); 
00017 
00018         virtual const QName &
00019         get_type() const = 0;
00020 
00021         virtual const BinaryBuffer &
00022         get_buffer() const = 0;
00023 
00024       protected:
00025         BinaryInParam() {}
00026     };
00027 
00028     class IT_AFC_API BinaryOutParam
00029     {
00030       public:
00031         virtual ~BinaryOutParam(); 
00032 
00033         virtual const QName &
00034         get_type() const = 0;
00035 
00036         virtual BinaryBuffer &
00037         get_buffer() = 0;
00038 
00039         virtual const BinaryBuffer &
00040         get_buffer() const = 0;
00041 
00042       protected:
00043         BinaryOutParam() {}
00044     };
00045     
00046 
00047     class IT_AFC_API HexBinaryInParam : public BinaryInParam
00048     {
00049       public:
00050 
00051         HexBinaryInParam(
00052             const BinaryBuffer & buffer
00053         );
00054 
00055         virtual ~HexBinaryInParam(); 
00056 
00057         virtual const QName &
00058         get_type() const;
00059 
00060         virtual const BinaryBuffer &
00061         get_buffer() const;
00062 
00063       private:
00064 
00065         const BinaryBuffer & m_buffer;
00066     };
00067 
00068     class IT_AFC_API HexBinaryOutParam : public BinaryOutParam
00069     {
00070       public:
00071 
00072         HexBinaryOutParam(
00073             BinaryBuffer & buffer
00074         );
00075 
00076         virtual ~HexBinaryOutParam(); 
00077 
00078         virtual const QName &
00079         get_type() const;
00080 
00081         virtual BinaryBuffer &
00082         get_buffer();
00083 
00084         virtual const BinaryBuffer &
00085         get_buffer() const;
00086 
00087       private:
00088 
00089         BinaryBuffer & m_buffer;
00090     };
00091 
00092 
00093     class IT_AFC_API Base64BinaryInParam : public BinaryInParam
00094     {
00095       public:
00096 
00097         Base64BinaryInParam(
00098             const BinaryBuffer & buffer
00099         );
00100 
00101         virtual ~Base64BinaryInParam(); 
00102 
00103         virtual const QName &
00104         get_type() const;
00105 
00106         virtual const BinaryBuffer &
00107         get_buffer() const;
00108 
00109       private:
00110 
00111         const BinaryBuffer & m_buffer;
00112     };
00113 
00114     class IT_AFC_API Base64BinaryOutParam : public BinaryOutParam
00115     {
00116       public:
00117 
00118         Base64BinaryOutParam(
00119             BinaryBuffer & buffer
00120         );
00121 
00122         virtual ~Base64BinaryOutParam(); 
00123 
00124         virtual const QName &
00125         get_type() const;
00126 
00127         virtual BinaryBuffer &
00128         get_buffer();
00129 
00130         virtual const BinaryBuffer &
00131         get_buffer() const;
00132 
00133       private:
00134 
00135         BinaryBuffer & m_buffer;
00136     };
00137 
00142     class IT_AFC_API HexBinary : public BinaryInParam, public BinaryOutParam, public BinaryBuffer
00143     {
00144       public:
00148         HexBinary();
00149 
00154         HexBinary(
00155             const BinaryBuffer& value
00156         );
00157 
00162         HexBinary(
00163             const String& value
00164         );
00165 
00173         HexBinary(
00174             const char* value,
00175             long size = -1
00176         );
00177 
00183         virtual const QName &
00184         get_type() const;
00185 
00191         virtual const BinaryBuffer &
00192         get_buffer() const;
00193 
00199         virtual BinaryBuffer &
00200         get_buffer();
00201     };
00202 
00207     class IT_AFC_API Base64Binary : public BinaryInParam, public BinaryOutParam, public BinaryBuffer
00208     {
00209       public:
00213         Base64Binary();
00214 
00219         Base64Binary(
00220             const BinaryBuffer& value
00221         );
00222 
00227         Base64Binary(
00228             const String& value
00229         );
00230 
00238         Base64Binary(
00239             const char* value,
00240             long size = -1
00241         );
00242 
00248         virtual const QName &
00249         get_type() const;
00250 
00256         virtual const BinaryBuffer &
00257         get_buffer() const;
00258 
00264         virtual BinaryBuffer &
00265         get_buffer();
00266     };
00267 
00268 }
00269 
00270 #endif  

Generated on Thu Sep 7 11:38:51 2006 for Artix by  doxygen 1.4.7