summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-27 03:19:28 +0000
committerdengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-27 03:19:28 +0000
commit67267e0953edaa5063c9692484bc4f4ec074b96e (patch)
tree2c9f92f7d487e9328d548663c9a3947052352134
parent0d2903b282618b8a10b231337d9c19536e958798 (diff)
downloadATCD-67267e0953edaa5063c9692484bc4f4ec074b96e.tar.gz
*** empty log message ***
-rw-r--r--TAO/CIAO/DAnCE/RepositoryManager/Repository_Manager.cpp19
-rw-r--r--TAO/CIAO/DAnCE/RepositoryManager/Update_Plan.cpp615
-rw-r--r--TAO/CIAO/DAnCE/RepositoryManager/Update_Plan.h163
3 files changed, 426 insertions, 371 deletions
diff --git a/TAO/CIAO/DAnCE/RepositoryManager/Repository_Manager.cpp b/TAO/CIAO/DAnCE/RepositoryManager/Repository_Manager.cpp
index 895383d060a..4605a1ea41b 100644
--- a/TAO/CIAO/DAnCE/RepositoryManager/Repository_Manager.cpp
+++ b/TAO/CIAO/DAnCE/RepositoryManager/Repository_Manager.cpp
@@ -68,7 +68,10 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
// Initialize the ORB so that CORBA::Any will work
//
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "");
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc,
+ argv,
+ "");
try
{
@@ -116,7 +119,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
ACE_DEBUG ((LM_DEBUG, "Null DOM Document obtained, \
May be the URL is wrong!!\n"));
- throw Null_Dom_Document ();
+ throw CIAO::Null_Dom_Document ();
}
// free up DOMBuilder. DOMBuilder also deletes the DOMDocument memory.
@@ -142,12 +145,12 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
pc = rep_impl->findPackageByName ("PC");
//Deployment::DnC_Dump::dump (*pc);
- REF_MAP ref_map;
- REF_MAP primary_ref_map;
+ CIAO::REF_MAP ref_map;
+ CIAO::REF_MAP primary_ref_map;
// traverse the PackageConfiguration IDL data structure and
// update the deployment plan IDL data structure.
- traverse_package (pc, plan, ref_map, primary_ref_map);
+ CIAO::traverse_package (pc, plan, ref_map, primary_ref_map);
//Deployment::DnC_Dump::dump (plan);
@@ -256,7 +259,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
catch (CORBA::Exception& ex)
{
ACE_PRINT_EXCEPTION (ex, "Caught CORBA Exception: ");
- while (true);
+ while (true);
return -1;
}
catch (const DOMException& e)
@@ -275,13 +278,13 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
}
//ACE_PRINT_EXCEPTION ("Caught DOM Exception: ");
ACE_ERROR ((LM_ERROR, "Caught DOM exception\n"));
- while (true);
+ while (true);
return -1;
}
catch (...)
{
ACE_ERROR ((LM_ERROR, "Caught unknown exception\n"));
- while (true);
+ while (true);
return -1;
}
diff --git a/TAO/CIAO/DAnCE/RepositoryManager/Update_Plan.cpp b/TAO/CIAO/DAnCE/RepositoryManager/Update_Plan.cpp
index 76f4fa242ca..f8f16019b95 100644
--- a/TAO/CIAO/DAnCE/RepositoryManager/Update_Plan.cpp
+++ b/TAO/CIAO/DAnCE/RepositoryManager/Update_Plan.cpp
@@ -7,54 +7,77 @@
#include "ace/OS_NS_stdio.h"
#include "ace/streams.h"
-void traverse_package (Deployment::PackageConfiguration* &pc,
- Deployment::DeploymentPlan &plan,
- REF_MAP &ref_map, REF_MAP &primary_ref_map)
-{
- // traverse the package configuration structure to get to the
- // BasePackage which consists of assemblies.
- //
- CORBA::ULong bp_len = pc->basePackage.length ();
- for (CORBA::ULong x = 0; x < bp_len; ++x)
- {
- CORBA::ULong impl_len = pc->basePackage[x].implementation.length ();
- for (CORBA::ULong y = 0; y < impl_len; ++y)
- {
- // traverse the .cpd file and get to the referenced .cid file
- //
- Deployment::ComponentImplementationDescription cid =
- pc->basePackage[x].implementation[y].referencedImplementation;
- CORBA::ULong assembly_len = cid.assemblyImpl.length ();
- for (CORBA::ULong z = 0; z < assembly_len; ++z)
- {
- // traverse the .cid file and get to each
- // of the "assemblyImpl" tags.
- //
- Deployment::ComponentAssemblyDescription assembly =
- cid.assemblyImpl[z];
- //
- // traverse the individual assembly.
- //
- traverse_assembly (assembly, plan, ref_map, primary_ref_map);
- }
- }
- }
-}
+ACE_RCSID (DAnCE,
+ RepositoryManager,
+ "$Id$")
-void traverse_assembly (Deployment::ComponentAssemblyDescription &assembly,
- Deployment::DeploymentPlan &plan,
- REF_MAP &ref_map, REF_MAP &primary_ref_map)
+using namespace Deployment;
+
+namespace CIAO
{
- // traverse the assembly (ComponentAssemblyDescription) and
- // processes the instances and the connection within the assembly.
- //
- CORBA::ULong ins_len = assembly.instance.length ();
- for (CORBA::ULong k = 0; k < ins_len; ++k)
- {
- Deployment::SubcomponentInstantiationDescription ins =
- assembly.instance[k];
- const char* in_name = ins.name;
- CORBA::ULong plan_ins_len = plan.instance.length ();
+ void
+ traverse_package (PackageConfiguration* &pc,
+ DeploymentPlan &plan,
+ REF_MAP &ref_map,
+ REF_MAP &primary_ref_map)
+ {
+ // traverse the package configuration structure to get to the
+ // BasePackage which consists of assemblies.
+ //
+ CORBA::ULong bp_len =
+ pc->basePackage.length ();
+
+ for (CORBA::ULong x = 0; x != bp_len; ++x)
+ {
+ CORBA::ULong impl_len =
+ pc->basePackage[x].implementation.length ();
+
+ for (CORBA::ULong y = 0;
+ y != impl_len;
+ ++y)
+ {
+ // traverse the .cpd file and get to the referenced .cid file
+ //
+ ComponentImplementationDescription cid =
+ pc->basePackage[x].implementation[y].referencedImplementation;
+ CORBA::ULong assembly_len = cid.assemblyImpl.length ();
+
+ for (CORBA::ULong z = 0;
+ z != assembly_len;
+ ++z)
+ {
+ // traverse the .cid file and get to each
+ // of the "assemblyImpl" tags.
+ //
+ ComponentAssemblyDescription assembly =
+ cid.assemblyImpl[z];
+ //
+ // traverse the individual assembly.
+ //
+ traverse_assembly (assembly, plan, ref_map, primary_ref_map);
+ }
+ }
+ }
+ }
+
+ void
+ traverse_assembly (ComponentAssemblyDescription &assembly,
+ DeploymentPlan &plan,
+ REF_MAP &ref_map, REF_MAP &primary_ref_map)
+ {
+ // traverse the assembly (ComponentAssemblyDescription) and
+ // processes the instances and the connection within the assembly.
+ //
+ CORBA::ULong ins_len = assembly.instance.length ();
+ for (CORBA::ULong k = 0; k < ins_len; ++k)
+ {
+ SubcomponentInstantiationDescription ins =
+ assembly.instance[k];
+ const char* in_name = ins.name;
+
+ CORBA::ULong plan_ins_len =
+ plan.instance.length ();
+
for (CORBA::ULong l = 0; l < plan_ins_len; ++l)
{
const char* plan_name = plan.instance[l].name;
@@ -64,43 +87,47 @@ void traverse_assembly (Deployment::ComponentAssemblyDescription &assembly,
ref_map, primary_ref_map);
}
}
- }
- CORBA::ULong assembly_conn_len = assembly.connection.length ();
- for (CORBA::ULong m = 0; m < assembly_conn_len; ++m)
- {
- Deployment::AssemblyConnectionDescription
- assembly_connection = assembly.connection[m];
- traverse_assembly_connection (assembly,
- assembly_connection,
- plan);
- }
-}
+ }
-void traverse_assembly_connection (Deployment::ComponentAssemblyDescription
- &assembly,
- Deployment::AssemblyConnectionDescription
- &assembly_connection,
- Deployment::DeploymentPlan &plan)
-{
- // traverse the assembly connection and get information about the
- // portName and the instances at each end of the connection.
- // Also traverse the InterfaceDescriptions for each of those instances
- // and populate the portKind information.
- //
- CORBA::ULong con_length (plan.connection.length ());
- plan.connection.length (con_length + 1);
- CORBA::ULong iepe_len = assembly_connection.internalEndpoint.length ();
- for (CORBA::ULong n = 0; n < iepe_len; ++n)
- {
- CORBA::ULong iep_len (plan.connection[con_length].
- internalEndpoint.length ());
+ CORBA::ULong assembly_conn_len =
+ assembly.connection.length ();
+
+ for (CORBA::ULong m = 0; m < assembly_conn_len; ++m)
+ {
+ AssemblyConnectionDescription
+ assembly_connection = assembly.connection[m];
+ traverse_assembly_connection (assembly,
+ assembly_connection,
+ plan);
+ }
+ }
+
+ void
+ traverse_assembly_connection (ComponentAssemblyDescription
+ &assembly,
+ AssemblyConnectionDescription
+ &assembly_connection,
+ DeploymentPlan &plan)
+ {
+ // traverse the assembly connection and get information about the
+ // portName and the instances at each end of the connection.
+ // Also traverse the InterfaceDescriptions for each of those instances
+ // and populate the portKind information.
+ //
+ CORBA::ULong con_length (plan.connection.length ());
+ plan.connection.length (con_length + 1);
+ CORBA::ULong iepe_len = assembly_connection.internalEndpoint.length ();
+ for (CORBA::ULong n = 0; n < iepe_len; ++n)
+ {
+ CORBA::ULong iep_len (plan.connection[con_length].
+ internalEndpoint.length ());
plan.connection[con_length].internalEndpoint
- .length (iep_len + 1);
+ .length (iep_len + 1);
plan.connection[con_length].internalEndpoint
- [iep_len].portName = assembly_connection.
- internalEndpoint[n].portName;
+ [iep_len].portName = assembly_connection.
+ internalEndpoint[n].portName;
CORBA::ULong ins_ref = assembly_connection.internalEndpoint[n].
- instanceRef;
+ instanceRef;
const char* ins_name = assembly.instance[ins_ref].name;
CORBA::ULong plan_ins_len = plan.instance.length ();
for (CORBA::ULong w = 0; w < plan_ins_len; ++w)
@@ -116,233 +143,243 @@ void traverse_assembly_connection (Deployment::ComponentAssemblyDescription
traverse_interface (assembly.instance[ins_ref],
plan.connection[con_length].
internalEndpoint[iep_len]);
- }
-}
+ }
+ }
-void traverse_interface (Deployment::SubcomponentInstantiationDescription
- &instance,
- Deployment::PlanSubcomponentPortEndpoint
- &pspe)
-{
- // traverse the InterfaceDescription of the instance and get information
- // about the portkind of the port.
- //
- CORBA::ULong pack_len = instance.package.length ();
- for (CORBA::ULong m = 0; m < pack_len; ++m)
- {
- Deployment::ComponentPackageDescription
- package = instance.package[m];
+ void
+ traverse_interface (SubcomponentInstantiationDescription
+ &instance,
+ PlanSubcomponentPortEndpoint
+ &pspe)
+ {
+ // traverse the InterfaceDescription of the instance and get information
+ // about the portkind of the port.
+ //
+ CORBA::ULong pack_len = instance.package.length ();
+ for (CORBA::ULong m = 0; m < pack_len; ++m)
+ {
+ ComponentPackageDescription
+ package = instance.package[m];
- Deployment::ComponentInterfaceDescription
- cid = package.realizes;
+ ComponentInterfaceDescription
+ cid = package.realizes;
- CORBA::ULong port_len = cid.port.length ();
+ CORBA::ULong port_len = cid.port.length ();
- for (CORBA::ULong n = 0; n < port_len; ++n)
- {
- const char* main_port_name = cid.port[n].name;
- const char* port_name = pspe.portName;
- if (strcmp (main_port_name, port_name) == 0)
- {
- pspe.kind = cid.port[n].kind;
- }
- }
- }
-}
+ for (CORBA::ULong n = 0; n < port_len; ++n)
+ {
+ const char* main_port_name = cid.port[n].name;
+ const char* port_name = pspe.portName;
+ if (strcmp (main_port_name, port_name) == 0)
+ {
+ pspe.kind = cid.port[n].kind;
+ }
+ }
+ }
+ }
-void traverse_assembly_instance (Deployment::
- SubcomponentInstantiationDescription
- &instance,
- Deployment::DeploymentPlan &plan, int l,
- REF_MAP &ref_map, REF_MAP &primary_ref_map)
-{
- // Each instance has a package.
- // Each package has an implementation and their correspoding artifacts.
- // Traverse this information and populate the artifact and the
- // implementation information within the DeploymentPlan.
- //
- ART_REF_MAP art_ref_map;
-
- CORBA::ULong pack_len = instance.package.length ();
-
- for (CORBA::ULong m = 0; m < pack_len; ++m)
- {
- Deployment::ComponentPackageDescription
- package = instance.package[m];
- CORBA::ULong pack_impl_len = package.implementation.length ();
-
- for (CORBA::ULong n = 0; n < pack_impl_len; ++n)
- {
- Deployment::PackagedComponentImplementation
- impl = package.implementation[n];
- CORBA::ULong impl_length (plan.implementation.length ());
- plan.implementation.length (impl_length + 1);
- plan.implementation[impl_length].name = plan.instance[l].name;
- plan.instance[l].implementationRef = impl_length;
- CORBA::ULong mono_impl_len =
- impl.referencedImplementation.monolithicImpl.length ();
-
- for (CORBA::ULong p = 0; p < mono_impl_len; ++p)
- {
- Deployment::MonolithicImplementationDescription
- mid = impl.referencedImplementation.monolithicImpl[p];
+ void
+ traverse_assembly_instance (
+ SubcomponentInstantiationDescription
+ &instance,
+ DeploymentPlan &plan, int l,
+ REF_MAP &ref_map, REF_MAP &primary_ref_map)
+ {
+ // Each instance has a package.
+ // Each package has an implementation and their correspoding artifacts.
+ // Traverse this information and populate the artifact and the
+ // implementation information within the DeploymentPlan.
+ //
+ ART_REF_MAP art_ref_map;
+
+ CORBA::ULong pack_len = instance.package.length ();
+
+ for (CORBA::ULong m = 0; m < pack_len; ++m)
+ {
+ ComponentPackageDescription
+ package = instance.package[m];
+ CORBA::ULong pack_impl_len = package.implementation.length ();
+
+ for (CORBA::ULong n = 0; n < pack_impl_len; ++n)
+ {
+ PackagedComponentImplementation
+ impl = package.implementation[n];
+ CORBA::ULong impl_length (plan.implementation.length ());
+ plan.implementation.length (impl_length + 1);
+ plan.implementation[impl_length].name = plan.instance[l].name;
+ plan.instance[l].implementationRef = impl_length;
+ CORBA::ULong mono_impl_len =
+ impl.referencedImplementation.monolithicImpl.length ();
- update_artifacts (mid, plan, plan.instance[l],
+ for (CORBA::ULong p = 0; p < mono_impl_len; ++p)
+ {
+ MonolithicImplementationDescription
+ mid = impl.referencedImplementation.monolithicImpl[p];
+
+ update_artifacts (mid, plan, plan.instance[l],
ref_map, primary_ref_map, art_ref_map,
- plan.implementation[impl_length]);
- }
- update_impl_config_property (impl, plan.implementation[impl_length],
- plan.instance[l]);
- }
- }
-}
+ plan.implementation[impl_length]);
+ }
+ update_impl_config_property (impl, plan.implementation[impl_length],
+ plan.instance[l]);
+ }
+ }
+ }
-void update_artifacts (Deployment::MonolithicImplementationDescription &mid,
- Deployment::DeploymentPlan &plan,
- Deployment::InstanceDeploymentDescription &instance,
- REF_MAP &ref_map, REF_MAP &primary_ref_map,
- ART_REF_MAP &art_ref_map,
- Deployment::MonolithicDeploymentDescription &mdd)
-{
- CORBA::ULong prim_art_len = mid.primaryArtifact.length ();
- for (CORBA::ULong q = 0; q < prim_art_len; ++q)
- {
- Deployment::ImplementationArtifactDescription
- pack_iad = mid.primaryArtifact[q].referencedArtifact;
- ACE_TString artifact_name = (const char*)mid.primaryArtifact[q].name;
- int arti_len;
- CORBA::ULong art_length (plan.artifact.length ());
-
- if (ref_map.find (artifact_name, arti_len) != 0)
- {
- plan.artifact.length (art_length + 1);
- plan.artifact[art_length].name = mid.primaryArtifact[q].name;
- plan.artifact[art_length].node = instance.node;
- ref_map.bind (artifact_name, art_length);
- primary_ref_map.bind (artifact_name, art_length);
- CORBA::ULong art_ref_len (mdd.artifactRef.length ());
- mdd.artifactRef.length (art_ref_len + 1);
- mdd.artifactRef[art_ref_len] = art_length;
- update_artifact_location (pack_iad,
- plan.artifact[art_length]);
- update_artifact_property (pack_iad,
+ void
+ update_artifacts (MonolithicImplementationDescription &mid,
+ DeploymentPlan &plan,
+ InstanceDeploymentDescription &instance,
+ REF_MAP &ref_map, REF_MAP &primary_ref_map,
+ ART_REF_MAP &art_ref_map,
+ MonolithicDeploymentDescription &mdd)
+ {
+ CORBA::ULong prim_art_len = mid.primaryArtifact.length ();
+ for (CORBA::ULong q = 0; q < prim_art_len; ++q)
+ {
+ ImplementationArtifactDescription
+ pack_iad = mid.primaryArtifact[q].referencedArtifact;
+ ACE_TString artifact_name = (const char*)mid.primaryArtifact[q].name;
+ int arti_len;
+ CORBA::ULong art_length (plan.artifact.length ());
+
+ if (ref_map.find (artifact_name, arti_len) != 0)
+ {
+ plan.artifact.length (art_length + 1);
+ plan.artifact[art_length].name = mid.primaryArtifact[q].name;
+ plan.artifact[art_length].node = instance.node;
+ ref_map.bind (artifact_name, art_length);
+ primary_ref_map.bind (artifact_name, art_length);
+ CORBA::ULong art_ref_len (mdd.artifactRef.length ());
+ mdd.artifactRef.length (art_ref_len + 1);
+ mdd.artifactRef[art_ref_len] = art_length;
+ update_artifact_location (pack_iad,
plan.artifact[art_length]);
- }
- update_common_artifact_and_art_ref (pack_iad,
- primary_ref_map, ref_map,
+ update_artifact_property (pack_iad,
+ plan.artifact[art_length]);
+ }
+ update_common_artifact_and_art_ref (pack_iad,
+ primary_ref_map, ref_map,
art_ref_map, mdd,
- plan, instance);
- }
-}
+ plan, instance);
+ }
+ }
+
+ void
+ update_common_artifact_and_art_ref (
+ ImplementationArtifactDescription
+ &pack_iad,
+ REF_MAP &primary_ref_map,
+ REF_MAP &ref_map,
+ ART_REF_MAP &art_ref_map,
+
+ MonolithicDeploymentDescription &mid,
+ DeploymentPlan &plan,
-void update_common_artifact_and_art_ref (Deployment::
- ImplementationArtifactDescription
- &pack_iad,
- REF_MAP &primary_ref_map,
- REF_MAP &ref_map,
- ART_REF_MAP &art_ref_map,
- Deployment::
- MonolithicDeploymentDescription &mid,
- Deployment::DeploymentPlan &plan,
- Deployment::
InstanceDeploymentDescription
&instance)
-{
- CORBA::ULong deps_len = pack_iad.dependsOn.length ();
- for (CORBA::ULong g = 0; g < deps_len; ++g)
- {
- ACE_TString dep_name =
- (const char*)pack_iad.dependsOn[g].name;
- int arti_len;
-
- if (ref_map.find (dep_name, arti_len) == 0)
- {
- if (primary_ref_map.find (dep_name, arti_len) != 0)
- {
- if (art_ref_map.find (arti_len, arti_len) != 0)
- {
- update_impl_art_ref (mid, arti_len);
- art_ref_map.bind (arti_len, arti_len);
- }
- }
- }
- else
- {
- Deployment::ImplementationArtifactDescription
- depends_iad = pack_iad.dependsOn[g].
- referencedArtifact;
- CORBA::ULong new_art_length (plan.artifact.length ());
- plan.artifact.length (new_art_length + 1);
- plan.artifact[new_art_length].name =
- pack_iad.dependsOn[g].name;
- plan.artifact[new_art_length].node = instance.node;
- update_artifact_location (depends_iad,
- plan.artifact
- [new_art_length]);
- ref_map.bind (
- (const char*)plan.artifact[new_art_length].name,
- new_art_length);
- update_impl_art_ref (mid, new_art_length);
- art_ref_map.bind (new_art_length, new_art_length);
- }
- }
-}
+ {
+ CORBA::ULong deps_len = pack_iad.dependsOn.length ();
+ for (CORBA::ULong g = 0; g < deps_len; ++g)
+ {
+ ACE_TString dep_name =
+ (const char*)pack_iad.dependsOn[g].name;
+ int arti_len;
+
+ if (ref_map.find (dep_name, arti_len) == 0)
+ {
+ if (primary_ref_map.find (dep_name, arti_len) != 0)
+ {
+ if (art_ref_map.find (arti_len, arti_len) != 0)
+ {
+ update_impl_art_ref (mid, arti_len);
+ art_ref_map.bind (arti_len, arti_len);
+ }
+ }
+ }
+ else
+ {
+ ImplementationArtifactDescription
+ depends_iad = pack_iad.dependsOn[g].
+ referencedArtifact;
+ CORBA::ULong new_art_length (plan.artifact.length ());
+ plan.artifact.length (new_art_length + 1);
+ plan.artifact[new_art_length].name =
+ pack_iad.dependsOn[g].name;
+ plan.artifact[new_art_length].node = instance.node;
+ update_artifact_location (depends_iad,
+ plan.artifact
+ [new_art_length]);
+ ref_map.bind (
+ (const char*)plan.artifact[new_art_length].name,
+ new_art_length);
+ update_impl_art_ref (mid, new_art_length);
+ art_ref_map.bind (new_art_length, new_art_length);
+ }
+ }
+ }
+
+ void
+ update_impl_config_property (PackagedComponentImplementation
+ &impl,
+ MonolithicDeploymentDescription
+ &mid,
-void update_impl_config_property (Deployment::PackagedComponentImplementation
- &impl,
- Deployment::MonolithicDeploymentDescription
- &mid,
- Deployment::
InstanceDeploymentDescription
- &instance)
-{
- CORBA::ULong pro_len =
+ &instance)
+ {
+ CORBA::ULong pro_len =
impl.referencedImplementation.configProperty.length ();
- for (CORBA::ULong x = 0; x < pro_len; ++x)
- {
- CORBA::ULong impl_pro_len (mid.execParameter.length ());
- mid.execParameter.length (impl_pro_len + 1);
- mid.execParameter[impl_pro_len]
- = impl.referencedImplementation.configProperty[x];
- CORBA::ULong ins_pro_len (instance.configProperty. length ());
- instance.configProperty.length (ins_pro_len + 1);
- instance.configProperty[ins_pro_len]
- = impl.referencedImplementation.configProperty[x];
- }
-}
-void update_impl_art_ref (Deployment::MonolithicDeploymentDescription
- &mid, int arti_len)
-{
- CORBA::ULong new_art_ref_len (mid.artifactRef.length ());
- mid.artifactRef.length (new_art_ref_len + 1);
- mid.artifactRef[new_art_ref_len] = arti_len;
-}
+ for (CORBA::ULong x = 0; x < pro_len; ++x)
+ {
+ CORBA::ULong impl_pro_len (mid.execParameter.length ());
+ mid.execParameter.length (impl_pro_len + 1);
+ mid.execParameter[impl_pro_len]
+ = impl.referencedImplementation.configProperty[x];
+ CORBA::ULong ins_pro_len (instance.configProperty. length ());
+ instance.configProperty.length (ins_pro_len + 1);
+ instance.configProperty[ins_pro_len]
+ = impl.referencedImplementation.configProperty[x];
+ }
+ }
-void update_artifact_location (Deployment::ImplementationArtifactDescription
- &pack_iad,
- Deployment::ArtifactDeploymentDescription
- &plan_artifact)
-{
- CORBA::ULong loc_len = pack_iad.location.length ();
- for (CORBA::ULong e = 0; e < loc_len; ++e)
- {
- CORBA::ULong art_loc_len (plan_artifact.location.length ());
- plan_artifact.location.length (art_loc_len + 1);
- plan_artifact.location[art_loc_len] = pack_iad.location[e];
- }
-}
+ void
+ update_impl_art_ref (MonolithicDeploymentDescription &mid,
+ int arti_len)
+ {
+ CORBA::ULong new_art_ref_len (mid.artifactRef.length ());
+ mid.artifactRef.length (new_art_ref_len + 1);
+ mid.artifactRef[new_art_ref_len] = arti_len;
+ }
-void update_artifact_property (Deployment::ImplementationArtifactDescription
- &pack_iad,
- Deployment::ArtifactDeploymentDescription
- &plan_artifact)
-{
- CORBA::ULong para_len = pack_iad.execParameter.length ();
- for (CORBA::ULong f = 0; f < para_len; ++f)
- {
- CORBA::ULong art_pro_len (plan_artifact.execParameter.length ());
- plan_artifact.execParameter.length (art_pro_len + 1);
- plan_artifact.execParameter[art_pro_len] = pack_iad.execParameter[f];
- }
+ void
+ update_artifact_location (ImplementationArtifactDescription
+ &pack_iad,
+ ArtifactDeploymentDescription
+ &plan_artifact)
+ {
+ CORBA::ULong loc_len = pack_iad.location.length ();
+ for (CORBA::ULong e = 0; e < loc_len; ++e)
+ {
+ CORBA::ULong art_loc_len (plan_artifact.location.length ());
+ plan_artifact.location.length (art_loc_len + 1);
+ plan_artifact.location[art_loc_len] = pack_iad.location[e];
+ }
+ }
+
+ void
+ update_artifact_property (ImplementationArtifactDescription
+ &pack_iad,
+ ArtifactDeploymentDescription
+ &plan_artifact)
+ {
+ CORBA::ULong para_len = pack_iad.execParameter.length ();
+ for (CORBA::ULong f = 0; f < para_len; ++f)
+ {
+ CORBA::ULong art_pro_len (plan_artifact.execParameter.length ());
+ plan_artifact.execParameter.length (art_pro_len + 1);
+ plan_artifact.execParameter[art_pro_len] = pack_iad.execParameter[f];
+ }
+ }
}
diff --git a/TAO/CIAO/DAnCE/RepositoryManager/Update_Plan.h b/TAO/CIAO/DAnCE/RepositoryManager/Update_Plan.h
index 018a090cb94..3a67955bd2f 100644
--- a/TAO/CIAO/DAnCE/RepositoryManager/Update_Plan.h
+++ b/TAO/CIAO/DAnCE/RepositoryManager/Update_Plan.h
@@ -12,86 +12,101 @@
*
*======================================================================*/
-#ifndef UPDATE_PLAN_H
-#define UPDATE_PLAN_H
+#ifndef CIAO_REPOSITORY_MANAGER_UPDATE_PLAN_H
+#define CIAO_REPOSITORY_MANAGER_UPDATE_PLAN_H
+#include /**/ "ace/pre.h"
-#include "DeploymentC.h"
#include "ace/Hash_Map_Manager.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-class Null_Dom_Document { };
-// exception thrown when we have a null dom document.
-
-typedef ACE_Hash_Map_Manager<ACE_TString, int, ACE_Null_Mutex> REF_MAP;
-typedef ACE_Hash_Map_Manager<int, int, ACE_Null_Mutex> ART_REF_MAP;
-
-void traverse_assembly_instance (Deployment::
- SubcomponentInstantiationDescription
- &instance,
- Deployment::DeploymentPlan &plan, int l,
- REF_MAP &ref_map, REF_MAP &primary_ref_map);
-
-void traverse_assembly (Deployment::ComponentAssemblyDescription &assembly,
- Deployment::DeploymentPlan &plan,
- REF_MAP &ref_map, REF_MAP &primary_ref_map);
-
-void traverse_interface (Deployment::SubcomponentInstantiationDescription
- &instance,
- Deployment::PlanSubcomponentPortEndpoint
- &pspe);
-
-void traverse_assembly_connection (Deployment::ComponentAssemblyDescription
- &assembly,
- Deployment::AssemblyConnectionDescription
- &assembly_connection,
- Deployment::DeploymentPlan &plan);
-
-void traverse_package (Deployment::PackageConfiguration* &pc,
- Deployment::DeploymentPlan &plan,
- REF_MAP &ref_map, REF_MAP &primary_ref_map);
-
-void update_artifacts (Deployment::MonolithicImplementationDescription &mid,
- Deployment::DeploymentPlan &plan,
- Deployment::InstanceDeploymentDescription &instance,
- REF_MAP &ref_map, REF_MAP &primary_ref_map,
- ART_REF_MAP &art_ref_map,
- Deployment::MonolithicDeploymentDescription &mdd);
-
-void update_artifact_location (Deployment::ImplementationArtifactDescription
- &pack_iad,
- Deployment::ArtifactDeploymentDescription
- &plan_artifact);
-
-void update_artifact_property (Deployment::ImplementationArtifactDescription
- &pack_iad,
- Deployment::ArtifactDeploymentDescription
- &plan_artifact);
-
-void update_impl_art_ref (Deployment::MonolithicDeploymentDescription
- &mid, int art_len);
-
-void update_impl_config_property (Deployment::
- PackagedComponentImplementation &impl,
- Deployment::
- MonolithicDeploymentDescription &mid,
- Deployment::
- InstanceDeploymentDescription
- &instance);
-
-void update_common_artifact_and_art_ref (Deployment::
- ImplementationArtifactDescription &pack_iad,
- REF_MAP &primary_ref_map,
- REF_MAP &ref_map,
- ART_REF_MAP &art_ref_map,
- Deployment::MonolithicDeploymentDescription
- &mid,
- Deployment::DeploymentPlan &plan,
- Deployment::
- InstanceDeploymentDescription
- &instance);
+
+namespace Deployment
+{
+ struct SubcomponentInstantiationDescription;
+ struct DeploymentPlan;
+ struct ComponentAssemblyDescription;
+ struct SubcomponentInstantiationDescription;
+ struct AssemblyConnectionDescription;
+}
+
+namespace CIAO
+{
+ class Null_Dom_Document { };
+ // exception thrown when we have a null dom document.
+
+ typedef ACE_Hash_Map_Manager<ACE_TString, int, ACE_Null_Mutex> REF_MAP;
+ typedef ACE_Hash_Map_Manager<int, int, ACE_Null_Mutex> ART_REF_MAP;
+
+ void
+ traverse_assembly_instance (Deployment::
+ SubcomponentInstantiationDescription &instance,
+ Deployment::DeploymentPlan &plan,
+ int l,
+ REF_MAP &ref_map,
+ REF_MAP &primary_ref_map);
+
+ void traverse_assembly (Deployment::ComponentAssemblyDescription &assembly,
+ Deployment::DeploymentPlan &plan,
+ REF_MAP &ref_map, REF_MAP &primary_ref_map);
+
+ void traverse_interface (Deployment::SubcomponentInstantiationDescription
+ &instance,
+ Deployment::PlanSubcomponentPortEndpoint
+ &pspe);
+
+ void traverse_assembly_connection (Deployment::ComponentAssemblyDescription
+ &assembly,
+ Deployment::AssemblyConnectionDescription
+ &assembly_connection,
+ Deployment::DeploymentPlan &plan);
+
+ void traverse_package (Deployment::PackageConfiguration* &pc,
+ Deployment::DeploymentPlan &plan,
+ REF_MAP &ref_map, REF_MAP &primary_ref_map);
+
+ void update_artifacts (Deployment::MonolithicImplementationDescription &mid,
+ Deployment::DeploymentPlan &plan,
+ Deployment::InstanceDeploymentDescription &instance,
+ REF_MAP &ref_map, REF_MAP &primary_ref_map,
+ ART_REF_MAP &art_ref_map,
+ Deployment::MonolithicDeploymentDescription &mdd);
+
+ void update_artifact_location (Deployment::ImplementationArtifactDescription
+ &pack_iad,
+ Deployment::ArtifactDeploymentDescription
+ &plan_artifact);
+
+ void update_artifact_property (Deployment::ImplementationArtifactDescription
+ &pack_iad,
+ Deployment::ArtifactDeploymentDescription
+ &plan_artifact);
+
+ void update_impl_art_ref (Deployment::MonolithicDeploymentDescription
+ &mid, int art_len);
+
+ void update_impl_config_property (Deployment::
+ PackagedComponentImplementation &impl,
+ Deployment::
+ MonolithicDeploymentDescription &mid,
+ Deployment::
+ InstanceDeploymentDescription
+ &instance);
+
+ void update_common_artifact_and_art_ref (Deployment::
+ ImplementationArtifactDescription &pack_iad,
+ REF_MAP &primary_ref_map,
+ REF_MAP &ref_map,
+ ART_REF_MAP &art_ref_map,
+ Deployment::MonolithicDeploymentDescription
+ &mid,
+ Deployment::DeploymentPlan &plan,
+ Deployment::
+ InstanceDeploymentDescription
+ &instance);
+}
#include /**/ "ace/post.h"
-#endif /* UPDATE_PLAN_H */
+#endif /* CIAO_REPOSITORY_MANAGER_UPDATE_PLAN_H*/