it_bus/any_uri.h

00001 #ifndef _IT_BUS_ANYURI_H_
00002 #define _IT_BUS_ANYURI_H_
00003 
00004 // @Copyright 2004 IONA Technologies, Plc. All Rights Reserved.
00005 //
00006 
00007 #include <it_cal/types.h>
00008 #include <it_bus/exception.h>
00009 #include <it_bus/api_defines.h>
00010 #include <it_bus/any_simple_type.h>
00011 
00012 namespace IT_Reflect
00013 {
00014     class Reflection;
00015     template <class T> class ValueRef;
00016 }
00017 
00018 namespace IT_Bus
00019 {
00020     class IT_AFC_API AnyURI : public AnySimpleType
00021     {
00022       public:
00023         typedef IT_Reflect::ValueRef<IT_Bus::AnyURI> IT_ReflectionType;
00024 
00025         AnyURI(
00026         ) throw(());
00027 
00028         AnyURI(
00029             const String& uri
00030         ) throw((IT_Bus::Exception));
00031 
00032        AnyURI(
00033             const char* uri
00034         ) throw((IT_Bus::Exception));
00035 
00036         AnyURI(
00037             const AnyURI& copy
00038         ) throw(());
00039 
00040         AnyURI&
00041         operator=(
00042             const AnyURI& rhs
00043         ) throw(());
00044 
00045         const String&
00046         get_uri(
00047         ) const throw(());
00048 
00049         void
00050         set_uri(
00051             const String& uri
00052         ) throw((IT_Bus::Exception));
00053 
00054         static bool
00055         is_valid_uri(
00056             const String& uri
00057         ) throw(());
00058 
00059         // Implementation of methods from AnyType.
00060         //
00061         virtual AnyType&
00062         copy(
00063             const AnyType& copy
00064         );
00065 
00066         virtual AnyType::Kind
00067         get_kind() const;
00068 
00069         virtual const QName&
00070         get_type() const;
00071 
00072         virtual IT_Reflect::Reflection*
00073         get_reflection(
00074         ) throw((IT_Reflect::ReflectException));
00075         
00076         virtual const IT_Reflect::Reflection*
00077         get_reflection(
00078         ) const throw((IT_Reflect::ReflectException));
00079 
00080         // Implementation of methods from AnySimpleType.
00081         //
00082         virtual void
00083         write_value(
00084             AnySimpleTypeWriter& writer
00085         ) const throw((IT_Bus::SerializationException));
00086 
00087         virtual void
00088         read_value(
00089             AnySimpleTypeReader& reader
00090         ) throw((IT_Bus::DeserializationException));
00091 
00092         // Used by SchemaTypeTraits.
00093         //
00094         static const QName&
00095         get_static_type();
00096 
00097       private:
00098 
00099         String m_uri;
00100     };
00101 
00102     inline bool
00103     operator==(
00104         const AnyURI& lhs,
00105         const AnyURI& rhs
00106     ) throw(())
00107     {
00108         return lhs.get_uri() == rhs.get_uri();
00109     }
00110 
00111     inline bool
00112     operator!=(
00113         const AnyURI& lhs,
00114         const AnyURI& rhs
00115     ) throw(())
00116     {
00117         return lhs.get_uri() != rhs.get_uri();
00118     }
00119 }
00120 
00121 #endif /*_IT_BUS_ANYURI_H_*/

Generated on Tue Mar 20 15:27:40 2007 for Artix by  doxygen 1.5.1-p1