diff options
author | Abdullah Sowayan <sowayan@users.noreply.github.com> | 2007-08-27 13:22:40 +0000 |
---|---|---|
committer | Abdullah Sowayan <sowayan@users.noreply.github.com> | 2007-08-27 13:22:40 +0000 |
commit | 4895ccf76775e03b835581702a5e09cc629b6742 (patch) | |
tree | 222a60afaba23efa14fb8a4b8c253477c58a8a81 /CIAO | |
parent | 87917bd47550d7c7d80f19ac84314bcf2e94f5e3 (diff) | |
download | ATCD-4895ccf76775e03b835581702a5e09cc629b6742.tar.gz |
Mon Aug 27 13:21:14 UTC 2007 Abdullah Sowayan <abdullah.sowayan@lmco.com>
Diffstat (limited to 'CIAO')
26 files changed, 684 insertions, 656 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index 87e9fda4179..83bfdfafcf1 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,32 @@ +Mon Aug 27 13:21:14 UTC 2007 Abdullah Sowayan <abdullah.sowayan@lmco.com> + + * tools/Config_Handlers/ADD_Handler.cpp: + * tools/Config_Handlers/Any_Handler.h: + * tools/Config_Handlers/CCD_Handler.cpp: + * tools/Config_Handlers/CEPE_Handler.h: + * tools/Config_Handlers/CPD_Handler.h: + * tools/Config_Handlers/DP_PCD_Handler.h: + * tools/Config_Handlers/DP_PCD_Handler.cpp: + * tools/Config_Handlers/ERE_Handler.h: + * tools/Config_Handlers/IDD_Handler.cpp: + * tools/Config_Handlers/Package_Handlers/CAD_Handler.cpp: + * tools/Config_Handlers/Package_Handlers/CID_Handler.cpp: + * tools/Config_Handlers/Package_Handlers/CPD_Handler.h: + * tools/Config_Handlers/Package_Handlers/CPD_Handler.cpp: + * tools/Config_Handlers/Package_Handlers/Comp_Intf_Descr_Handler.cpp: + * tools/Config_Handlers/Package_Handlers/IAD_Handler.cpp: + * tools/Config_Handlers/Package_Handlers/PCD_Handler.cpp: + * tools/Config_Handlers/Package_Handlers/SID_Handler.h: + * tools/Config_Handlers/Property_Handler.h: + * tools/Config_Handlers/RT-CCM/TPL_Handler.h: + * tools/Config_Handlers/Req_Handler.h: + * tools/Config_Handlers/Req_Handler.cpp: + * tools/Config_Handlers/STD_CID_Handler.cpp: + * tools/Config_Handlers/SatisfierProperty_Handler.h: + * tools/Config_Handlers/Utils/XML_Helper.h: + * tools/Config_Handlers/XSCRT/Traversal.hpp: + Untabify. + Fri Aug 24 14:23:06 UTC 2007 Abdullah Sowayan <abdullah.sowayan@lmco.com> * examples/BasicSP/EC/controller.cpp: diff --git a/CIAO/tools/Config_Handlers/ADD_Handler.cpp b/CIAO/tools/Config_Handlers/ADD_Handler.cpp index cc1fe6fc020..095fcb21dee 100644 --- a/CIAO/tools/Config_Handlers/ADD_Handler.cpp +++ b/CIAO/tools/Config_Handlers/ADD_Handler.cpp @@ -85,7 +85,7 @@ namespace CIAO ++adcb) { Property_Handler::handle_property ((*adcb), - dest.execParameter[len++]); + dest.execParameter[len++]); } if (src.id_p ()) diff --git a/CIAO/tools/Config_Handlers/Any_Handler.h b/CIAO/tools/Config_Handlers/Any_Handler.h index fcd594375ee..8e176a7ed35 100644 --- a/CIAO/tools/Config_Handlers/Any_Handler.h +++ b/CIAO/tools/Config_Handlers/Any_Handler.h @@ -30,31 +30,31 @@ TAO_END_VERSIONED_NAMESPACE_DECL namespace CIAO { namespace Config_Handlers + { + class Any; + + /* + * @class Any_Handler + * + * @brief Handler class for <ComponentInterfaceDescription> types. + * + * This class defines handler methods to map values from + * XSC Any objects, parsed from the descriptor files, to the + * corresponding CORBA IDL Any type. + * + */ + class Config_Handlers_Common_Export Any_Handler { - class Any; - - /* - * @class Any_Handler - * - * @brief Handler class for <ComponentInterfaceDescription> types. - * - * This class defines handler methods to map values from - * XSC Any objects, parsed from the descriptor files, to the - * corresponding CORBA IDL Any type. - * - */ - class Config_Handlers_Common_Export Any_Handler - { - public: - Any_Handler (void); - virtual ~Any_Handler (void); - - static void extract_into_any (const Any& desc, - ::CORBA::Any& toconfig); - - static Any get_any (const CORBA::Any &src); - }; - } + public: + Any_Handler (void); + virtual ~Any_Handler (void); + + static void extract_into_any (const Any& desc, + ::CORBA::Any& toconfig); + + static Any get_any (const CORBA::Any &src); + }; + } } #include /**/ "ace/post.h" diff --git a/CIAO/tools/Config_Handlers/CCD_Handler.cpp b/CIAO/tools/Config_Handlers/CCD_Handler.cpp index 8256f089f68..ac878c0c671 100644 --- a/CIAO/tools/Config_Handlers/CCD_Handler.cpp +++ b/CIAO/tools/Config_Handlers/CCD_Handler.cpp @@ -71,7 +71,7 @@ namespace CIAO ++pstart) { Property_Handler::handle_property (*pstart, - toconfig.configProperty [pos++]); + toconfig.configProperty [pos++]); } pos = 0; @@ -105,7 +105,7 @@ namespace CIAO infoProp++) { Property_Handler::handle_property (*infoProp, - toconfig.infoProperty[pos]); + toconfig.infoProperty[pos]); } } diff --git a/CIAO/tools/Config_Handlers/CEPE_Handler.h b/CIAO/tools/Config_Handlers/CEPE_Handler.h index 6a7f003fcd6..faa02a58737 100644 --- a/CIAO/tools/Config_Handlers/CEPE_Handler.h +++ b/CIAO/tools/Config_Handlers/CEPE_Handler.h @@ -28,39 +28,43 @@ namespace Deployment namespace CIAO { namespace Config_Handlers - { - class PlanConnectionDescription; - class ComponentExternalPortEndpoint; + { + class PlanConnectionDescription; + class ComponentExternalPortEndpoint; - /* - * @class CEPE_Handler - * - * @brief Handler class for <ComponentExternalPortEndpoint> types. - * - * This class defines handler methods to map values from - * XSC ComponentExternalPortEndpoint objects, parsed from - * the descriptor files, to the corresponding CORBA IDL type. - * - */ + /* + * @class CEPE_Handler + * + * @brief Handler class for <ComponentExternalPortEndpoint> types. + * + * This class defines handler methods to map values from + * XSC ComponentExternalPortEndpoint objects, parsed from + * the descriptor files, to the corresponding CORBA IDL type. + * + */ - class Config_Handlers_Common_Export CEPE_Handler - { - public: - static void external_port_endpoints (const PlanConnectionDescription &src, - ::Deployment::ComponentExternalPortEndpoints &dest); + class Config_Handlers_Common_Export CEPE_Handler + { + public: + static void external_port_endpoints ( + const PlanConnectionDescription &src, + ::Deployment::ComponentExternalPortEndpoints &dest); - static ComponentExternalPortEndpoint - external_port_endpoint (const ::Deployment::ComponentExternalPortEndpoint &src); + static ComponentExternalPortEndpoint + external_port_endpoint ( + const ::Deployment::ComponentExternalPortEndpoint &src); - static void handle_external_port_endpoint (const ComponentExternalPortEndpoint &src, - ::Deployment::ComponentExternalPortEndpoint &dest); - }; + static void handle_external_port_endpoint ( + const ComponentExternalPortEndpoint &src, + ::Deployment::ComponentExternalPortEndpoint &dest); + }; - typedef Sequence_Handler < ComponentExternalPortEndpoint, - ::Deployment::ComponentExternalPortEndpoints, - ::Deployment::ComponentExternalPortEndpoint, - CEPE_Handler::handle_external_port_endpoint > CEPE_Functor; - } + typedef Sequence_Handler < ComponentExternalPortEndpoint, + ::Deployment::ComponentExternalPortEndpoints, + ::Deployment::ComponentExternalPortEndpoint, + CEPE_Handler::handle_external_port_endpoint > + CEPE_Functor; + } } #include /**/ "ace/post.h" diff --git a/CIAO/tools/Config_Handlers/CPD_Handler.h b/CIAO/tools/Config_Handlers/CPD_Handler.h index 16e78f661f2..0bd645eb07d 100644 --- a/CIAO/tools/Config_Handlers/CPD_Handler.h +++ b/CIAO/tools/Config_Handlers/CPD_Handler.h @@ -29,39 +29,39 @@ namespace Deployment namespace CIAO { namespace Config_Handlers - { - class ComponentPortDescription; - /* - * @class CPD_Handler - * - * @brief Handler class for <CCMComponentPortDescription> types. - * - * This class defines handler methods to map values from - * XSC objects, parsed from the descriptor files, to the - * corresponding CORBA IDL type for the schema element. - * - */ - - class Config_Handlers_Common_Export CPD_Handler - { + { + class ComponentPortDescription; + /* + * @class CPD_Handler + * + * @brief Handler class for <CCMComponentPortDescription> types. + * + * This class defines handler methods to map values from + * XSC objects, parsed from the descriptor files, to the + * corresponding CORBA IDL type for the schema element. + */ - public: - /// Maps the values from the XSC object - /// <ComponentInterfaceDescription> to the CORBA IDL type - /// <Deployment::ComponentInterfaceDescription>. - static void handle_component_port_description (const ComponentPortDescription &desc, - ::Deployment::ComponentPortDescription &toconfig); - - static ComponentPortDescription - component_port_description (const Deployment::ComponentPortDescription& src); - }; + class Config_Handlers_Common_Export CPD_Handler + { + public: + /// Maps the values from the XSC object + /// <ComponentInterfaceDescription> to the CORBA IDL type + /// <Deployment::ComponentInterfaceDescription>. + static void handle_component_port_description ( + const ComponentPortDescription &desc, + ::Deployment::ComponentPortDescription &toconfig); - typedef Sequence_Handler < ComponentPortDescription, - ::Deployment::ComponentPortDescriptions, - ::Deployment::ComponentPortDescription, - CPD_Handler::handle_component_port_description > CPD_Functor; + static ComponentPortDescription + component_port_description ( + const Deployment::ComponentPortDescription& src); + }; - } + typedef Sequence_Handler < ComponentPortDescription, + ::Deployment::ComponentPortDescriptions, + ::Deployment::ComponentPortDescription, + CPD_Handler::handle_component_port_description > + CPD_Functor; + } } #include /**/ "ace/post.h" diff --git a/CIAO/tools/Config_Handlers/DP_PCD_Handler.cpp b/CIAO/tools/Config_Handlers/DP_PCD_Handler.cpp index 2be43fb3b5b..ea36b5037f5 100644 --- a/CIAO/tools/Config_Handlers/DP_PCD_Handler.cpp +++ b/CIAO/tools/Config_Handlers/DP_PCD_Handler.cpp @@ -22,7 +22,7 @@ namespace CIAO CIAO_TRACE("DP_PCD_Handler::plan_connection_descrs"); DeploymentPlan::connection_const_iterator cci_e = src.end_connection (); - + CORBA::ULong pos = 0; dest.length (src.count_connection ()); for (DeploymentPlan::connection_const_iterator cci_b = @@ -34,10 +34,10 @@ namespace CIAO dest[pos++]); } } - + PlanConnectionDescription DP_PCD_Handler::plan_connection_descr ( - const Deployment::PlanConnectionDescription &src) + const Deployment::PlanConnectionDescription &src) { CIAO_TRACE("DP_PCD_Handler::plan_connection_descr"); PlanConnectionDescription pcd = PCD_Handler::get_PlanConnectionDescription(src); diff --git a/CIAO/tools/Config_Handlers/DP_PCD_Handler.h b/CIAO/tools/Config_Handlers/DP_PCD_Handler.h index cc411c37383..25c1cb336dc 100644 --- a/CIAO/tools/Config_Handlers/DP_PCD_Handler.h +++ b/CIAO/tools/Config_Handlers/DP_PCD_Handler.h @@ -53,7 +53,7 @@ namespace CIAO Deployment::PlanConnectionDescriptions& toconfig); static PlanConnectionDescription plan_connection_descr( - const Deployment::PlanConnectionDescription &src); + const Deployment::PlanConnectionDescription &src); private: static void plan_connection_descr ( diff --git a/CIAO/tools/Config_Handlers/ERE_Handler.h b/CIAO/tools/Config_Handlers/ERE_Handler.h index 0780509b8bf..77e0a125b96 100644 --- a/CIAO/tools/Config_Handlers/ERE_Handler.h +++ b/CIAO/tools/Config_Handlers/ERE_Handler.h @@ -28,42 +28,42 @@ namespace Deployment namespace CIAO { - namespace Config_Handlers - { - class PlanConnectionDescription; - class ExternalReferenceEndpoint; - - /* - * @class ERE_Handler - * - * @brief Handler class for <ExternalReferenceEndpoint> types. - * - * This class defines handler methods to map values from - * XSC ExternalReferenceEndpoint objects, parsed from - * the descriptor files, to the corresponding CORBA IDL type. - * - */ + { + class PlanConnectionDescription; + class ExternalReferenceEndpoint; - class Config_Handlers_Common_Export ERE_Handler - { - public: - static void external_ref_endpoints (const PlanConnectionDescription &src, - ::Deployment::ExternalReferenceEndpoints &dest); + /* + * @class ERE_Handler + * + * @brief Handler class for <ExternalReferenceEndpoint> types. + * + * This class defines handler methods to map values from + * XSC ExternalReferenceEndpoint objects, parsed from + * the descriptor files, to the corresponding CORBA IDL type. + */ - static ExternalReferenceEndpoint external_ref_endpoint ( - const Deployment::ExternalReferenceEndpoint& src); + class Config_Handlers_Common_Export ERE_Handler + { + public: + static void external_ref_endpoints ( + const PlanConnectionDescription &src, + ::Deployment::ExternalReferenceEndpoints &dest); - static void handle_external_ref_endpoint (const ExternalReferenceEndpoint &src, - Deployment::ExternalReferenceEndpoint &dest); - }; + static ExternalReferenceEndpoint external_ref_endpoint ( + const Deployment::ExternalReferenceEndpoint& src); - typedef Sequence_Handler < ExternalReferenceEndpoint, - ::Deployment::ExternalReferenceEndpoints, - ::Deployment::ExternalReferenceEndpoint, - ERE_Handler::handle_external_ref_endpoint > ERE_Functor; + static void handle_external_ref_endpoint ( + const ExternalReferenceEndpoint &src, + Deployment::ExternalReferenceEndpoint &dest); + }; - } + typedef Sequence_Handler < ExternalReferenceEndpoint, + ::Deployment::ExternalReferenceEndpoints, + ::Deployment::ExternalReferenceEndpoint, + ERE_Handler::handle_external_ref_endpoint > + ERE_Functor; + } } #include /**/ "ace/post.h" diff --git a/CIAO/tools/Config_Handlers/IDD_Handler.cpp b/CIAO/tools/Config_Handlers/IDD_Handler.cpp index ad4d21925fd..9fe9ebc974f 100644 --- a/CIAO/tools/Config_Handlers/IDD_Handler.cpp +++ b/CIAO/tools/Config_Handlers/IDD_Handler.cpp @@ -85,7 +85,7 @@ namespace CIAO { dest.deployedSharedResource.length (1); IRDD_Handler::handle_irdd (src.deployedSharedResource (), - dest.deployedSharedResource[0]); + dest.deployedSharedResource[0]); } } diff --git a/CIAO/tools/Config_Handlers/Package_Handlers/CAD_Handler.cpp b/CIAO/tools/Config_Handlers/Package_Handlers/CAD_Handler.cpp index 8907ce0b0b1..cc8c825f066 100644 --- a/CIAO/tools/Config_Handlers/Package_Handlers/CAD_Handler.cpp +++ b/CIAO/tools/Config_Handlers/Package_Handlers/CAD_Handler.cpp @@ -19,177 +19,180 @@ namespace CIAO { struct Packaging_Handlers_Export SPE_Handler { - static void handle_spe (const SubcomponentPortEndpoint &desc, - ::Deployment::SubcomponentPortEndpoint &toconfig) - { - CIAO_TRACE("SPE_Handler::get_spe"); - - toconfig.portName = desc.portName ().c_str (); - - ACE_CString str (desc.instance ().id ().c_str ()); - CORBA::ULong pos (0); - - SID_Handler::IDREF.find_ref (str, pos); - toconfig.instanceRef = pos; - } - - static SubcomponentPortEndpoint - get_spe (const ::Deployment::SubcomponentPortEndpoint &src) - { - CIAO_TRACE("SPE_Handler::get_spe - reverse"); - ACE_CString str; - SID_Handler::IDREF.find_ref (src.instanceRef, str); - - return SubcomponentPortEndpoint (src.portName.in (), - str.c_str ()); - } + static void handle_spe ( + const SubcomponentPortEndpoint &desc, + ::Deployment::SubcomponentPortEndpoint &toconfig) + { + CIAO_TRACE("SPE_Handler::get_spe"); + + toconfig.portName = desc.portName ().c_str (); + + ACE_CString str (desc.instance ().id ().c_str ()); + CORBA::ULong pos (0); + + SID_Handler::IDREF.find_ref (str, pos); + toconfig.instanceRef = pos; + } + + static SubcomponentPortEndpoint get_spe + (const ::Deployment::SubcomponentPortEndpoint &src) + { + CIAO_TRACE("SPE_Handler::get_spe - reverse"); + ACE_CString str; + SID_Handler::IDREF.find_ref (src.instanceRef, str); + + return SubcomponentPortEndpoint (src.portName.in (), + str.c_str ()); + } }; typedef Sequence_Handler < SubcomponentPortEndpoint, - ::Deployment::SubcomponentPortEndpoints, - ::Deployment::SubcomponentPortEndpoint, - SPE_Handler::handle_spe > SPE_Functor; + ::Deployment::SubcomponentPortEndpoints, + ::Deployment::SubcomponentPortEndpoint, + SPE_Handler::handle_spe > SPE_Functor; struct Packaging_Handlers_Export ACD_Handler { - static void handle_acd (const AssemblyConnectionDescription &desc, - ::Deployment::AssemblyConnectionDescription &toconfig) - { - CIAO_TRACE("ACD_Handler::get_acd"); - - toconfig.name = desc.name ().c_str (); - - toconfig.deployRequirement.length (desc.count_deployRequirement ()); - std::for_each (desc.begin_deployRequirement (), - desc.end_deployRequirement (), - Requirement_Functor (toconfig.deployRequirement)); - - toconfig.internalEndpoint.length (desc.count_internalEndpoint ()); - SEQ_HAND_GCC_BUG_WORKAROUND (SPE_Handler::handle_spe, - desc.begin_internalEndpoint (), - toconfig.internalEndpoint); - std::for_each (desc.begin_internalEndpoint (), - desc.end_internalEndpoint (), - SPE_Functor (toconfig.internalEndpoint)); - - toconfig.externalEndpoint.length (desc.count_externalEndpoint ()); - std::for_each (desc.begin_externalEndpoint (), - desc.end_externalEndpoint (), - CEPE_Functor (toconfig.externalEndpoint)); - - toconfig.externalReference.length (desc.count_externalReference ()); - std::for_each (desc.begin_externalReference (), - desc.end_externalReference (), - ERE_Functor (toconfig.externalReference)); - - } - - static AssemblyConnectionDescription - get_acd (const ::Deployment::AssemblyConnectionDescription &src) - { - CIAO_TRACE("ACD_Handler::get_acd - reverse"); - - AssemblyConnectionDescription retval (src.name.in ()); - - for (CORBA::ULong i = 0; i < src.deployRequirement.length (); ++i) - retval.add_deployRequirement - (Req_Handler::get_requirement (src.deployRequirement[i])); - - for (CORBA::ULong i = 0; i < src.internalEndpoint.length (); ++i) - retval.add_internalEndpoint - (SPE_Handler::get_spe (src.internalEndpoint[i])); - - for (CORBA::ULong i = 0; i < src.externalEndpoint.length (); ++i) - retval.add_externalEndpoint - (CEPE_Handler::external_port_endpoint (src.externalEndpoint[i])); - - for (CORBA::ULong i = 0; i < src.externalReference.length (); ++i) - retval.add_externalReference - (ERE_Handler::external_ref_endpoint (src.externalReference[i])); - - return retval; - } + static void handle_acd (const AssemblyConnectionDescription &desc, + ::Deployment::AssemblyConnectionDescription &toconfig) + { + CIAO_TRACE("ACD_Handler::get_acd"); + + toconfig.name = desc.name ().c_str (); + + toconfig.deployRequirement.length (desc.count_deployRequirement ()); + std::for_each (desc.begin_deployRequirement (), + desc.end_deployRequirement (), + Requirement_Functor (toconfig.deployRequirement)); + + toconfig.internalEndpoint.length (desc.count_internalEndpoint ()); + SEQ_HAND_GCC_BUG_WORKAROUND (SPE_Handler::handle_spe, + desc.begin_internalEndpoint (), + toconfig.internalEndpoint); + std::for_each (desc.begin_internalEndpoint (), + desc.end_internalEndpoint (), + SPE_Functor (toconfig.internalEndpoint)); + + toconfig.externalEndpoint.length (desc.count_externalEndpoint ()); + std::for_each (desc.begin_externalEndpoint (), + desc.end_externalEndpoint (), + CEPE_Functor (toconfig.externalEndpoint)); + + toconfig.externalReference.length (desc.count_externalReference ()); + std::for_each (desc.begin_externalReference (), + desc.end_externalReference (), + ERE_Functor (toconfig.externalReference)); + } + + static AssemblyConnectionDescription + get_acd (const ::Deployment::AssemblyConnectionDescription &src) + { + CIAO_TRACE("ACD_Handler::get_acd - reverse"); + + AssemblyConnectionDescription retval (src.name.in ()); + + for (CORBA::ULong i = 0; i < src.deployRequirement.length (); ++i) + retval.add_deployRequirement + (Req_Handler::get_requirement (src.deployRequirement[i])); + + for (CORBA::ULong i = 0; i < src.internalEndpoint.length (); ++i) + retval.add_internalEndpoint + (SPE_Handler::get_spe (src.internalEndpoint[i])); + + for (CORBA::ULong i = 0; i < src.externalEndpoint.length (); ++i) + retval.add_externalEndpoint + (CEPE_Handler::external_port_endpoint (src.externalEndpoint[i])); + + for (CORBA::ULong i = 0; i < src.externalReference.length (); ++i) + retval.add_externalReference + (ERE_Handler::external_ref_endpoint (src.externalReference[i])); + + return retval; + } }; - typedef Sequence_Handler < AssemblyConnectionDescription, - ::Deployment::AssemblyConnectionDescriptions, - ::Deployment::AssemblyConnectionDescription, - ACD_Handler::handle_acd > ACD_Functor; + typedef Sequence_Handler < + AssemblyConnectionDescription, + ::Deployment::AssemblyConnectionDescriptions, + ::Deployment::AssemblyConnectionDescription, + ACD_Handler::handle_acd > ACD_Functor; struct Packaging_Handlers_Export SPR_Handler { - static void handle_spr (const SubcomponentPropertyReference &desc, - ::Deployment::SubcomponentPropertyReference &toconfig) - { - CIAO_TRACE("SPR_Handler::get_spr"); - - toconfig.propertyName = desc.propertyName ().c_str (); - - ACE_CString str (desc.instance ().id ().c_str ()); - CORBA::ULong pos (0); - - SID_Handler::IDREF.find_ref (str, pos); - toconfig.instanceRef = pos; - - } - - static SubcomponentPropertyReference - get_spr (const ::Deployment::SubcomponentPropertyReference &src) - { - CIAO_TRACE("SPR_HAndler::get_spr - reverse"); - ACE_CString str; - SID_Handler::IDREF.find_ref (src.instanceRef, str); - - return SubcomponentPropertyReference (src.propertyName.in (), - str.c_str ()); - } - + static void handle_spr ( + const SubcomponentPropertyReference &desc, + ::Deployment::SubcomponentPropertyReference &toconfig) + { + CIAO_TRACE("SPR_Handler::get_spr"); + + toconfig.propertyName = desc.propertyName ().c_str (); + + ACE_CString str (desc.instance ().id ().c_str ()); + CORBA::ULong pos (0); + + SID_Handler::IDREF.find_ref (str, pos); + toconfig.instanceRef = pos; + } + + static SubcomponentPropertyReference + get_spr (const ::Deployment::SubcomponentPropertyReference &src) + { + CIAO_TRACE("SPR_HAndler::get_spr - reverse"); + ACE_CString str; + SID_Handler::IDREF.find_ref (src.instanceRef, str); + + return SubcomponentPropertyReference (src.propertyName.in (), + str.c_str ()); + } }; - typedef Sequence_Handler < SubcomponentPropertyReference, - ::Deployment::SubcomponentPropertyReferences, - ::Deployment::SubcomponentPropertyReference, - SPR_Handler::handle_spr > SPR_Functor; + typedef Sequence_Handler < + SubcomponentPropertyReference, + ::Deployment::SubcomponentPropertyReferences, + ::Deployment::SubcomponentPropertyReference, + SPR_Handler::handle_spr > SPR_Functor; struct Packaging_Handlers_Export APM_Handler { - static void handle_apm (const AssemblyPropertyMapping &desc, - ::Deployment::AssemblyPropertyMapping &toconfig) - { - CIAO_TRACE("APM_Handler::get_apm"); - - toconfig.name = desc.name ().c_str (); - toconfig.externalName = desc.externalName ().c_str (); - - toconfig.delegatesTo.length (desc.count_delegatesTo ()); - SEQ_HAND_GCC_BUG_WORKAROUND (SPR_Handler::handle_spr, - desc.begin_delegatesTo (), - toconfig.delegatesTo); - std::for_each (desc.begin_delegatesTo (), - desc.end_delegatesTo (), - SPR_Functor (toconfig.delegatesTo)); - } - - static AssemblyPropertyMapping - get_apm (const ::Deployment::AssemblyPropertyMapping &src) - { - CIAO_TRACE("APM_Handler::get_apm - reverse"); - - AssemblyPropertyMapping retval (src.name.in (), - src.externalName.in ()); - - for (CORBA::ULong i = 0; i < src.delegatesTo.length (); ++i) - retval.add_delegatesTo (SPR_Handler::get_spr (src.delegatesTo[i])); - - return retval; - } + static void handle_apm ( + const AssemblyPropertyMapping &desc, + ::Deployment::AssemblyPropertyMapping &toconfig) + { + CIAO_TRACE("APM_Handler::get_apm"); + + toconfig.name = desc.name ().c_str (); + toconfig.externalName = desc.externalName ().c_str (); + + toconfig.delegatesTo.length (desc.count_delegatesTo ()); + SEQ_HAND_GCC_BUG_WORKAROUND (SPR_Handler::handle_spr, + desc.begin_delegatesTo (), + toconfig.delegatesTo); + std::for_each (desc.begin_delegatesTo (), + desc.end_delegatesTo (), + SPR_Functor (toconfig.delegatesTo)); + } + + static AssemblyPropertyMapping + get_apm (const ::Deployment::AssemblyPropertyMapping &src) + { + CIAO_TRACE("APM_Handler::get_apm - reverse"); + + AssemblyPropertyMapping retval (src.name.in (), + src.externalName.in ()); + + for (CORBA::ULong i = 0; i < src.delegatesTo.length (); ++i) + retval.add_delegatesTo (SPR_Handler::get_spr (src.delegatesTo[i])); + + return retval; + } }; - typedef Sequence_Handler < AssemblyPropertyMapping, - ::Deployment::AssemblyPropertyMappings, - ::Deployment::AssemblyPropertyMapping, - APM_Handler::handle_apm > APM_Functor; + typedef Sequence_Handler < + AssemblyPropertyMapping, + ::Deployment::AssemblyPropertyMappings, + ::Deployment::AssemblyPropertyMapping, + APM_Handler::handle_apm > APM_Functor; void CAD_Handler::component_assem_descr (const ComponentAssemblyDescription &desc, @@ -205,17 +208,17 @@ namespace CIAO /* @@ MAJO: Implement Locality */ toconfig.connection.length (desc.count_connection ()); - SEQ_HAND_GCC_BUG_WORKAROUND (ACD_Handler::handle_acd, - desc.begin_connection (), - toconfig.connection); + SEQ_HAND_GCC_BUG_WORKAROUND (ACD_Handler::handle_acd, + desc.begin_connection (), + toconfig.connection); std::for_each (desc.begin_connection (), desc.end_connection (), ACD_Functor (toconfig.connection)); toconfig.externalProperty.length (desc.count_externalProperty ()); - SEQ_HAND_GCC_BUG_WORKAROUND (APM_Handler::handle_apm, - desc.begin_externalProperty (), - toconfig.externalProperty); + SEQ_HAND_GCC_BUG_WORKAROUND (APM_Handler::handle_apm, + desc.begin_externalProperty (), + toconfig.externalProperty); std::for_each (desc.begin_externalProperty (), desc.end_externalProperty (), APM_Functor (toconfig.externalProperty)); @@ -239,7 +242,6 @@ namespace CIAO retval.add_externalProperty (APM_Handler::get_apm (src.externalProperty[i])); return retval; - } ComponentAssemblyDescription * diff --git a/CIAO/tools/Config_Handlers/Package_Handlers/CID_Handler.cpp b/CIAO/tools/Config_Handlers/Package_Handlers/CID_Handler.cpp index 78d865eb366..e78ccfc4256 100644 --- a/CIAO/tools/Config_Handlers/Package_Handlers/CID_Handler.cpp +++ b/CIAO/tools/Config_Handlers/Package_Handlers/CID_Handler.cpp @@ -29,224 +29,226 @@ namespace CIAO struct Capability_Handler { - static void handle_capability (const Capability &desc, - ::Deployment::Capability &toconfig) - { - CIAO_TRACE ("Capability_Handler::get_capability"); + static void handle_capability (const Capability &desc, + ::Deployment::Capability &toconfig) + { + CIAO_TRACE ("Capability_Handler::get_capability"); - toconfig.name = desc.name ().c_str (); + toconfig.name = desc.name ().c_str (); - toconfig.resourceType.length (desc.count_resourceType ()); - std::for_each (desc.begin_resourceType (), - desc.end_resourceType (), - String_Seq_Functor (toconfig.resourceType)); + toconfig.resourceType.length (desc.count_resourceType ()); + std::for_each (desc.begin_resourceType (), + desc.end_resourceType (), + String_Seq_Functor (toconfig.resourceType)); - toconfig.property.length (desc.count_property ()); - std::for_each (desc.begin_property (), - desc.end_property (), - SatisfierProperty_Functor (toconfig.property)); - } + toconfig.property.length (desc.count_property ()); + std::for_each (desc.begin_property (), + desc.end_property (), + SatisfierProperty_Functor (toconfig.property)); + } - static Capability get_capability (const ::Deployment::Capability &src) - { - CIAO_TRACE ("Capability_Handler::get_capability - reverse"); + static Capability get_capability (const ::Deployment::Capability &src) + { + CIAO_TRACE ("Capability_Handler::get_capability - reverse"); - Capability retval (src.name.in ()); + Capability retval (src.name.in ()); - for (CORBA::ULong i = 0; i < src.resourceType.length (); ++i) - retval.add_resourceType (src.resourceType[i].in ()); + for (CORBA::ULong i = 0; i < src.resourceType.length (); ++i) + retval.add_resourceType (src.resourceType[i].in ()); - for (CORBA::ULong i = 0; i < src.property.length (); ++i) - retval.add_property (SatisfierProperty_Handler::get_sat_property (src.property[i])); + for (CORBA::ULong i = 0; i < src.property.length (); ++i) + retval.add_property ( + SatisfierProperty_Handler::get_sat_property (src.property[i])); - return retval; - } + return retval; + } }; - typedef Sequence_Handler < Capability, - ::Deployment::Capabilities, - ::Deployment::Capability, - Capability_Handler::handle_capability > Capability_Functor; + typedef Sequence_Handler < + Capability, + ::Deployment::Capabilities, + ::Deployment::Capability, + Capability_Handler::handle_capability > Capability_Functor; struct IR_Handler { - static void handle_ir (const ImplementationRequirement &desc, - ::Deployment::ImplementationRequirement &toconfig) - { - CIAO_TRACE ("IR_Handler::get_ir"); - - if (desc.resourceUsage_p ()) - { - switch (desc.resourceUsage ().integral ()) - { - case ResourceUsageKind::None_l: - toconfig.resourceUsage = Deployment::None; - break; - - case ResourceUsageKind::InstanceUsesResource_l: - toconfig.resourceUsage = Deployment::InstanceUsesResource; - break; - - case ResourceUsageKind::ResourceUsesInstance_l: - toconfig.resourceUsage = Deployment::ResourceUsesInstance; - break; - - case ResourceUsageKind::PortUsesResource_l: - toconfig.resourceUsage = Deployment::PortUsesResource; - break; - - case ResourceUsageKind::ResourceUsesPort_l: - toconfig.resourceUsage = Deployment::ResourceUsesPort; - break; - - default: - throw Config_Error (desc.name (), - "Unknown ResourceUsageKind."); - break; - } - } - - if (desc.resourcePort_p ()) - toconfig.resourcePort = desc.resourcePort ().c_str (); - - if (desc.componentPort_p ()) - toconfig.componentPort = desc.componentPort ().c_str (); - - toconfig.resourceType = desc.resourceType ().c_str (); - toconfig.name = desc.name ().c_str (); - - std::for_each (desc.begin_property (), - desc.end_property (), - Property_Functor (toconfig.property )); - } - - static ImplementationRequirement - get_ir (const ::Deployment::ImplementationRequirement &src) - { - CIAO_TRACE ("IR_Handler::get_ir - reverse"); - - ImplementationRequirement retval (src.resourceType.in (), - src.name.in ()); - - if (src.resourceUsage.length () == 1) - switch (src.resourceUsage[0]) - { - case Deployment::None: - retval.resourceUsage (ResourceUsageKind::None); - break; - - case Deployment::InstanceUsesResource: - retval.resourceUsage (ResourceUsageKind::InstanceUsesResource); - break; - - case Deployment::ResourceUsesInstance: - retval.resourceUsage (ResourceUsageKind::ResourceUsesInstance); - break; - - case Deployment::PortUsesResource: - retval.resourceUsage (ResourceUsageKind::PortUsesResource); - break; - - case Deployment::ResourceUsesPort: - retval.resourceUsage (ResourceUsageKind::ResourceUsesPort); - break; - - default: - throw Config_Error (src.name.in (), - "Unknown ResourceUsageKind."); - break; - } - - retval.resourcePort (src.resourcePort.in ()); - - retval.componentPort (src.componentPort.in ()); - - for (CORBA::ULong i = 0; i < src.property.length (); ++i) - retval.add_property (Property_Handler::get_property (src.property[i])); - - return retval; - } + static void handle_ir (const ImplementationRequirement &desc, + ::Deployment::ImplementationRequirement &toconfig) + { + CIAO_TRACE ("IR_Handler::get_ir"); + + if (desc.resourceUsage_p ()) + { + switch (desc.resourceUsage ().integral ()) + { + case ResourceUsageKind::None_l: + toconfig.resourceUsage = Deployment::None; + break; + + case ResourceUsageKind::InstanceUsesResource_l: + toconfig.resourceUsage = Deployment::InstanceUsesResource; + break; + + case ResourceUsageKind::ResourceUsesInstance_l: + toconfig.resourceUsage = Deployment::ResourceUsesInstance; + break; + + case ResourceUsageKind::PortUsesResource_l: + toconfig.resourceUsage = Deployment::PortUsesResource; + break; + + case ResourceUsageKind::ResourceUsesPort_l: + toconfig.resourceUsage = Deployment::ResourceUsesPort; + break; + + default: + throw Config_Error (desc.name (), + "Unknown ResourceUsageKind."); + break; + } + } + + if (desc.resourcePort_p ()) + toconfig.resourcePort = desc.resourcePort ().c_str (); + + if (desc.componentPort_p ()) + toconfig.componentPort = desc.componentPort ().c_str (); + + toconfig.resourceType = desc.resourceType ().c_str (); + toconfig.name = desc.name ().c_str (); + + std::for_each (desc.begin_property (), + desc.end_property (), + Property_Functor (toconfig.property )); + } + + static ImplementationRequirement + get_ir (const ::Deployment::ImplementationRequirement &src) + { + CIAO_TRACE ("IR_Handler::get_ir - reverse"); + + ImplementationRequirement retval (src.resourceType.in (), + src.name.in ()); + + if (src.resourceUsage.length () == 1) + switch (src.resourceUsage[0]) + { + case Deployment::None: + retval.resourceUsage (ResourceUsageKind::None); + break; + + case Deployment::InstanceUsesResource: + retval.resourceUsage (ResourceUsageKind::InstanceUsesResource); + break; + + case Deployment::ResourceUsesInstance: + retval.resourceUsage (ResourceUsageKind::ResourceUsesInstance); + break; + + case Deployment::PortUsesResource: + retval.resourceUsage (ResourceUsageKind::PortUsesResource); + break; + + case Deployment::ResourceUsesPort: + retval.resourceUsage (ResourceUsageKind::ResourceUsesPort); + break; + + default: + throw Config_Error (src.name.in (), + "Unknown ResourceUsageKind."); + break; + } + + retval.resourcePort (src.resourcePort.in ()); + + retval.componentPort (src.componentPort.in ()); + + for (CORBA::ULong i = 0; i < src.property.length (); ++i) + retval.add_property (Property_Handler::get_property (src.property[i])); + + return retval; + } }; - typedef Sequence_Handler < ImplementationRequirement, - ::Deployment::ImplementationRequirements, - ::Deployment::ImplementationRequirement, - IR_Handler::handle_ir > IR_Functor; + typedef Sequence_Handler < + ImplementationRequirement, + ::Deployment::ImplementationRequirements, + ::Deployment::ImplementationRequirement, + IR_Handler::handle_ir > IR_Functor; struct MID_Handler { - static void handle_mid (const MonolithicImplementationDescription &desc, - ::Deployment::MonolithicImplementationDescription &toconfig) - { - CIAO_TRACE ("MID_Handler::get_mid"); - - toconfig.nodeExecParameter.length (desc.count_nodeExecParameter ()); - std::for_each (desc.begin_nodeExecParameter (), - desc.end_nodeExecParameter (), - Property_Functor (toconfig.nodeExecParameter)); - - toconfig.componentExecParameter.length (desc.count_componentExecParameter ()); - std::for_each (desc.begin_componentExecParameter (), - desc.end_componentExecParameter (), - Property_Functor (toconfig.componentExecParameter)); - - toconfig.deployRequirement.length (desc.count_deployRequirement ()); - while (0) - { - IR_Handler::handle_ir (*desc.begin_deployRequirement (), - toconfig.deployRequirement[0]); - } - std::for_each (desc.begin_deployRequirement (), - desc.end_deployRequirement (), - IR_Functor (toconfig.deployRequirement)); - - toconfig.primaryArtifact.length (desc.count_primaryArtifact ()); - SEQ_HAND_GCC_BUG_WORKAROUND (NIA_Handler::handle_nia, - desc.begin_primaryArtifact (), - toconfig.primaryArtifact); - std::for_each (desc.begin_primaryArtifact (), - desc.end_primaryArtifact (), - NIA_Functor (toconfig.primaryArtifact)); - } - - static MonolithicImplementationDescription - get_mid (const ::Deployment::MonolithicImplementationDescription &src) - { - CIAO_TRACE ("MID_Handler::get_mid - reverse"); - - MonolithicImplementationDescription retval; - - for (CORBA::ULong i = 0; i < src.nodeExecParameter.length (); ++i) - retval.add_nodeExecParameter - (Property_Handler::get_property (src.nodeExecParameter[i])); - - for (CORBA::ULong i = 0; i < src.componentExecParameter.length (); ++i) - retval.add_componentExecParameter - (Property_Handler::get_property (src.componentExecParameter[i])); - - for (CORBA::ULong i = 0; i < src.deployRequirement.length (); ++i) - retval.add_deployRequirement - (IR_Handler::get_ir (src.deployRequirement[i])); - - for (CORBA::ULong i = 0; i < src.primaryArtifact.length (); ++i) - retval.add_primaryArtifact - (NIA_Handler::get_nia (src.primaryArtifact[i])); - - return retval; - } + static void handle_mid ( + const MonolithicImplementationDescription &desc, + ::Deployment::MonolithicImplementationDescription &toconfig) + { + CIAO_TRACE ("MID_Handler::get_mid"); + + toconfig.nodeExecParameter.length (desc.count_nodeExecParameter ()); + std::for_each (desc.begin_nodeExecParameter (), + desc.end_nodeExecParameter (), + Property_Functor (toconfig.nodeExecParameter)); + + toconfig.componentExecParameter.length ( + desc.count_componentExecParameter ()); + std::for_each (desc.begin_componentExecParameter (), + desc.end_componentExecParameter (), + Property_Functor (toconfig.componentExecParameter)); + + toconfig.deployRequirement.length (desc.count_deployRequirement ()); + while (0) + { + IR_Handler::handle_ir (*desc.begin_deployRequirement (), + toconfig.deployRequirement[0]); + } + std::for_each (desc.begin_deployRequirement (), + desc.end_deployRequirement (), + IR_Functor (toconfig.deployRequirement)); + + toconfig.primaryArtifact.length (desc.count_primaryArtifact ()); + SEQ_HAND_GCC_BUG_WORKAROUND (NIA_Handler::handle_nia, + desc.begin_primaryArtifact (), + toconfig.primaryArtifact); + std::for_each (desc.begin_primaryArtifact (), + desc.end_primaryArtifact (), + NIA_Functor (toconfig.primaryArtifact)); + } - }; + static MonolithicImplementationDescription + get_mid (const ::Deployment::MonolithicImplementationDescription &src) + { + CIAO_TRACE ("MID_Handler::get_mid - reverse"); - typedef Sequence_Handler < MonolithicImplementationDescription, - ::Deployment::MonolithicImplementationDescriptions, - ::Deployment::MonolithicImplementationDescription, - MID_Handler::handle_mid > MID_Functor; + MonolithicImplementationDescription retval; - + for (CORBA::ULong i = 0; i < src.nodeExecParameter.length (); ++i) + retval.add_nodeExecParameter + (Property_Handler::get_property (src.nodeExecParameter[i])); + + for (CORBA::ULong i = 0; i < src.componentExecParameter.length (); ++i) + retval.add_componentExecParameter + (Property_Handler::get_property (src.componentExecParameter[i])); + + for (CORBA::ULong i = 0; i < src.deployRequirement.length (); ++i) + retval.add_deployRequirement + (IR_Handler::get_ir (src.deployRequirement[i])); + + for (CORBA::ULong i = 0; i < src.primaryArtifact.length (); ++i) + retval.add_primaryArtifact + (NIA_Handler::get_nia (src.primaryArtifact[i])); + + return retval; + } + }; + + typedef Sequence_Handler < + MonolithicImplementationDescription, + ::Deployment::MonolithicImplementationDescriptions, + ::Deployment::MonolithicImplementationDescription, + MID_Handler::handle_mid > MID_Functor; void - CID_Handler::component_impl_descr ( - const ComponentImplementationDescription &desc, + CID_Handler::component_impl_descr (const ComponentImplementationDescription &desc, ::Deployment::ComponentImplementationDescription &toconfig) { CIAO_TRACE ("CID_Handler::component_impl_descr"); @@ -284,7 +286,7 @@ namespace CIAO { toconfig.monolithicImpl.length (1); MID_Handler::handle_mid (cid->monolithicImpl (), - toconfig.monolithicImpl[0]); + toconfig.monolithicImpl[0]); } else throw Plan_Error ("ComponentImplementationDescription must have either assemblyImpl or monolithicImpl"); @@ -297,9 +299,9 @@ namespace CIAO // capability toconfig.capability.length (cid->count_capability ()); - SEQ_HAND_GCC_BUG_WORKAROUND (Capability_Handler::handle_capability, - cid->begin_capability (), - toconfig.capability); + SEQ_HAND_GCC_BUG_WORKAROUND (Capability_Handler::handle_capability, + cid->begin_capability (), + toconfig.capability); std::for_each (cid->begin_capability (), cid->end_capability (), Capability_Functor (toconfig.capability)); @@ -317,7 +319,6 @@ namespace CIAO std::for_each (cid->begin_infoProperty (), cid->end_infoProperty (), Property_Functor (toconfig.infoProperty)); - } ComponentImplementationDescription @@ -348,8 +349,7 @@ namespace CIAO for (CORBA::ULong i = 0; i < src.configProperty.length (); ++i) { - retval.add_configProperty ( - Property_Handler::get_property (src.configProperty[i])); + retval.add_configProperty (Property_Handler::get_property (src.configProperty[i])); } for (CORBA::ULong i = 0; i < src.dependsOn.length (); ++i) @@ -359,8 +359,7 @@ namespace CIAO for (CORBA::ULong i = 0; i < src.infoProperty.length (); ++i) { - retval.add_infoProperty ( - Property_Handler::get_property (src.infoProperty[i])); + retval.add_infoProperty (Property_Handler::get_property (src.infoProperty[i])); } return retval; @@ -376,11 +375,13 @@ namespace CIAO if (!dom) throw Parse_Error ("Unable to create DOM for CID"); - try { + try + { return new ComponentImplementationDescription (componentImplementationDescription (dom)); } - catch (...) { + catch (...) + { throw Parse_Error ("Unable to create XSC structure for CID"); } } diff --git a/CIAO/tools/Config_Handlers/Package_Handlers/CPD_Handler.cpp b/CIAO/tools/Config_Handlers/Package_Handlers/CPD_Handler.cpp index b857c893bf8..b0273f1687f 100644 --- a/CIAO/tools/Config_Handlers/Package_Handlers/CPD_Handler.cpp +++ b/CIAO/tools/Config_Handlers/Package_Handlers/CPD_Handler.cpp @@ -17,34 +17,37 @@ namespace CIAO { struct Packaging_Handlers_Export PCI_Handler { - static void handle_pci (const PackagedComponentImplementation &desc, - ::Deployment::PackagedComponentImplementation &toconfig) - { - CIAO_TRACE ("PCI_Handler::get_pci"); - toconfig.name = desc.name ().c_str (); - - CID_Handler::component_impl_descr (desc.referencedImplementation (), - toconfig.referencedImplementation); - } - - static PackagedComponentImplementation - get_pci (const ::Deployment::PackagedComponentImplementation &src) - { - CIAO_TRACE ("PCI_Handler::get_pci - reverse"); - return PackagedComponentImplementation (src.name.in (), - CID_Handler::component_impl_descr (src.referencedImplementation)); - } + static void handle_pci ( + const PackagedComponentImplementation &desc, + ::Deployment::PackagedComponentImplementation &toconfig) + { + CIAO_TRACE ("PCI_Handler::get_pci"); + toconfig.name = desc.name ().c_str (); + + CID_Handler::component_impl_descr (desc.referencedImplementation (), + toconfig.referencedImplementation); + } + + static PackagedComponentImplementation + get_pci (const ::Deployment::PackagedComponentImplementation &src) + { + CIAO_TRACE ("PCI_Handler::get_pci - reverse"); + return PackagedComponentImplementation ( + src.name.in (), + CID_Handler::component_impl_descr (src.referencedImplementation)); + } }; - typedef Sequence_Handler < PackagedComponentImplementation, - ::Deployment::PackagedComponentImplementations, - ::Deployment::PackagedComponentImplementation, - PCI_Handler::handle_pci > PCI_Functor; - + typedef Sequence_Handler < + PackagedComponentImplementation, + ::Deployment::PackagedComponentImplementations, + ::Deployment::PackagedComponentImplementation, + PCI_Handler::handle_pci > PCI_Functor; void - CPD_Handler::handle_component_package_descr (const ComponentPackageDescription &desc, - ::Deployment::ComponentPackageDescription &toconfig) + CPD_Handler::handle_component_package_descr ( + const ComponentPackageDescription &desc, + ::Deployment::ComponentPackageDescription &toconfig) { CIAO_TRACE ("CPD_Handler::component_package_descr"); @@ -81,9 +84,9 @@ namespace CIAO // Packaged Component Implementations toconfig.implementation.length ( cpd->count_implementation ()); - SEQ_HAND_GCC_BUG_WORKAROUND (PCI_Handler::handle_pci, - cpd->begin_implementation (), - toconfig.implementation); + SEQ_HAND_GCC_BUG_WORKAROUND (PCI_Handler::handle_pci, + cpd->begin_implementation (), + toconfig.implementation); std::for_each (cpd->begin_implementation (), cpd->end_implementation (), PCI_Functor (toconfig.implementation)); @@ -115,19 +118,19 @@ namespace CIAO for (size_t i = 0; i < src.configProperty.length (); ++i) { toconfig.add_configProperty ( - Property_Handler::get_property (src.configProperty[i])); + Property_Handler::get_property (src.configProperty[i])); } { // Packaged Component Implementations for (size_t i = 0; i < src.implementation.length (); ++i) toconfig.add_implementation ( - PCI_Handler::get_pci (src.implementation[i])); + PCI_Handler::get_pci (src.implementation[i])); } for (size_t i = 0; i < src.infoProperty.length (); ++i) { toconfig.add_infoProperty ( - Property_Handler::get_property (src.infoProperty[i])); + Property_Handler::get_property (src.infoProperty[i])); } return toconfig; @@ -145,16 +148,16 @@ namespace CIAO if (!dom) throw Parse_Error ("Unable to create DOM for component package description"); - try { + try + { //ACE_ERROR ((LM_ERROR, "Creating new CPD XSC Object\n")); return new ComponentPackageDescription (componentPackageDescription (dom)); } - catch (...) { + catch (...) + { throw Parse_Error ("Unable to create XSC structure for CID"); } } } - - } } diff --git a/CIAO/tools/Config_Handlers/Package_Handlers/CPD_Handler.h b/CIAO/tools/Config_Handlers/Package_Handlers/CPD_Handler.h index 9535d24eef2..4b25591a75c 100644 --- a/CIAO/tools/Config_Handlers/Package_Handlers/CPD_Handler.h +++ b/CIAO/tools/Config_Handlers/Package_Handlers/CPD_Handler.h @@ -54,19 +54,17 @@ namespace CIAO ::Deployment::ComponentPackageDescription &toconfig); static ComponentPackageDescription - component_package_descr (const Deployment::ComponentPackageDescription& src); + component_package_descr (const Deployment::ComponentPackageDescription& src); private: static ComponentPackageDescription * resolve_cpd (const char *uri); - }; typedef Sequence_Handler < ComponentPackageDescription, ::Deployment::ComponentPackageDescriptions, ::Deployment::ComponentPackageDescription, - CPD_Handler::handle_component_package_descr > CPD_Functor; - + CPD_Handler::handle_component_package_descr > + CPD_Functor; } - } } diff --git a/CIAO/tools/Config_Handlers/Package_Handlers/Comp_Intf_Descr_Handler.cpp b/CIAO/tools/Config_Handlers/Package_Handlers/Comp_Intf_Descr_Handler.cpp index f13260480ad..0b6d6c2ff52 100644 --- a/CIAO/tools/Config_Handlers/Package_Handlers/Comp_Intf_Descr_Handler.cpp +++ b/CIAO/tools/Config_Handlers/Package_Handlers/Comp_Intf_Descr_Handler.cpp @@ -94,9 +94,9 @@ namespace CIAO CIAO::Config_Handlers::CPD_Functor (toconfig.port)); toconfig.property.length (cid->count_property ()); - SEQ_HAND_GCC_BUG_WORKAROUND (Comp_Prop_Handler::handle_cpd, - cid->begin_property (), - toconfig.property); + SEQ_HAND_GCC_BUG_WORKAROUND (Comp_Prop_Handler::handle_cpd, + cid->begin_property (), + toconfig.property); std::for_each (cid->begin_property (), cid->end_property (), Comp_Prop_Functor (toconfig.property)); diff --git a/CIAO/tools/Config_Handlers/Package_Handlers/IAD_Handler.cpp b/CIAO/tools/Config_Handlers/Package_Handlers/IAD_Handler.cpp index 97aa436df82..c6c8b7b9285 100644 --- a/CIAO/tools/Config_Handlers/Package_Handlers/IAD_Handler.cpp +++ b/CIAO/tools/Config_Handlers/Package_Handlers/IAD_Handler.cpp @@ -48,9 +48,9 @@ namespace CIAO String_Seq_Functor (toconfig.location)); toconfig.dependsOn.length (iad->count_dependsOn ()); - SEQ_HAND_GCC_BUG_WORKAROUND (NIA_Handler::handle_nia, - desc.begin_dependsOn (), - toconfig.dependsOn); + SEQ_HAND_GCC_BUG_WORKAROUND (NIA_Handler::handle_nia, + desc.begin_dependsOn (), + toconfig.dependsOn); std::for_each (iad->begin_dependsOn (), iad->end_dependsOn (), NIA_Functor (toconfig.dependsOn)); diff --git a/CIAO/tools/Config_Handlers/Package_Handlers/PCD_Handler.cpp b/CIAO/tools/Config_Handlers/Package_Handlers/PCD_Handler.cpp index d596adc6108..138aa848422 100644 --- a/CIAO/tools/Config_Handlers/Package_Handlers/PCD_Handler.cpp +++ b/CIAO/tools/Config_Handlers/Package_Handlers/PCD_Handler.cpp @@ -38,8 +38,8 @@ namespace CIAO if (root == XStr ("Deployment:topLevelPackageDescription")) { TopLevelPackageDescription tpd; - - tpd = topLevelPackageDescription (dom); + + tpd = topLevelPackageDescription (dom); PCD_Handler::package_config (*tpd.begin_basePackage (), toconfig); diff --git a/CIAO/tools/Config_Handlers/Package_Handlers/SID_Handler.h b/CIAO/tools/Config_Handlers/Package_Handlers/SID_Handler.h index 1bcb73e751e..7bc69b9ab95 100644 --- a/CIAO/tools/Config_Handlers/Package_Handlers/SID_Handler.h +++ b/CIAO/tools/Config_Handlers/Package_Handlers/SID_Handler.h @@ -61,8 +61,8 @@ namespace CIAO typedef Sequence_Handler < SubcomponentInstantiationDescription, ::Deployment::SubcomponentInstantiationDescriptions, ::Deployment::SubcomponentInstantiationDescription, - SID_Handler::handle_sub_comp_inst_descr > SID_Functor; - + SID_Handler::handle_sub_comp_inst_descr > + SID_Functor; } } } diff --git a/CIAO/tools/Config_Handlers/Property_Handler.h b/CIAO/tools/Config_Handlers/Property_Handler.h index 6da0530f8a8..096a2aae432 100644 --- a/CIAO/tools/Config_Handlers/Property_Handler.h +++ b/CIAO/tools/Config_Handlers/Property_Handler.h @@ -29,41 +29,39 @@ namespace Deployment namespace CIAO { namespace Config_Handlers - { - class Property; - - /* - * @class Property_Handler - * - * @brief Handler class for <CCMComponentPortDescription> types. - * - * This class defines handler methods to map values from - * XSC objects, parsed from the descriptor files, to the - * corresponding CORBA IDL type for the schema element. - * - */ + { + class Property; - class Config_Handlers_Common_Export Property_Handler - { - public: - Property_Handler (void); - virtual ~Property_Handler (void); - - /// This method maps the values from the XSC object - /// <CIAO::Config_Handlers::Property> to the CORBA IDL type - /// <Deployment::Property>. - static void handle_property (const Property& desc, - ::Deployment::Property& toconfig); - static Property get_property (const ::Deployment::Property& src); - }; + /* + * @class Property_Handler + * + * @brief Handler class for <CCMComponentPortDescription> types. + * + * This class defines handler methods to map values from + * XSC objects, parsed from the descriptor files, to the + * corresponding CORBA IDL type for the schema element. + */ + class Config_Handlers_Common_Export Property_Handler + { + public: + Property_Handler (void); + virtual ~Property_Handler (void); - typedef Sequence_Handler < Property, - ::Deployment::Properties, - ::Deployment::Property, - Property_Handler::handle_property > Property_Functor; + /// This method maps the values from the XSC object + /// <CIAO::Config_Handlers::Property> to the CORBA IDL type + /// <Deployment::Property>. + static void handle_property (const Property& desc, + ::Deployment::Property& toconfig); + static Property get_property (const ::Deployment::Property& src); + }; - } + typedef Sequence_Handler < Property, + ::Deployment::Properties, + ::Deployment::Property, + Property_Handler::handle_property > + Property_Functor; + } } #include /**/ "ace/post.h" diff --git a/CIAO/tools/Config_Handlers/RT-CCM/TPL_Handler.h b/CIAO/tools/Config_Handlers/RT-CCM/TPL_Handler.h index dab5646e32b..9b8a4508213 100644 --- a/CIAO/tools/Config_Handlers/RT-CCM/TPL_Handler.h +++ b/CIAO/tools/Config_Handlers/RT-CCM/TPL_Handler.h @@ -20,27 +20,27 @@ namespace CIAO { - namespace Config_Handlers - { - class ThreadpoolWithLanesDef; + namespace Config_Handlers + { + class ThreadpoolWithLanesDef; - /* - * @class TPL_Handler - * A brief Handler class for <ThreadpoolWithLanesDef> - */ + /* + * @class TPL_Handler + * A brief Handler class for <ThreadpoolWithLanesDef> + */ - class RT_CCM_Handlers_Export TPL_Handler - { - public: + class RT_CCM_Handlers_Export TPL_Handler + { + public: - static bool threadpool_with_lanes ( - const ThreadpoolWithLanesDef &src, - ::CIAO::DAnCE::ORS_ThreadpoolWithLanes &dest); + static bool threadpool_with_lanes ( + const ThreadpoolWithLanesDef &src, + ::CIAO::DAnCE::ORS_ThreadpoolWithLanes &dest); - static ThreadpoolWithLanesDef threadpool_with_lanes ( - const ::CIAO::DAnCE::ORS_ThreadpoolWithLanes &src); - }; - } + static ThreadpoolWithLanesDef threadpool_with_lanes ( + const ::CIAO::DAnCE::ORS_ThreadpoolWithLanes &src); + }; + } } #include /**/ "ace/post.h" diff --git a/CIAO/tools/Config_Handlers/Req_Handler.cpp b/CIAO/tools/Config_Handlers/Req_Handler.cpp index 76d0d5b7791..fda881c21ab 100644 --- a/CIAO/tools/Config_Handlers/Req_Handler.cpp +++ b/CIAO/tools/Config_Handlers/Req_Handler.cpp @@ -19,7 +19,7 @@ namespace CIAO void Req_Handler::handle_requirement (const Requirement& desc, - Deployment::Requirement& toconfig) + Deployment::Requirement& toconfig) { CIAO_TRACE("Req_Handler::get_Requirement"); diff --git a/CIAO/tools/Config_Handlers/Req_Handler.h b/CIAO/tools/Config_Handlers/Req_Handler.h index 18eba6744af..3119df4b798 100644 --- a/CIAO/tools/Config_Handlers/Req_Handler.h +++ b/CIAO/tools/Config_Handlers/Req_Handler.h @@ -28,43 +28,38 @@ namespace Deployment namespace CIAO { - namespace Config_Handlers - { - /* - * @class REQ_Handler - * - * @brief Handler class for <Requirement> types. - * - * This class defines handler methods to map values from - * XSC Requirement objects, parsed from - * the descriptor files, to the corresponding CORBA IDL type. - * - */ - - class Config_Handlers_Common_Export Req_Handler - { - public: + { + /* + * @class REQ_Handler + * + * @brief Handler class for <Requirement> types. + * + * This class defines handler methods to map values from + * XSC Requirement objects, parsed from + * the descriptor files, to the corresponding CORBA IDL type. + */ - Req_Handler (void); - virtual ~Req_Handler (void); - - ///This method takes a <Deployment::Requirement> - ///and maps the values from the passed in XSC - ///Requirement to its members. - static void handle_requirement (const Requirement& desc, - Deployment::Requirement& toconfig); - static Requirement - get_requirement (const Deployment::Requirement& src); - }; - - typedef Sequence_Handler < Requirement, - ::Deployment::Requirements, - ::Deployment::Requirement, - Req_Handler::handle_requirement > Requirement_Functor; + class Config_Handlers_Common_Export Req_Handler + { + public: + Req_Handler (void); + virtual ~Req_Handler (void); + ///This method takes a <Deployment::Requirement> + ///and maps the values from the passed in XSC + ///Requirement to its members. + static void handle_requirement (const Requirement& desc, + Deployment::Requirement& toconfig); + static Requirement get_requirement (const Deployment::Requirement& src); + }; - } + typedef Sequence_Handler < Requirement, + ::Deployment::Requirements, + ::Deployment::Requirement, + Req_Handler::handle_requirement > + Requirement_Functor; + } } #include /**/ "ace/post.h" diff --git a/CIAO/tools/Config_Handlers/STD_CID_Handler.cpp b/CIAO/tools/Config_Handlers/STD_CID_Handler.cpp index 607c964d700..d9c9a01e119 100644 --- a/CIAO/tools/Config_Handlers/STD_CID_Handler.cpp +++ b/CIAO/tools/Config_Handlers/STD_CID_Handler.cpp @@ -48,9 +48,9 @@ namespace CIAO if ((*iter).id_p ()) { ACE_CString cstr ((*iter).id ().c_str ()); - - STD_CID_Handler::IDREF.bind_ref (cstr,len); - } + + STD_CID_Handler::IDREF.bind_ref (cstr,len); + } if (!this->xml_helper_->is_initialized ()) return false; @@ -103,8 +103,8 @@ namespace CIAO (*ep_iter).portName ().c_str (); CORBA::ULong tmp = 0; - STD_CID_Handler::IDREF.find_ref (ACE_CString ((((*ep_iter).instance ()).id ()).c_str ()), - tmp); + STD_CID_Handler::IDREF.find_ref ( + ACE_CString ((((*ep_iter).instance ()).id ()).c_str ()), tmp); CORBA::ULong ref = tmp; idl_cad.connection[conn_len].internalEndpoint [endp_len].instanceRef = ref; } diff --git a/CIAO/tools/Config_Handlers/SatisfierProperty_Handler.h b/CIAO/tools/Config_Handlers/SatisfierProperty_Handler.h index c48dc353766..2ffe9a412c2 100644 --- a/CIAO/tools/Config_Handlers/SatisfierProperty_Handler.h +++ b/CIAO/tools/Config_Handlers/SatisfierProperty_Handler.h @@ -29,40 +29,40 @@ namespace Deployment namespace CIAO { namespace Config_Handlers - { - class SatisfierProperty; - - /* - * @class SatisfierProperty_Handler - * - * @brief Handler class for <CCMComponentPortDescription> types. - * - * This class defines handler methods to map values from - * XSC objects, parsed from the descriptor files, to the - * corresponding CORBA IDL type for the schema element. - * - */ + { + class SatisfierProperty; - class Config_Handlers_Common_Export SatisfierProperty_Handler - { - public: - SatisfierProperty_Handler (void); - virtual ~SatisfierProperty_Handler (void); + /* + * @class SatisfierProperty_Handler + * + * @brief Handler class for <CCMComponentPortDescription> types. + * + * This class defines handler methods to map values from + * XSC objects, parsed from the descriptor files, to the + * corresponding CORBA IDL type for the schema element. + */ - /// This method maps the values from the XSC object - /// <CIAO::Config_Handlers::SatisfierProperty> to the CORBA IDL type - /// <Deployment::SatisfierProperty>. - static void handle_sat_property (const SatisfierProperty& desc, - ::Deployment::SatisfierProperty& toconfig); - static SatisfierProperty get_sat_property (const ::Deployment::SatisfierProperty& src); - }; + class Config_Handlers_Common_Export SatisfierProperty_Handler + { + public: + SatisfierProperty_Handler (void); + virtual ~SatisfierProperty_Handler (void); - typedef Sequence_Handler < SatisfierProperty, - ::Deployment::SatisfierProperties, - ::Deployment::SatisfierProperty, - SatisfierProperty_Handler::handle_sat_property> SatisfierProperty_Functor; + /// This method maps the values from the XSC object + /// <CIAO::Config_Handlers::SatisfierProperty> to the CORBA IDL type + /// <Deployment::SatisfierProperty>. + static void handle_sat_property (const SatisfierProperty& desc, + ::Deployment::SatisfierProperty& toconfig); + static SatisfierProperty get_sat_property ( + const ::Deployment::SatisfierProperty& src); + }; - } + typedef Sequence_Handler < SatisfierProperty, + ::Deployment::SatisfierProperties, + ::Deployment::SatisfierProperty, + SatisfierProperty_Handler::handle_sat_property> + SatisfierProperty_Functor; + } } #include /**/ "ace/post.h" diff --git a/CIAO/tools/Config_Handlers/Utils/XML_Helper.h b/CIAO/tools/Config_Handlers/Utils/XML_Helper.h index 03b2f89bc28..718a2b8a761 100644 --- a/CIAO/tools/Config_Handlers/Utils/XML_Helper.h +++ b/CIAO/tools/Config_Handlers/Utils/XML_Helper.h @@ -71,14 +71,12 @@ namespace CIAO bool initialized_; XERCES_CPP_NAMESPACE::DOMImplementation *impl_; }; - - } } CIAO_XML_UTILS_SINGLETON_DECLARE (ACE_Singleton, - CIAO::Config_Handlers::XML_Helper, - ACE_Null_Mutex) + CIAO::Config_Handlers::XML_Helper, + ACE_Null_Mutex) namespace CIAO { namespace Config_Handlers diff --git a/CIAO/tools/Config_Handlers/XSCRT/Traversal.hpp b/CIAO/tools/Config_Handlers/XSCRT/Traversal.hpp index f66b6be1ab6..2dc957a9e79 100644 --- a/CIAO/tools/Config_Handlers/XSCRT/Traversal.hpp +++ b/CIAO/tools/Config_Handlers/XSCRT/Traversal.hpp @@ -64,7 +64,7 @@ namespace XSCRT map (TypeId id, TraverserBase<B>& t) { //wcerr << "map for " << id.name () << " to " << &t - // << " in " << &traversal_map_ << endl; + // << " in " << &traversal_map_ << endl; //@@ VC6 Traversers& traversers = traversal_map_[id]; |