it_bus_pdk/attribute.h

00001 #ifndef _IT_BUS_PDK_ATTRIBUTE_H_
00002 #define _IT_BUS_PDK_ATTRIBUTE_H_
00003 
00004 // @Copyright 2004 IONA Technologies, Plc. All Rights Reserved.
00005 //
00006 
00007 #include <it_bus/qname.h>
00008 
00009 namespace IT_Bus
00010 {
00011 
00012     class IT_BUS_XML_API QNameRef
00013     {
00014       public:
00015         virtual bool
00016         operator ==(
00017             const QName & rhs
00018         ) const = 0;
00019 
00020 
00021         virtual const char *
00022         get_namespace_uri() const = 0;
00023 
00024         virtual const char *
00025         get_local_part() const = 0;
00026 
00027 
00028     };
00029 
00030     class IT_BUS_XML_API XercesQNameRef : public QNameRef
00031     {
00032       public:
00033 
00034         XercesQNameRef();
00035 
00036         XercesQNameRef(
00037             const String& raw_name,
00038             char * namespace_uri
00039         );
00040 
00041         virtual ~XercesQNameRef();
00042 
00043         void
00044         assign(
00045             const String& raw_name,
00046             char * namespace_uri
00047         );
00048 
00049         void
00050         reset();
00051 
00052         virtual bool
00053         operator ==(
00054             const QName & rhs
00055         ) const;
00056 
00057         virtual bool
00058         operator ==(
00059             const XercesQNameRef & rhs
00060         ) const;
00061 
00062 
00063         const char *
00064         get_namespace_uri() const;
00065 
00066         const char *
00067         get_local_part() const;
00068 
00069 
00070       protected:
00071 
00072         size_t m_hash_code;
00073 
00074         String m_raw_name;
00075 
00076         char * m_namespace_uri;
00077 
00078         const char* m_local_part;
00079 
00080       private:
00081 
00082         void
00083         create_hash();
00084 
00085     };
00086 
00087     class IT_BUS_XML_API Attribute
00088     {
00089       public:
00090 
00091         Attribute(
00092             const String & raw_name,
00093             char * namespace_uri,
00094             const String & value
00095         );
00096 
00097         ~Attribute();
00098 
00099         bool
00100         operator == (
00101             const Attribute & rhs
00102         ) const;
00103 
00104 
00105         const QNameRef &
00106         get_name() const;
00107 
00108         const String &
00109         get_value() const;
00110 
00111         void
00112         visited();
00113 
00114         void
00115         unvisit();
00116 
00117         bool
00118         is_visited() const;
00119 
00120       protected:
00121 
00122         XercesQNameRef m_name;
00123 
00124         String m_value;
00125 
00126         bool m_visited;
00127 
00128     };
00129 }
00130 
00131 #endif  

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