00001
00002 #ifndef IT_Bus_wscoor_xsdTypes_FACTORY_H_
00003 #define IT_Bus_wscoor_xsdTypes_FACTORY_H_
00004
00005 #if !defined(IT_WS_COORDINATION_API)
00006 #if defined(IT_WS_COORDINATION_API_EXPORT)
00007 #define IT_WS_COORDINATION_API IT_DECLSPEC_EXPORT
00008 #else
00009 #define IT_WS_COORDINATION_API IT_DECLSPEC_IMPORT
00010 #endif
00011 #endif
00012
00013
00014 #include <it_dsa/hash_map.h>
00015 #include <it_bus/qname.h>
00016 #include <it_bus/type_factory.h>
00017 #include <it_bus/any_type.h>
00018 #include <it_bus/user_fault_exception.h>
00019
00020 namespace WS_Coordination
00021 {
00022 class IT_WS_COORDINATION_API wscoor_xsdTypesFactory : public IT_Bus::TypeFactory
00023 {
00024 public:
00025 wscoor_xsdTypesFactory();
00026
00027 virtual ~wscoor_xsdTypesFactory();
00028
00029 typedef IT_Bus::AnyType * (*create_type_ptr)();
00030
00031 typedef IT_Bus::UserFaultException * (*create_exception_ptr)();
00032
00033 typedef IT_Bus::AnyType * (*create_element_ptr)();
00034
00035 IT_Bus::AnyType *
00036 create_type(
00037 const IT_Bus::QName& type_name
00038 ) const ;
00039
00040 void destroy_type(
00041 IT_Bus::AnyType * any_type
00042 ) const;
00043
00044 IT_Bus::UserFaultException *
00045 create_exception(
00046 const IT_Bus::QName& type_name
00047 ) const ;
00048
00049 void destroy_exception(
00050 IT_Bus::UserFaultException * ex_type
00051 ) const;
00052
00053 IT_Bus::AnyType *
00054 create_type_for_element(
00055 const IT_Bus::QName& element_name
00056 ) const ;
00057
00058 void destroy_element(
00059 IT_Bus::AnyType * any_type
00060 ) const;
00061
00062 static IT_Bus::AnyType *
00063 smf_create_CoordinationContextType();
00064
00065 static IT_Bus::AnyType *
00066 smf_create_CreateCoordinationContextResponseType();
00067
00068 static IT_Bus::AnyType *
00069 smf_create_RegisterType();
00070
00071 static IT_Bus::AnyType *
00072 smf_create_ErrorCodes();
00073
00074 static IT_Bus::AnyType *
00075 smf_create_CreateCoordinationContextType();
00076
00077 static IT_Bus::AnyType *
00078 smf_create_RegisterResponseType();
00079
00080 static IT_Bus::AnyType *
00081 smf_create_Expires();
00082
00083 static IT_Bus::AnyType *
00084 smf_create_CoordinationContext();
00085
00086 private:
00087 void populate_type_map();
00088
00089 void populate_ex_map();
00090
00091 void populate_element_map();
00092
00093 void populate_namespace_uri_map();
00094
00095 void insert_type_fn_ptr(const IT_Bus::QName & type_name, create_type_ptr op_ptr);
00096
00097 void insert_exception_fn_ptr(const IT_Bus::QName & ex_name, create_exception_ptr op_ptr);
00098
00099 void insert_element_type_map(const IT_Bus::QName& element_name, const IT_Bus::QName& type_name);
00100 void insert_element_fn_ptr(const IT_Bus::QName& element_name, create_element_ptr op_ptr);
00101
00102 static IT_HashMap<IT_Bus::QName, create_type_ptr, IT_Bus::QNameHash, IT_Bus::QNameEq> sm_type_map;
00103 static IT_HashMap<IT_Bus::QName, create_exception_ptr, IT_Bus::QNameHash, IT_Bus::QNameEq> sm_ex_map;
00104 static IT_HashMap<IT_Bus::QName, create_element_ptr, IT_Bus::QNameHash, IT_Bus::QNameEq> sm_element_map;
00105 static IT_Vector<IT_Bus::String> sm_uri_vector;
00106 };
00107 }
00108 #endif