it_bus_pdk/part_manager.h

00001 #ifndef _IT_BUS_PDK_PART_MANAGER_H_
00002 #define _IT_BUS_PDK_PART_MANAGER_H_
00003 
00004 // @Copyright 2004 IONA Technologies, Plc. All Rights Reserved.
00005 //
00006 
00007 #include <it_bus_pdk/unknown_type_exception.h>
00008 #include <it_bus/user_fault_exception.h>
00009 #include <it_bus/part_list.h>
00010 
00011 namespace IT_WSDL
00012 {
00013     class WSDLOperation;
00014 }
00015 
00016 namespace IT_Bus
00017 {
00018     class ReadableMessage;
00019     class WritableMessage;
00020     class ClientOperation;
00021     class ServerOperation;
00022     class AnyType;
00023     class Bus;
00024     class AnyTypeFactory;
00025     
00095     class IT_BUS_API PartManager
00096     {
00097       public:
00111         PartManager(
00112             AnyTypeFactory*               factory,
00113             const IT_WSDL::WSDLOperation& operation,
00114             bool                      do_unwrap = false
00115         ) throw((UnknownTypeException));
00116 
00130         PartManager(
00131             Bus&                          bus,
00132             const IT_WSDL::WSDLOperation& operation,
00133             bool                          do_unwrap = false
00134         ) throw((UnknownTypeException));
00135         
00139         virtual ~PartManager() throw(());
00140 
00141         /*
00142          * Add input parts to a readable message.
00143          *
00144          * @param A reference to the ReadableMessage to which to 
00145          * add the input parts.
00146          */
00147         void add_input_parts(
00148             ReadableMessage& message
00149         ) throw((UnknownTypeException));
00150 
00157         void add_output_parts(
00158             ReadableMessage& message
00159         ) throw((UnknownTypeException));
00160         
00161         /*
00162          * Add input parts to a writable message.
00163          *
00164          * @param A reference to the WritableMessage to which to 
00165          * add the input parts.
00166          */
00167         void add_input_parts(
00168             WritableMessage& message
00169         ) throw((UnknownTypeException));
00170 
00177         void add_output_parts(
00178             WritableMessage& message
00179         ) throw((UnknownTypeException));
00180 
00188         void add_parts(
00189             ClientOperation& operation
00190         ) throw((UnknownTypeException));
00191         
00199         void add_parts(
00200             ServerOperation& operation
00201         ) throw((UnknownTypeException));
00202 
00209         PartList& get_inputs();
00210 
00217         PartList& get_outputs();
00218 
00229         void
00230         throw_if_exception(
00231             ClientOperation& operation
00232         ) throw((UnknownTypeException, UserFaultException));
00233 
00240         const AnyTypeFactory&
00241         get_any_type_factory() const;
00242         
00243       private:
00244         void
00245         initialize();
00246 
00247         void
00248         parts_initialize();
00249         
00250         void
00251         unwrap_initialize();
00252         
00253         AnyType*
00254         find_input_part(
00255             const String& part_name
00256         ) throw((UnknownTypeException));
00257 
00258         const IT_WSDL::WSDLOperation& m_wsdl_operation;
00259         AnyTypeFactory*               m_factory;
00260         PartList                      m_inputs;
00261         PartList                      m_outputs;
00262         IT_Bus::QName                 m_input_wrapper_element_qname;
00263         IT_Bus::QName                 m_output_wrapper_element_qname;
00264         bool                          m_do_unwrap;
00265         bool                          m_is_initialized;
00266 
00267         // private and unimplemented to prevent copying
00268         PartManager(const PartManager&);
00269         void operator=(const PartManager&);
00270     };
00271 }
00272 
00273 
00274 #endif  

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