diff options
Diffstat (limited to 'TAO/CIAO/docs')
58 files changed, 0 insertions, 9152 deletions
diff --git a/TAO/CIAO/docs/ConfigValues.html b/TAO/CIAO/docs/ConfigValues.html deleted file mode 100644 index 70ade5ca68d..00000000000 --- a/TAO/CIAO/docs/ConfigValues.html +++ /dev/null @@ -1,270 +0,0 @@ -<!-- $Id$ --> -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> <head> -<title>ConfigValues Index</title> -</head> - -<body> - -<h1>Index of ConfigValues</h1> - -<font size="+1" color="red">This page is currently a placeholder for -all the configuration values we will support when creating various CCM -deployment mechanisms, such as ComponentServers and Containers. The -ConfigValues listed here are currently only partially supported in -CIAO. <p> - -Note from self: There are discrepancy in this document. Most -significantly, (RT)ComponentServer's don't get their ConfigValues -directly from that passed in thru -ServerActivator::create_component_server but rather, using some sort -of pre-defined command line flags. -</font> - -<h2>ComponentServer</h2> -The <code>ConfigValues</code> for a <code>ComponentServer</code> are -passed in via <code>ServerActivator::create_component_server</code> -operation. CIAO accepts the following feature names:<p> - -<table border="3" spacing="2" cellpadding="3"> - <tr> - <th>FeatureName</th> - <th>type</th> - <th>Requirement</th> - <th>Remarks</th> - </tr> - <tr> - <td>CIAO-svcconf-id</td> - <td>string</td> - <td> - Optional - </td> - <td> - Specify the canonical svc.conf id. This id should only serve - as a hint for the deployment framework in determining the - actual svc.conf file used to start up the component server. - Currently, CIAO's ServerActivator maintains a set of svc.conf - files and use this id value to map to the exact svc.conf file - name. - </td> - </tr> - <tr> - <td>CIAO-ORB[option]</td> - <td>string</td> - <td> - Optional - </td> - <td> - Specify an ORB option that you want to pass to the - ComponentServer ORB. - </td> - </tr> -</table> - -<h2>RTComponentServer (Real-time ComponentServer)</h2> - -Like a regular <code>ComponentServer</code>, the -<code>ConfigValues</code> for a <code>RTComponentServer</code> are -passed in via <code>ServerActivator::create_component_server</code> -operation. On top of the <code>ConfigValues</code> accepted by the -regular <code>ComponentServer</code>, a real-time ComponentServer also -accepts the following feature names:<p> - -<table border="3" spacing="2" cellpadding="3"> - <tr> - <th>FeatureName</th> - <th>type</th> - <th>Requirement</th> - <th>Remarks</th> - </tr> - <tr> - <td>CIAO-rtcad-filename</td> - <td>string</td> - <td> - Optional - </td> - <td> - Specify the filename of RTCAD extension XML file. - The component server will invoke the XML parser and translate - the content of the file into the following two ConfigValues - (CIAO-RTresources and CIAO-RTPolicySets) to - RTComponentServer implementation. - </td> - </tr> - <tr> - <td>CIAO-RTresources</td> - <td><code>CIAO::RTConfiguration::RTORB_Resources_Info</code></td> - <td> - Optional - </td> - <td> - <code>CIAO::RTConfiguration::RTORB_Resources_Info</code> as - defined in - <code>$CIAO_ROOT/tools/XML_Helpers/RTConfiguration.idl</code> - defines the system wise resources an RT ORB should allocate. - These resources then can be used to define the RT policies in - the RTPolicySet described subsequently. - </td> - </tr> - <tr> - <td>CIAO-RTPolicySets</td> - <td><code>CIAO::RTConfiguration::Policy_Sets</code></td> - <td> - Optional - </td> - <td> - <code>CIAO::RTConfiguration::Policy_Sets</code>, also - defined in - <code>$CIAO_ROOT/tools/XML_Helpers/RTConfiguration.idl</code>, - defines a list of policy sets, which are named sequences of - policies. These policies often refer to the global resources - defined in the previous CIAO-RTresource via names. Likewise, - an <b>RT-container</b> also specifies the RTPolicySet its POA - uses via the name defined here. - </td> - </tr> -</table> - -<h2>Container</h2> -The <code>ConfigValues</code> for a <code>Container</code> are -passed in via <code>ComponentServer::create_container</code> -operation. CIAO accepts the following feature names:<p> - -<table border="3" spacing="2" cellpadding="3"> - <tr> - <th>FeatureName</th> - <th>type</th> - <th>Requirement</th> - <th>Remarks</th> - </tr> - <tr> - <td> - CIAO-Container-Type - </td> - <td> - <code>string</code> - </td> - <td> - currently not supported. - </td> - <td> - Possible value: <code>session</code>, <code>rt-session</code>, - <code>unclassified</code>, <code>rt-unclassified</code>. - </td> - </tr> - - <tr> - <td> - CIAO-POAPolicies - </td> - <td> - <code>CORBA::PolicyList</code> - </td> - <td> - Currently not supported. - </td> - <td> - Must not conflict with CIAO-Container-Type setting. - (Certain containers assume several POA policies.) - </td> - </tr> - - <tr> - <td> - CIAO-RTPolicySet - </td> - <td> - <code>string</code> - </td> - <td> - Optional - </td> - <td> - Name, as defined in RTCompoenentServer's CIAO-RTPolicySets, of - the PolicySet this container uses. - </td> - </tr> -</table> - - -<h2>CCMHome</h2> -The <code>ConfigValues</code> for a <code>CCMHome</code> are -passed in via <code>Container::install_home</code> -operation. CIAO accepts the following feature names:<p> - -<table border="3" spacing="2" cellpadding="3"> - <tr> - <th>FeatureName</th> - <th>type</th> - <th>Requirement</th> - <th>Remarks</th> - </tr> - <tr> - <td>CIAO-executor-path</td> - <td><code>string</code></td> - <td> - REQUIRED - </td> - <td> - This string value specifies the location of the executor DLL. - In the future, we should use UUIDs to identify the component - executors and query the ComponentInstallation interface for - the actual location of the DLL. - </td> - </tr> - <tr> - <td>CIAO-executor-entrypt</td> - <td><code>string</code></td> - <td> - REQUIRED - </td> - <td> - This string value specifies the entry point of the executor - DLL. It points to a factory function for the component executor. - </td> - </tr> - <tr> - <td>CIAO-servant-path</td> - <td><code>string</code></td> - <td> - REQUIRED - </td> - <td> - This string value specifies the location of the servant DLL. - In the future, we should use UUIDs to identify the component - servants and query the ComponentInstallation interface for - the actual location of the DLL. <p> - - Servant are part of the Container framework and we can use - type checking to ensure servant and container match with each - other. - </td> - </tr> - <tr> - <td>CIAO-executor-entrypt</td> - <td><code>string</code></td> - <td> - REQUIRED - </td> - <td> - This string value specifies the entry point of the servant - DLL. It points to a factory function for the compnent servant. - </td> - </tr> -</table> - -<!-- - <tr> - <td> - a - </td> - <td> - b - </td> - <td> - c - </td> - </tr> ---> -<!--#include virtual="/~nanbor/signature.html" --> -</body> </html> diff --git a/TAO/CIAO/docs/EnvVars.html b/TAO/CIAO/docs/EnvVars.html deleted file mode 100644 index 13c7a260694..00000000000 --- a/TAO/CIAO/docs/EnvVars.html +++ /dev/null @@ -1,39 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<!-- $Id$ --> -<html> <head> -<title>Environment Variables used by CIAO</title> -</head> - -<body> -<h1>Environment Variables used by CIAO</h1> - -<ul> -<!-- <li><b><code></code></b><p> --> - <li><b><code>CIAO_DEBUG_LEVEL</code></b>: An interger value - accessible using <CODE>CIAO::debug_level()</CODE> call. - Currently, CIAO follow the following usage - conventions: - <ul> - <li> 20 < debug_level ≤ 20: Generate CIAO internal - debug messages - <li> 10 < debug_level ≤ 20: Generate CIAO tools - debug messages - <li> 0 < debug_level ≤ 10: Generate component-level - debug messages - </ul> <p> - - <li><b><code>CIAO_FIFO_SCHED</code></b>: Defining this Env. Var to 1 - will trigger ComponentServer to run in FIFO scheduling class.<p> - - <li><B><CODE>CIAO_DUMP_SAMPLE_HISTORY</CODE></B>: This environment - variable was added for lack of component configuration support. - Set it to 1 to turn on the dumping of performance samples to - stdout in some performance test components.<p> -</ul> - -<hr> -<address>Nanbor Wang</address> -<!-- hhmts start --> -Last modified: Sun Nov 30 20:29:14 Mountain Standard Time 2003 -<!-- hhmts end --> -</body> </html> diff --git a/TAO/CIAO/docs/RT-Extension.html b/TAO/CIAO/docs/RT-Extension.html deleted file mode 100644 index 3414a30b78e..00000000000 --- a/TAO/CIAO/docs/RT-Extension.html +++ /dev/null @@ -1,132 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<!-- $Id$ --> -<html> <head> -<title>Using the Real-time Extension in CIAO</title> -</head> - -<body> -<h1>Using the Real-time Extension in CIAO</h1> - -<!-- ============================================================ --> -<h3>Abstract</H3> - -The real-time extension support in CIAO enables application developers -to deploy real-time applications by specifying real-time -configurations as XML descriptors without modifying the component -implementation. In fact, embedding the real-time configuration -policies in component implementations decrease the reusability of the -software components. - -Different types of real-time policy can be applied at different -stage of the component development lifecycle, e.g., -<ul> - <li>Component implementation - <li>Component packaging - <li>Application composition - <li>Target platform configuration - <li>Deployment configuration -</ul> - -Real-time policies can also be applied to various scope in an -applications, e.g., many real-time policies can be associate with some -or all of the following ORB mechanisms: -<ul> - <li>ORBs - <li>POAs - <li>Threads - <li>Object references -</ul> - -<!-- ============================================================ --> -<h3>CIAO's Real-time Extension</h3> - -CIAO extends CCM's assembly descriptor to support the specifications -of real-time policies. This mechanism allows you to allocate -resources that are global to a RTComponentServer and to define real-time -policies required by a component installation. Currently, CIAO -support configuration of certain real-time policies at the POA level, -i.e., in CCM's terminology, the container level. These policies -include: - -<ol> - <li>Priority Model Policy - <li>Threadpool Policy - <li>Banded Connection Policy -</ol> - -The kind of resources that are global to a RT component server that CIAO -real-time extension specifies include: - -<ol> - <li>Threadpool - <li>Threadpool with lanes - <li>Connection bands -</ol> - -<!-- ============================================================ --> -<h3>Using the CIAO Real-time Extension</h3> - -Application developers can define the aforementioned Real-Time -extension Descriptor (.rtd file) that CIAO defines to allocate -resources and specify real-time policies. The Document Type -Definition (DTD) for the real-time extension description is defined in -this <a href="XML/ciao_rt_cad_ext.dtd">file</a>. Each .RTD file -specifies the required resources and the policy definitions within a -RTComponentServer. - -A RTComponentServer can be associated to a .RTD file. This is done by -using the "extension" element with "class" attributed set to -"RT-CAD-EXT", within a processcollocation or hostcollocation element. -Here is an example: -<code><pre> - - <processcollocation> - . - . - . - <extension class="RT-CAD-EXT" origin="CIAO">somefile.rtd</extension> - . - </processcollocation> -</pre></code> - -Each .RTD file contains the two major subelements: -<ul> - <li><rtresources>: defines all the RT resources the assciating - RTComponentServer should provide. - <li><rtpolicysets>: defines named collections of policies - (<rtpolicyset>) that apply to component installations in - the RTComponentServer. -</ul> - -The <rtpolicyset>'s defined in the .RTD file can be associated -to a component installation, i.e., a component placement within the -RTComponentServer to which the .RTD file is associated. For example, - -<code><pre> - <homeplacement> - . - . - , - <extension class="RT-POLICY-SET" - origin="CIAO">A_POLICY_NAME</extension> - . - </homeplacement> -</pre></code> - -<h3>Future Addition</h3> - -As mentioned earlier, RT policies can be applied at various stages of -component-based deployment lifecycle and at different scope. For -example, applying RTpolicies at the ORB level, or at the object -reference level of a component receptacle. These extensions involve -at least, extending the "appropriate" XML descriptor definition and -extending the CIAO runtime, including core and/or the CIDL generated -code to configure the policies. How other RT-related policies can be -added will be reviewed in my thesis available shortly. - -<hr> -<address>Nanbor Wang</address> -<!-- hhmts start --> -Last modified: Sun Nov 30 19:23:25 Mountain Standard Time 2003 -<!-- hhmts end --> -</body> </html> diff --git a/TAO/CIAO/docs/TODO.html b/TAO/CIAO/docs/TODO.html deleted file mode 100644 index 0b7ff8fd774..00000000000 --- a/TAO/CIAO/docs/TODO.html +++ /dev/null @@ -1,259 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><p> -<!-- $Id$ --> -<html> <head> -<title>Component-Integrated ACE ORB - TODO list</title> -</head> - -<body> -<h1>Component-Integrated ACE ORB (CIAO) - TODO list</h1> - -The following is a prioritized list of things (with the highest -priority items first) that the DOC group is working on. The expected -date of accomplishments are also added as ETA (expected time of -accomplishment) : - -<h3>Things to do:</h3> -<ul> - <li> Integrate TAO's real-time event channel within the - container. Components can use this feature to communicate using - <CODE>eventtype</CODE>s a pub-sub mode. The code is available in a - branch and it needs to be integrated in to the main-trunk. (ETA - - 2004/08) - </li> <p> - - <li> Allow components (i.e., assemblies) to be connected using the - NameService (ETA - 2004/08) </li> <p> - - <li> Allow non-component enabled clients to access reference to a - component or an assembly using NameService (ETA - 2004/08) </li> <p> - - <li>Allowing components to set attributes, atleast attributes of - basic types. As a first step we need to implement the - <CODE>StandardConfigurator</CODE> interface. The servant for the - <CODE> StandardConfigurator</CODE> interface should be implemented - and activated by the servant for the component. DAnCE can extract - the reference from the servant and use it to set attributes (ETA - - 2004/08)</li><p> - -<li>Now that we have supports for ccm_{activate,passivate,remove}, we - need to rethink how a container manages the lifecycle of all the - components/homes it hosts so all the servants related to a - component get destroyed "properly". The aforementioned - SessionComponent operations will also depend on the proper - lifecycle management. <p> - - This includes making sure all components' appropriate - ccm_passivate and ccm_remove operations are called when the - ComponentServer is closing down.<p> (ETA - 2004/08) </li> - - <li> Migrate RT features from RTComponentServer to DAnCE - (ETA - 2004/10) </li> <p> - - <li> Static configuration of components using DAnCE (ETA - 2004/12) - </li> <p> - - <li>We need a set of tests to make sure most (and later - all) of the data types are function correctly (in term of CIDL - generated code). More importantly, we need to make sure all the - component keywords are supported okay. (ETA - 2004/07)<p> - - <li>The naming convention used in <a - href="new_component.html">creating new component - instructions</a> and that used in <a - href="templates/">templates</a> do not match. (Files containing - glue code are named *_svnt.* and *GS.* respectively.) We need - to address that.(ETA - 07/2004) <p> </li> - - <li> Retire the old assembly and deployment framework (ETA - - 2004/10) </li> - - <li>We need to review the implementation of servant glue code and - container implementations to make sure that they are - thread-safe, if the container calls for it. Currently, these - states are changed only by the deployment framework which always - runs in single thread, so it's not a serious problem. However, - it's perfectly legal to dynamically configure connnections, which - will be the case if we want to add new components or remove - components from the assembly.(ETA - 2004/09)<p> - - <li> Add support for creating a thread pool within the the component - server. We don't have support for this, which has made our users - resort to spawning threads within the components, which breaks - portability of the executor code. (ETA - 2004/09) </li> <p> - - <li> At present components in an assembly have no way of knowing - whether the assembly is complete or not. This becomes important when - there are hierarchical assemblies, and the assembly at a higher - level needs to pass on attrbute information to the assembly at a - lower level. The spec talks about <CODE> configuration_complete () - </CODE> whose semantics are a bit unclear. We may have to use this - to inform the components that the configuration is infact - complete. (ETA - 2004/09)</li><p> - - <li> We have now two proprietary methods in the <CODE> - SessionComponent </CODE> interface called <CODE> ciao_preactivate () - </CODE> and <CODE> ciao_postactivate () </CODE> which has to be - overridden by the executor code irrespective of whether the executor - implements them or not. These were added to help components to know - activation status of other components in the assembly. This could - create problems for interoperability of the executor code. A better - to way is to have the CIDL generate C++ code instead of executor IDL. - The generated C++ code from the CIDL could provide default - implementations which could be overridden by the executor code if so - desired. This would make the executor code more portable. Obviously - we also should retain executor IDL generation using some command line - options. (ETA - 2004/09). </li> <p> - -<li> Need to develop tools that would allow components to be added - dynamically to an existing assembly and remove components - dynamically from an existing assembly (ETA - 2004/12) <li> <p>. - -<li>The CCM_Core libraries need to be refactored so regular CIAO - users no longer need to link to CIAO_Server but to - CIAO_Container library instead. Currently, the session - container implementation is throwing exceptions from the - deployment modules when it fails to install a home. But these - feature should really be implmented in the Deployment::Container - interface instead. (ETA - 2004/12)<p> - -<li>HomeRegistrar related files from the CCM_Core projects have - been removed. We need to move them into a new directory when we - get to a new HomeFinder/HomeRegistrar implementation. Notice - that the deployment framework will need to use the HomeRegistrar - interface to register components/homes. (ETA - 2004/12)<p> - -<li>We should add support for the unclassified container and use the - property file of some sort to configure the empty container.<p> - - Process component (which have 1:1 servant to OID mapping) might - be useful too (no need to support PSS in this case?)<p> - - Persistent object references/IDs can be useful for statically - configured DRE systems as they eliminate the initial handshakes - in a multi-process system and enable each process to start up - independently. (ETA - Not known) <p> - - <li>The new <code>generate_component_mpc.pl</code> script should - invoke the <code>generate_export_file.pl</code> automatically - and created the necessary export files instead of only printing - out the hints on how to do that. (ETA - Not known)<p> - - <li>We need a ConfigValues parser for extracting common name-value - info out of a ConfigValues sequence. This would be needed if - components have to set complex user defined types as attributes. - (ETA - not known). </li><p> - - <li><b>Container Factory</b>: We need to provide a container factory - interface to decide what kind of container we need to use. Hmm, - isn't this the job of <code>ComponentServer</code> interface? - (ETA - not known)</li><p> - - <li><b>ComponentInstallation</b>: This is a simple interface that - provides (UUID, Location) mappings. Both UUID and Location are - of string type. Since ACE supports UUID implementation, we can - probably use that to generate a UUID. Location should be URI, but - let's just map that to locations in filesystem (pathnames) for - now. So we will most likely need to provide more downloading - mechanisms in the future, e.g., http, ftp, etc. <p> - - ComponentInstallation is the interface assembly mechanism used - to interact with the deployment mechanism. We are free to - implement the deployment mechanism (i.e., shipping of code to - various locations of application domains) the way we like but - the assembly mechanism depends on this interface to determine - where to fetch a specific implementation.<p> - - One thing that we really need is an installation tool set which - can be used to manage remote installation, by parsing various - XML descriptors and either push or pull the right implmentation - for a certain host in the list of hosts the component need to be - installed. According to the CCM spec., ComponentInstallation - interface implementation can retrieve a implementation (DLL) on - an on-demand basis. Therefore, there is probably no need to - push the appropriate DLL over right away when we feed some - descriptors into the installation tool. The tool, however, - should accurately extract the correct OS/compiler information - and inform the ComponentInstallation impl which and where to - fetch the right implmentation for the host it is running on. (ETA - not - known)<p> - <li><b>CIDL Compiler</b>: - There are no immediate plans to support the part of CIDL - corresponding to the OMG Persistent State Definition Langauge - (PSDL). For an up-to-date status of the CIDL, please see - $CIAO_ROOT/CCF/Documentation/TODO. - - <li> This is a set of the to-do associated with the DAnCE implementation. - <p> - <ul> - <li>We need to put the ComponentServer layer back in. In the current - implementation we use NodeApplication as both the Session Container - and the ComponentServer. We need to seperate the two - entities so we can hook any Container with the - ComponentServer. This change is essential to the RT - configuration and for the future of CIAO.<p> - - <li>Bala added ciao_[pre|post]_activate to the Session Component to - force the order of actions upon start-up, but this will not - work with the new DnC framework. We need to change the DnC framework - a bit to make this feature available again.<p> - - <li>We need to work on the Resource Management process in - DAnCE. Right now this part of the DnC spec is omitted in our - implementation.<p> - - <li>We need to work on the packaging process more so we can ship - binaries around when the dll/so is not available in the - local node.<p> - </ul> - -</ul> - -<h3>Cool ideas</h3> -<ul> - <li>Currently, developing a component will create 3 DLLs, one for - the client side stuff, one for the servant glue code, and one - for the executors. We need to figure out a way to automate - these stuff. MPC is a good starting point to generate scripts - to create project templates.<p> - - <li>Management of <code>ComponentInstallation</code> can be done - using a CORBAscript of some sort as this involve mostly - registering and unregistering of locations of component - implementations.<p> -</ul> - -<h3>Finished Work</h3> -<ul> - <li>The exception returned from CIAO_Daemon when it fails to - locate a DLL is quite useless to say the least. It needs - fixing.<p> - - CIAO now provides more meaningful error message now.<p> - - <li>We should create a new workspace/target in TAO such as CIAO_ONLY - to simplify the process of using CIAO. Currently, you have to - checkout the README file in CIAO_ROOT to figure out what TAO - modules are required by CIAO.<p> - - A new target "CIAO_Core" is now available in ACE's top level - Makefile.<p> - - <li>We need better debug info and a way to control how different - level of debug info are generated in CIAO.<p> Some preliminary - support using the <a href="EnvVars.html">environment - variable</a> <code>CIAO_DEBUG_LEVEL</code> has been added.<P> - - <li>Miminal implementation of CIDL compiler.<p> - - <li>CCM core workspace now contains 3 different DLLs: - <UL> - <li>CCM_Client - Needed by CCM-awared client - <li>CCM_Container - Needed by executors and servers - <li>CCM_Server - Needed by servers and CIAO tools - </UL><p> - - <li>A SessionContainer implementation.<p> - -</ul> - -</body> </html> diff --git a/TAO/CIAO/docs/XML/ciao_rt_cad_ext.dtd b/TAO/CIAO/docs/XML/ciao_rt_cad_ext.dtd deleted file mode 100644 index 7877afe2151..00000000000 --- a/TAO/CIAO/docs/XML/ciao_rt_cad_ext.dtd +++ /dev/null @@ -1,93 +0,0 @@ -<!-- - $Id$ - - DTD for CIAO ComponentAssembly real-time extension. - The extension for this type of XML document should be .RTD - - A component server can be associated to one conforming XML - descriptor file of this DTD via the <extension> tag under - <hostcollocation>, <processcollocation> as - - <extension class="RT-CAD-EXT" - origin="CIAO">pathname_to_xml_file.xml</extension> - - The root element is <rtcad-ext>. - - The <extension> tag under <homeplacement> element can be used to - specify the <rtpolicyset> named in this file (using rtpolicyset's - id attribute.) For example, - - <extension class="RT-POLICY-SET" - origin="CIAO">IDREF_of_some_rtpolicyset</extension> - ---> - -<!ELEMENT rtcad_ext ( rtresources?, rtpolicyset+ ) > - -<!-- RT Resources grammar definitions --> - -<!ELEMENT rtresources (threadpool | threadpoolwithlanes | connectionbands)* > - -<!ELEMENT threadpool EMPTY> -<!ATTLIST threadpool - id ID #REQUIRED - stacksize CDATA #REQUIRED - static_threads CDATA #REQUIRED - dynamic_threads CDATA #REQUIRED - priority CDATA #REQUIRED - buffering (yes | no) #REQUIRED - max_buffer CDATA #REQUIRED - buffer_size CDATA #REQUIRED > - -<!ELEMENT threadpoolwithlanes (lane+) > -<!ATTLIST threadpoolwithlanes - id ID #REQUIRED - stacksize CDATA #REQUIRED - borrowing (yes | no) #REQUIRED - buffering (yes | no) #REQUIRED - max_buffer CDATA #REQUIRED - buffer_size CDATA #REQUIRED > - -<!ELEMENT lane EMPTY> -<!ATTLIST lane - priority CDATA #REQUIRED - static_threads CDATA #REQUIRED - dynamic_threads CDATA #REQUIRED > - -<!ELEMENT connectionbands (band+) > -<!ATTLIST connectionbands - id ID #REQUIRED > - -<!ELEMENT band EMPTY> -<!ATTLIST band - low CDATA #REQUIRED - high CDATA #REQUIRED > - -<!-- RT Policy_Set grammar definitions --> -<!-- Each type of policy in rtpoliyset can only appear once --> -<!ELEMENT rtpolicyset (priority_model_policy, - threadpool_policy, - banded_connection_policy)+ > -<!ATTLIST rtpolicyset - id ID #REQUIRED> - -<!ELEMENT priority_model_policy EMPTY> -<!ATTLIST priority_model_policy - type (server_declared | client_propagated) #REQUIRED - priority CDATA #REQUIRED> - -<!ELEMENT threadpool_policy EMPTY> -<!-- - "idref" must be previously defined by the id attribute of - either <threadpool> or <threadpoollanes> element ---> -<!ATTLIST threadpool_policy - idref IDREF #REQUIRED> - -<!ELEMENT banded_connection_policy EMPTY> -<!-- - "idref" must be previously defined by the id attribute of - <connectionbands> element. ---> -<!ATTLIST banded_connection_policy - idref IDREF #REQUIRED>
\ No newline at end of file diff --git a/TAO/CIAO/docs/XML/componentassembly.dtd b/TAO/CIAO/docs/XML/componentassembly.dtd deleted file mode 100644 index d61fb47505f..00000000000 --- a/TAO/CIAO/docs/XML/componentassembly.dtd +++ /dev/null @@ -1,367 +0,0 @@ -<!-- DTD for Component Assembly Descriptor. The root element - is <componentassembly>. Elements are listed - alphabetically. - --> - -<!-- Simple xml link attributes based on W3C WD-xlink-19980303. - May change slightly when XLL is finalized. - --> -<!ENTITY % simple-link-attributes " - xml:link CDATA #FIXED 'SIMPLE' - href CDATA #REQUIRED -" > - -<!ELEMENT componentassembly - ( description? - , componentfiles - , partitioning - , connections? - , extension* - ) > -<!ATTLIST componentassembly - id ID #REQUIRED - derivedfrom CDATA #IMPLIED > - -<!-- If file not available locally, then download via codebase link --> -<!ELEMENT codebase EMPTY > -<!ATTLIST codebase - filename CDATA #IMPLIED - %simple-link-attributes; > - -<!ELEMENT componentfile - ( fileinarchive - | codebase - | link - ) > -<!ATTLIST componentfile - id ID #REQUIRED - type CDATA #IMPLIED > - -<!ELEMENT componentfileref EMPTY > -<!ATTLIST componentfileref - idref CDATA #REQUIRED > - -<!ELEMENT componentfiles - ( componentfile+ - ) > - -<!ELEMENT componentimplref EMPTY > -<!ATTLIST componentimplref - idref CDATA #REQUIRED > - -<!ELEMENT componentinstantiation - ( usagename? - , componentproperties? - , registercomponent* - , extension* - ) > -<!ATTLIST componentinstantiation - id ID #REQUIRED > - -<!ELEMENT componentinstantiationref EMPTY > -<!ATTLIST componentinstantiationref - idref CDATA #REQUIRED > - -<!ELEMENT componentproperties - ( fileinarchive - | codebase - ) > - -<!ELEMENT componentsupportedinterface - ( componentinstantiationref - | findby - )> - -<!ELEMENT connectevent - ( ( consumesport - | existinginterface - ) - , ( emitsport - | publishesport - ) - ) > -<!ATTLIST connectevent - id ID #IMPLIED > - -<!ELEMENT connecthomes - ( proxyhome - , destinationhome - ) > -<!ATTLIST connecthomes - id ID #IMPLIED > - -<!ELEMENT connectinterface - ( usesport - , ( providesport - | componentsupportedinterface - | existinginterface - | homeinterface - ) - ) > -<!ATTLIST connectinterface - id ID #IMPLIED > - -<!ELEMENT connections - ( connectinterface - | connectevent - | connecthomes - | extension - )* > - -<!ELEMENT consumesidentifier ( #PCDATA ) > - -<!ELEMENT consumesport - ( consumesidentifier - , ( componentinstantiationref - | findby - ) - )> - -<!ELEMENT description ( #PCDATA ) > - -<!ELEMENT destination ( #PCDATA ) > - -<!ELEMENT destinationhome - ( homeplacementref - | findby - ) > - -<!ELEMENT emitsidentifier ( #PCDATA ) > - -<!ELEMENT emitsport - ( emitsidentifier - , ( componentinstantiationref - | findby - ) - )> - -<!ELEMENT executableplacement - ( usagename? - , componentfileref - , componentimplref? - , invocation? - , destination? - , extension* - ) > -<!ATTLIST executableplacement - id ID #REQUIRED - cardinality CDATA "1" > - -<!ELEMENT existinginterface - ( findby )> - -<!-- The "extension" element is used for vendor-specific extensions --> -<!ELEMENT extension (#PCDATA) > -<!ATTLIST extension - class CDATA #REQUIRED - origin CDATA #REQUIRED - id ID #IMPLIED - extra CDATA #IMPLIED - html-form CDATA #IMPLIED > - -<!-- The "fileinarchive" element is used to specify a file in the archive. - If the file is independent of an archive then link is used to point to - the archive in which the file may be found. - --> -<!ELEMENT fileinarchive - ( link? ) > -<!ATTLIST fileinarchive - name CDATA #REQUIRED > - -<!ELEMENT findby - ( namingservice - | stringifiedobjectref - | traderquery - | homefinder - | extension - ) > - -<!ELEMENT homefinder EMPTY > -<!ATTLIST homefinder - name CDATA #REQUIRED > - -<!ELEMENT homeinterface - ( homeplacementref - | findby - )> - -<!ELEMENT homeplacement - ( usagename? - , componentfileref - , componentimplref? - , homeproperties? - , componentproperties? - , registerwithhomefinder* - , registerwithnaming* - , registerwithtrader* - , componentinstantiation* - , destination? - , extension* - ) > -<!ATTLIST homeplacement - id ID #REQUIRED - cardinality CDATA "1" > - -<!ELEMENT homeplacementref EMPTY > -<!ATTLIST homeplacementref - idref CDATA #REQUIRED > - -<!ELEMENT homeproperties - ( fileinarchive - | codebase - ) > - -<!ELEMENT hostcollocation - ( usagename? - , impltype? - , ( homeplacement - | executableplacement - | processcollocation - | extension - )+ - , destination? - ) > -<!ATTLIST hostcollocation - id ID #IMPLIED - cardinality CDATA "1" > - -<!ELEMENT impltype EMPTY > -<!ATTLIST impltype - language CDATA #REQUIRED - version CDATA #IMPLIED > - -<!ELEMENT invocation EMPTY > -<!ATTLIST invocation - args CDATA #REQUIRED > - -<!ELEMENT link ( #PCDATA ) > -<!ATTLIST link - %simple-link-attributes; > - -<!ELEMENT namingservice EMPTY > -<!ATTLIST namingservice - name CDATA #REQUIRED > - -<!ELEMENT partitioning - ( homeplacement - | executableplacement - | processcollocation - | hostcollocation - | extension - )* > - -<!ELEMENT processcollocation - ( usagename? - , impltype? - , ( homeplacement - | extension - )+ - , destination? - ) > -<!ATTLIST processcollocation - id ID #IMPLIED - cardinality CDATA "1" > - -<!ELEMENT providesidentifier ( #PCDATA ) > - -<!ELEMENT providesport - ( providesidentifier - , ( componentinstantiationref - | findby - ) - ) > - -<!ELEMENT proxyhome - ( homeplacementref - | findby - ) > - -<!ELEMENT publishesidentifier ( #PCDATA ) > - -<!ELEMENT publishesport - ( publishesidentifier - , ( componentinstantiationref - | findby - ) - ) > - -<!ELEMENT registercomponent - ( ( providesidentifier - | consumesidentifier - )? - , ( registerwithnaming - | registerwithtrader - )+ - ) > - -<!ELEMENT registerwithhomefinder EMPTY > -<!ATTLIST registerwithhomefinder - name CDATA #REQUIRED > - -<!ELEMENT registerwithnaming EMPTY > -<!ATTLIST registerwithnaming - name CDATA #IMPLIED > - -<!ELEMENT registerwithtrader - ( traderexport ) > -<!ATTLIST registerwithtrader - tradername CDATA #IMPLIED > - -<!-- DEVNOTE: is tradername necessary? --> -<!-- DEVNOTE: Should trader properties be specified in component file? - And in assembly file? --> - -<!ELEMENT stringifiedobjectref ( #PCDATA ) > - -<!ELEMENT traderconstraint ( #PCDATA ) > - -<!ELEMENT traderexport - ( traderservicetypename - , traderproperties - ) > - -<!ELEMENT traderpolicy - ( traderpolicyname - , traderpolicyvalue - ) > - -<!ELEMENT traderpolicyname ( #PCDATA ) > - -<!ELEMENT traderpolicyvalue ( #PCDATA ) > - -<!ELEMENT traderpreference ( #PCDATA ) > - -<!ELEMENT traderproperties - ( traderproperty+ ) > - -<!ELEMENT traderproperty - ( traderpropertyname - , traderpropertyvalue - ) > - -<!ELEMENT traderpropertyname ( #PCDATA ) > - -<!ELEMENT traderpropertyvalue ( #PCDATA ) > - -<!ELEMENT traderquery - ( traderservicetypename - , traderconstraint - , traderpreference? - , traderpolicy* - , traderspecifiedprop* - ) > - -<!ELEMENT traderservicetypename ( #PCDATA ) > - -<!ELEMENT traderspecifiedprop ( #PCDATA ) > - -<!ELEMENT usagename ( #PCDATA ) > - -<!ELEMENT usesidentifier ( #PCDATA ) > - -<!ELEMENT usesport - ( usesidentifier - , ( componentinstantiationref - | findby - ) - ) > diff --git a/TAO/CIAO/docs/XML/corbacomponent.dtd b/TAO/CIAO/docs/XML/corbacomponent.dtd deleted file mode 100644 index fd5ec98f377..00000000000 --- a/TAO/CIAO/docs/XML/corbacomponent.dtd +++ /dev/null @@ -1,316 +0,0 @@ -<!-- DTD for CORBA Component Descriptor. The root element is - <corbacomponent>. Elements are listed alphabetically. ---> - -<!-- Simple xml link attributes based on W3C WD-xlink-19980303. - May change when XLL is finalized. --> - -<!ENTITY % simple-link-attributes " - xml:link CDATA #FIXED 'SIMPLE' - href CDATA #REQUIRED -"> - -<!ELEMENT accessmode EMPTY> -<!ATTLIST accessmode - mode (READ_ONLY|READ_WRITE) #REQUIRED > - -<!ELEMENT componentfeatures - ( inheritscomponent? - , supportsinterface* - , ports - , operationpolicies? - , extension* - ) > -<!ATTLIST componentfeatures - name CDATA #REQUIRED - repid CDATA #REQUIRED > - -<!ELEMENT componentkind - ( service - | session - | process - | entity - | unclassified - ) > - -<!ELEMENT componentproperties - ( fileinarchive - ) > - -<!ELEMENT componentrepid EMPTY > -<!ATTLIST componentrepid - repid CDATA #IMPLIED > - -<!ELEMENT containermanagedpersistence - ( storagehome - , pssimplementation? - , accessmode - , psstransaction - , params? - ) > - -<!ELEMENT configurationcomplete EMPTY > -<!ATTLIST configurationcomplete - set ( true | false ) #REQUIRED > - -<!ELEMENT consumes - ( eventpolicy - , extension* ) > -<!ATTLIST consumes - consumesname CDATA #REQUIRED - eventtype CDATA #REQUIRED > - -<!ELEMENT corbacomponent - ( corbaversion - , cormponentrepid - , homerepid - , componentkind - , interop? - , transaction? - , security? - , threading - , configurationcomplete - , extendedpoapolicy* - , repository? - , segment* - , componentproperties? - , homeproperties? - , homefeatures+ - , componentfeatures+ - , interface* - , extension* - ) > - -<!ELEMENT corbaversion (#PCDATA) > - -<!ELEMENT description ( #PCDATA ) > - -<!ELEMENT emits - ( eventpolicy - , extension* ) > -<!ATTLIST emits - emitsname CDATA #REQUIRED - eventtype CDATA #REQUIRED > - -<!ELEMENT entity - ( servant ) > - -<!ELEMENT eventpolicy EMPTY> -<!ATTLIST eventpolicy - policy ( normal | default | transaction ) #IMPLIED> - -<!ELEMENT extendedpoapolicy EMPTY> -<!ATTLIST extendedpoapolicy - name CDATA #REQUIRED - value CDATA #REQUIRED > - -<!-- The "extension" element is used for vendor-specific extensions --> -<!ELEMENT extension (#PCDATA) > -<!ATTLIST extension - class CDATA #REQUIRED - origin CDATA #REQUIRED - id ID #IMPLIED - extra CDATA #IMPLIED - html-form CDATA #IMPLIED > - -<!-- The "fileinarchive" element is used to specify a file in the - archive. If the file is in another archive then link is used to - point to the archive in which the file may be found. - --> -<!ELEMENT fileinarchive - ( link? ) > -<!ATTLIST fileinarchive - name CDATA #REQUIRED > - -<!ELEMENT homefeatures - ( inheritshome? - , operationpolicies? - , extension* ) > -<!ATTLIST homefeatures - name CDATA #REQUIRED - repid CDATA #REQUIRED > - -<!ELEMENT homeproperties - ( fileinarchive - ) > - -<!ELEMENT homerepid EMPTY > -<!ATTLIST homerepid - repid CDATA #IMPLIED > - -<!ELEMENT inheritscomponent EMPTY> -<!ATTLIST inheritscomponent - repid CDATA #REQUIRED> - -<!ELEMENT inheritshome EMPTY> -<!ATTLIST inheritshome - repid CDATA #REQUIRED> - -<!ELEMENT inheritsinterface EMPTY> -<!ATTLIST inheritsinterface - repid CDATA #REQUIRED> - -<!ELEMENT ins EMPTY> -<!ATTLIST ins - name CDATA #REQUIRED > - -<!ELEMENT interface - ( inheritsinterface* - , operationpolicies? ) > -<!ATTLIST interface - name CDATA #REQUIRED - repid CDATA #REQUIRED > - -<!ELEMENT interop EMPTY> -<!ATTLIST interop - type CDATA #REQUIRED - direction ( hasview | isview ) #REQUIRED - descriptor CDATA #REQUIRED > - -<!ELEMENT link ( #PCDATA ) > -<!ATTLIST link - %simple-link-attributes; > - -<!ELEMENT objref EMPTY> -<!ATTLIST objref - string CDATA #REQUIRED > - -<!ELEMENT operation - ( transaction? - , requiredrights? ) > -<!ATTLIST operation - name CDATA #REQUIRED > - -<!-- an operation name of "*" specifies all operations in the current -scope --> -<!ELEMENT operationpolicies - ( operation+ ) > - -<!ELEMENT param EMPTY > -<!ATTLIST param - name CDATA #REQUIRED - value CDATA #REQUIRED > - -<!ELEMENT params (param+) > - -<!ELEMENT poapolicies EMPTY> -<!ATTLIST poapolicies - thread (ORB_CTRL_MODEL | SINGLE_THREAD_SAFE ) #REQUIRED - lifespan (TRANSIENT | PERSISTENT ) #REQUIRED - iduniqueness (UNIQUE_ID | MULTIPLE_ID) #REQUIRED - idassignment (USER_ID | SYSTEM_ID) #REQUIRED - servantretention (RETAIN | NON_RETAIN) #REQUIRED - requestprocessing (USE_ACTIVE_OBJECT_MAP_ONLY - |USE_DEFAULT_SERVANT - |USE_SERVANT_MANAGER) #REQUIRED - implicitactivation (IMPLICIT_ACTIVATION - |NON_IMPLICIT_ACTIVATION) #REQUIRED > - -<!ELEMENT ports - ( uses - | provides - | emits - | publishes - | consumes - )* > - -<!ELEMENT process - ( servant ) > - -<!ELEMENT provides - ( operationpolicies? - , extension* ) > -<!ATTLIST provides - providesname CDATA #REQUIRED - repid CDATA #REQUIRED - facettag CDATA #REQUIRED > - -<!ELEMENT pssimplementation EMPTY> -<!ATTLIST pssimplementation - id CDATA #REQUIRED > - -<!ELEMENT psstransaction (psstransactionisolationlevel?) > -<!ATTLIST psstransaction - policy (TRANSACTIONAL|NON_TRANSACTIONAL) #REQUIRED > - -<!ELEMENT psstransactionisolationlevel EMPTY> -<!ATTLIST psstransactionisolationlevel - level (READ_UNCOMMITTED|READ_COMMITTED|REPEATABLE_READ|SERIALIZABLE) - #REQUIRED > - -<!ELEMENT publishes - ( eventpolicy - , extension* ) > -<!ATTLIST publishes - publishesname CDATA #REQUIRED - eventtype CDATA #REQUIRED > - -<!ELEMENT repository - ( ins - | objref - | link - ) > -<!ATTLIST repository - type CDATA #IMPLIED > - -<!ELEMENT requiredrights - ( right* ) > - -<!ELEMENT right - ( description? ) > -<!ATTLIST right - name CDATA #REQUIRED > - -<!ELEMENT security - ( requiredrights? ) > -<!ATTLIST security - rightsfamily CDATA #REQUIRED - rightscombinator (secallrights | secanyrights) #REQUIRED > - -<!ELEMENT segment - ( segmentmember+ - , containermanagedpersistence? - , extension* - ) > -<!ATTLIST segment - name CDATA #REQUIRED - segmenttag CDATA #REQUIRED > - -<!ELEMENT segmentmember EMPTY> -<!ATTLIST segmentmember - facettag CDATA #REQUIRED > - -<!ELEMENT servant EMPTY > -<!ATTLIST servant - lifetime (component|method|transaction|container) #REQUIRED > - -<!ELEMENT service EMPTY > - -<!ELEMENT session - ( servant ) > - -<!ELEMENT storagehome EMPTY> -<!ATTLIST storagehome - id CDATA #REQUIRED > - -<!ELEMENT supportsinterface - ( operationpolicies? - , extension* ) > -<!ATTLIST supportsinterface - repid CDATA #REQUIRED > - -<!ELEMENT threading EMPTY> -<!ATTLIST threading - policy ( serialize | multithread ) #REQUIRED > - -<!ELEMENT transaction EMPTY > -<!ATTLIST transaction - use (self-managed|not-supported|required|supports|requiresnew| - mandatory|never) #REQUIRED > -<!ELEMENT unclassified - ( poapolicies ) > - -<!ELEMENT uses ( extension* ) > -<!ATTLIST uses - usesname CDATA #REQUIRED - repid CDATA #REQUIRED > diff --git a/TAO/CIAO/docs/XML/properties.dtd b/TAO/CIAO/docs/XML/properties.dtd deleted file mode 100644 index adfe8699fb7..00000000000 --- a/TAO/CIAO/docs/XML/properties.dtd +++ /dev/null @@ -1,87 +0,0 @@ -<!-- DTD for CORBA Component property file. The root element - is <properties>. Elements are listed alphabetically. ---> - -<!ELEMENT choice ( #PCDATA ) > - -<!ELEMENT choices ( choice | range )+ ) > - -<!ELEMENT defaultvalue ( #PCDATA ) > - -<!ELEMENT description ( #PCDATA ) > - -<!ELEMENT value ( #PCDATA ) > - -<!ELEMENT properties - ( description? - , ( simple - | sequence - | struct - | valuetype - )* - ) > - -<!ELEMENT range (value, value) > - -<!ELEMENT simple - ( description? - , value - , choices? - , defaultvalue? - ) > -<!ATTLIST simple - name CDATA #IMPLIED - type ( boolean - | char - | double - | float - | short - | long - | objref - | octet - | string - | ulong - | ushort - | longlong - | ulonglong - | wchar - | wstring - | fixed - ) #REQUIRED > - -<!ELEMENT sequence - ( description? - , ( simple* - | struct* - | sequence* - | valuetype* - ) - ) > -<!ATTLIST sequence - name CDATA #IMPLIED - type CDATA #REQUIRED > - -<!ELEMENT struct - ( description? - , ( simple - | sequence - | struct - | valuetype - )* - ) > -<!ATTLIST struct - name CDATA #IMPLIED - type CDATA #REQUIRED > - -<!ELEMENT valuetype - ( description? - , ( simple - | sequence - | struct - | valuetype - )* - ) > -<!ATTLIST valuetype - name CDATA #IMPLIED - type CDATA #REQUIRED - primarykey (true | false) "false" > diff --git a/TAO/CIAO/docs/XML/softpkg.dtd b/TAO/CIAO/docs/XML/softpkg.dtd deleted file mode 100644 index ee87b811cc6..00000000000 --- a/TAO/CIAO/docs/XML/softpkg.dtd +++ /dev/null @@ -1,220 +0,0 @@ -<!-- DTD for softpkg. Used to describe CORBA Component - implementations. The root element is <softpkg>. - Elements are listed alphabetically. - --> -<!-- Revision $Id$ --> -<!-- Simple xml link attributes based on W3C WD-xlink-19980303. - May change when XLL is finalized. --> - -<!ENTITY % simple-link-attributes " - xml:link CDATA #FIXED 'SIMPLE' - href CDATA #REQUIRED -"> - -<!ELEMENT author - ( name - | company - | webpage - )* > - -<!ELEMENT code - ( ( codebase - | fileinarchive - | link - ) - , entrypoint? - , usage? - ) > -<!ATTLIST code - type CDATA #IMPLIED > - -<!-- If file not available locally, then download via codebase link --> -<!ELEMENT codebase EMPTY > -<!ATTLIST codebase - filename CDATA #IMPLIED - %simple-link-attributes; > - -<!ELEMENT compiler EMPTY > -<!ATTLIST compiler - name CDATA #REQUIRED - version CDATA #IMPLIED > - -<!ELEMENT company ( #PCDATA ) > - -<!ELEMENT dependency - ( softpkgref - | codebase - | fileinarchive - | localfile - | name - | valuetypefactory - ) > -<!ATTLIST dependency - type CDATA #IMPLIED - action (assert | install) "assert"> - -<!ELEMENT description ( #PCDATA ) > - -<!ELEMENT descriptor - ( link - | fileinarchive - ) > -<!ATTLIST descriptor - type CDATA #IMPLIED> - -<!ELEMENT entrypoint ( #PCDATA) > - -<!-- The "extension" element is used for vendor-specific extensions --> -<!ELEMENT extension (#PCDATA) > -<!ATTLIST extension - class CDATA #REQUIRED - origin CDATA #REQUIRED - id ID #IMPLIED - extra CDATA #IMPLIED - html-form CDATA #IMPLIED > - -<!-- The "fileinarchive" element is used to specify a file in the archive. - If the file is in another archive then link is used to point to - the archive in which the file may be found. - --> -<!ELEMENT fileinarchive - ( link? ) > -<!ATTLIST fileinarchive - name CDATA #REQUIRED > - -<!ELEMENT idl - ( link - | fileinarchive - | repository - ) > -<!ATTLIST idl - id CDATA #REQUIRED - homeid CDATA #REQUIRED > - -<!ELEMENT implementation - ( description - | code - | compiler - | dependency - | descriptor - | extension - | programminglanguage - | humanlanguage - | os - | propertyfile - | processor - | runtime - )* > -<!ATTLIST implementation - id ID #IMPLIED - variation CDATA #IMPLIED > - -<!ELEMENT implref EMPTY > -<!ATTLIST implref - idref CDATA #REQUIRED > - -<!ELEMENT ins EMPTY > -<!ATTLIST inc - name CDATA #REQUIRED > - -<!ELEMENT humanlanguage EMPTY > -<!ATTLIST humanlanguage - name CDATA #REQUIRED > - -<!ELEMENT license ( #PCDATA ) > -<!ATTLIST license - %simple-link-attributes; > - -<!ELEMENT link ( #PCDATA ) > -<!ATTLIST link - %simple-link-attributes; > - -<!-- A file that should be available in the local environment --> -<!ELEMENT localfile EMPTY > -<!ATTLIST localfile - name CDATA #REQUIRED > - -<!ELEMENT name ( #PCDATA ) > - -<!ELEMENT objref EMPTY > -<!ATTLIST objref - string CDATA #REQUIRED > - -<!ELEMENT os EMPTY > -<!ATTLIST os - name CDATA #REQUIRED - version CDATA #IMPLIED> - -<!ELEMENT pkgtype ( #PCDATA ) > -<!ATTLIST pkgtype - version CDATA #IMPLIED > - -<!ELEMENT processor EMPTY > -<!ATTLIST processor - name CDATA #REQUIRED > - -<!ELEMENT programminglanguage EMPTY> -<!ATTLIST programminglanguage - name CDATA #REQUIRED - version CDATA #IMPLIED > - -<!ELEMENT propertyfile - ( fileinarchive - | link) > -<!ATTLIST propertyfile - type CDATA #IMPLIED > - -<!ELEMENT repository - ( ins - | objref - | link - ) > -<!ATTLIST repository - type CDATA #IMPLIED > - -<!ELEMENT runtime EMPTY > -<!ATTLIST runtime - name CDATA #REQUIRED - version CDATA #IMPLIED> - -<!ELEMENT softpkg - ( title - | pkgtype - | author - | description? - | license - | idl - | propertyfile - | dependency - | descriptor - | implementation - | extension - )* > -<!ATTLIST softpkg - name ID #REQUIRED - version CDATA #IMPLIED > - -<!ELEMENT softpkgref - ( ( fileinarchive - | link - ) - , implref? - ) > - -<!ELEMENT title ( #PCDATA ) > - -<!ELEMENT usage ( #PCDATA ) > - -<!ELEMENT valuetypefactory - ( codebase - | fileinarchive - | link - ) > -<!ATTLIST valuetypefactory - repid CDATA #REQUIRED - valueentrypoint CDATA #IMPLIED - factoryentrypoint CDATA #IMPLIED > - -<!ELEMENT webpage ( #PCDATA ) > -<!ATTLIST webpage - %simple-link-attributes; > diff --git a/TAO/CIAO/docs/com-impl.html b/TAO/CIAO/docs/com-impl.html deleted file mode 100644 index d2c4a4bb5dc..00000000000 --- a/TAO/CIAO/docs/com-impl.html +++ /dev/null @@ -1,60 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<!-- $Id$ --> -<html> <head> -<title>Implementing a CCM Component</title> -</head> - -<body> -<h1>Implementing a CCM Component</h1> - -This document explains how to implement a single component. At this -moment, CIAO lacks a CIDL compiler, and we depends on manually -generating the servant glue code for containers and local executor -interface. Check out this <a href="new_component.html">page</a> to -find how all files are generate4d in CIAO. -The following figure shows how this is done:<p> - - -<img src="imgs/File-Gen-Existing.png"><p> - -And when we have a working CIDL (or, CCIDL "CIAO's Component -Implementation Definition Language") compiler, the file will be -generated using a CIDL file (which is rather simple.) This figure -depicts the "Right Way" [TM] this should be done:<p> - -<img src="imgs/File-Gen-Future.png"><p> - -Checkout a <a href="../tools/CCIDL/README">list of things to do</a> for implementing CIDL compiler.<p> - -I think it is debatable whether we should merge the "Servant DLL" and -"Component Implementation DLL" into one DLL. Me think not. My -approach, however, creates some complication on requireing a mechanism -to locate the servant code (and DLL) from component implementation. - - -<h2>Libraries Dependencies</h2> Implementing a component creates 3 -DLL's as shown in the above figure. Both "Servant DLL" and "Component -Implementation DLL" depend on the "Client DLL". "Servant DLL" and -"Component Implementation DLL" are not mutually dependent, however. -All the generated DLLs depends on other TAO and CIAO common -libraries. Here's a break down of which libraries depends on which -other libraries: - -<ul> - <li><b>Client DLL</b>: ace.lib tao.lib TAO_IFR_Client.lib - CIAO_Clientd.lib - <li><b>Servant DLL</b>: ace.lib tao.lib <b>Client DLL</b> - TAO_IFR_Client.lib TAO_PortableServer.lib TAO_Security.lib - CIAO_Container.lib CIAO_Client.lib - <li><b>Component Implementation DLL</b>: ace.lib tao.lib - <b>Client DLL</b> TAO_IFR_Client.lib TAO_Security.lib - CIAO_Container.lib -</ul> - - <!--#include virtual="/~nanbor/signature.html" --> -<!-- <hr> --> -<!-- <\!-- hhmts start -\-> --> -<!-- Last modified: Tue Dec 10 22:41:50 Central Standard Time 2002 --> -<!-- <\!-- hhmts end -\-> --> -<!-- <address>Nanbor Wang <nanbor@cs.wustl.edu></address> --> -</body> </html> diff --git a/TAO/CIAO/docs/imgs/CCM-v5.vsd b/TAO/CIAO/docs/imgs/CCM-v5.vsd Binary files differdeleted file mode 100644 index 7f4d7539050..00000000000 --- a/TAO/CIAO/docs/imgs/CCM-v5.vsd +++ /dev/null diff --git a/TAO/CIAO/docs/imgs/CCM.vsd b/TAO/CIAO/docs/imgs/CCM.vsd Binary files differdeleted file mode 100644 index 7d5b7fef162..00000000000 --- a/TAO/CIAO/docs/imgs/CCM.vsd +++ /dev/null diff --git a/TAO/CIAO/docs/imgs/File-Gen-Existing.png b/TAO/CIAO/docs/imgs/File-Gen-Existing.png Binary files differdeleted file mode 100644 index 8deb5d32fd3..00000000000 --- a/TAO/CIAO/docs/imgs/File-Gen-Existing.png +++ /dev/null diff --git a/TAO/CIAO/docs/imgs/File-Gen-Future.png b/TAO/CIAO/docs/imgs/File-Gen-Future.png Binary files differdeleted file mode 100644 index 1daef691bdf..00000000000 --- a/TAO/CIAO/docs/imgs/File-Gen-Future.png +++ /dev/null diff --git a/TAO/CIAO/docs/imgs/File_Generation_Flow.vsd b/TAO/CIAO/docs/imgs/File_Generation_Flow.vsd Binary files differdeleted file mode 100644 index ef6332d49ac..00000000000 --- a/TAO/CIAO/docs/imgs/File_Generation_Flow.vsd +++ /dev/null diff --git a/TAO/CIAO/docs/imgs/IDL-CIDL-classes.vsd b/TAO/CIAO/docs/imgs/IDL-CIDL-classes.vsd Binary files differdeleted file mode 100644 index 0986aa78d70..00000000000 --- a/TAO/CIAO/docs/imgs/IDL-CIDL-classes.vsd +++ /dev/null diff --git a/TAO/CIAO/docs/imgs/basic-container.png b/TAO/CIAO/docs/imgs/basic-container.png Binary files differdeleted file mode 100644 index 9df767b45a2..00000000000 --- a/TAO/CIAO/docs/imgs/basic-container.png +++ /dev/null diff --git a/TAO/CIAO/docs/imgs/ciao-dynamic1.jpg b/TAO/CIAO/docs/imgs/ciao-dynamic1.jpg Binary files differdeleted file mode 100644 index a385ad30848..00000000000 --- a/TAO/CIAO/docs/imgs/ciao-dynamic1.jpg +++ /dev/null diff --git a/TAO/CIAO/docs/imgs/ciao-dynamic2.jpg b/TAO/CIAO/docs/imgs/ciao-dynamic2.jpg Binary files differdeleted file mode 100644 index e0a705b9d3a..00000000000 --- a/TAO/CIAO/docs/imgs/ciao-dynamic2.jpg +++ /dev/null diff --git a/TAO/CIAO/docs/imgs/ciao-static-vs-dynamic.jpg b/TAO/CIAO/docs/imgs/ciao-static-vs-dynamic.jpg Binary files differdeleted file mode 100644 index b876b7a82cb..00000000000 --- a/TAO/CIAO/docs/imgs/ciao-static-vs-dynamic.jpg +++ /dev/null diff --git a/TAO/CIAO/docs/imgs/ciao-static1.jpg b/TAO/CIAO/docs/imgs/ciao-static1.jpg Binary files differdeleted file mode 100644 index 313084ff34d..00000000000 --- a/TAO/CIAO/docs/imgs/ciao-static1.jpg +++ /dev/null diff --git a/TAO/CIAO/docs/imgs/ciao-static2.jpg b/TAO/CIAO/docs/imgs/ciao-static2.jpg Binary files differdeleted file mode 100644 index 86ded87f448..00000000000 --- a/TAO/CIAO/docs/imgs/ciao-static2.jpg +++ /dev/null diff --git a/TAO/CIAO/docs/imgs/component-basic.png b/TAO/CIAO/docs/imgs/component-basic.png Binary files differdeleted file mode 100644 index 6461538c85d..00000000000 --- a/TAO/CIAO/docs/imgs/component-basic.png +++ /dev/null diff --git a/TAO/CIAO/docs/imgs/deployment.png b/TAO/CIAO/docs/imgs/deployment.png Binary files differdeleted file mode 100644 index 4cd8c6be646..00000000000 --- a/TAO/CIAO/docs/imgs/deployment.png +++ /dev/null diff --git a/TAO/CIAO/docs/imgs/extended-container.png b/TAO/CIAO/docs/imgs/extended-container.png Binary files differdeleted file mode 100644 index 39977e6eb83..00000000000 --- a/TAO/CIAO/docs/imgs/extended-container.png +++ /dev/null diff --git a/TAO/CIAO/docs/imgs/home-config.png b/TAO/CIAO/docs/imgs/home-config.png Binary files differdeleted file mode 100644 index aebf5e62751..00000000000 --- a/TAO/CIAO/docs/imgs/home-config.png +++ /dev/null diff --git a/TAO/CIAO/docs/index.html b/TAO/CIAO/docs/index.html deleted file mode 100644 index f35d6a77fe8..00000000000 --- a/TAO/CIAO/docs/index.html +++ /dev/null @@ -1,130 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<!-- $Id$ --> -<html> <head> -<title>CIAO - Component-Integrated ACE ORB</title> -</head> - -<body> -<h1>CIAO - Component-Integrated ACE ORB</h1> - -<h2>Introduction</h2> -CIAO is TAO's implementation of <a -href="http://cgi.omg.org/cgi-bin/doc?formal/02-06-65"> CORBA Component -Model (CCM)</a> specially optimized for distributed real-time embedded -(DRE) systems. - -This page contains links to other documents and resources for building -and using CIAO. - -<h2>The CIAO Project</h2> -<ul> - <li>The main - <a href="http://www.cs.wustl.edu/~schmidt/CIAO.html"> - CIAO project page</a>.<p> - - <li>CIAO <A HREF="../CIAO-INSTALL.html">Installation instructions</a>.<p> - - <li>Project <a href="releasenotes/index.html">Status (aka. release - notes.)</a><p> - - <li>This <a href="new_components.html">page on implementing new - component</a> explains all the user-defined and tool-generated - files when implementing a component.<p> - - <li>A <a href="TODO.html">list of things</a> that we know need to be - done. :) <p> - - <li>The <a href="ConfigValues.html">Configuration Name/Value - lists</a> lists all the configuration values that CIAO will pass - into vaious CCM mechanisms. The information shown in this page - is not visible to CIAO end-users, which include modeling tool - developers. The information that matters for most users is how - these configurations are represented in various XML - descriptors and CIDL specifications.<p> - - <li>CIAO uses some <a href="EnvVars.html">environment variables</a> - to manage the internal behaviors. -</ul> - -<h2>CCM-defined Interface Diagrams</h2> - -Here is a set of UML diagrams that we use to figure out the -relationship among all the different interfaces in CCM. You can -browse the related part from the following list: - -<UL> - <li><a href="imgs/component-basic.png"> Basic component interfaces - </a></li> - <li><a href="imgs/home-config.png"> Home and configuration interfaces - </a></li> - <li><a href="imgs/basic-container.png"> Basic container interfaces - </a></li> - <li><a href="imgs/extended-container.png"> Extended container - interfaces </a></li> - <li><a href="imgs/deployment.png"> Deployment and installation - interfaces </a></li> -</UL> -All these diagrams are generating from the <a href="imgs/CCM.vsd">CCM.vsd -Visio file</a> (The same file in Visio V.5 format is <a href="imgs/CCM-v5.vsd">here</a>.) - -<h2>CIAO part-by-part</h2> - -Here is a list of the major elements of CIAO that a user should be aware of. - -<UL> - <li><a href="http://www.dre.vanderbilt.edu/Doxygen/Current/html/tao/ciao/tools/daemon/index.html"><strong>Daemon:</strong></a> A CIAO Daemon is the per-host Daemon process which is used to create/spawn the ComponentServer.</li><P> - - <li><a href="http://www.dre.vanderbilt.edu/Doxygen/Current/html/tao/ciao/ciao/index.html"><strong>ComponentServer:</strong></a> A ComponentServer is the center part of CIAO. It's responsible for component/home creation.</li><P> - - <li><a href="http://www.dre.vanderbilt.edu/Doxygen/Current/html/tao/ciao/tools/assembly_deployer/index.html"><strong>AssemblyDeployer:</strong></a> An AssemblyDeployer is responsible for starting the Assembly process.</li><P> - - <li><a href="http://www.dre.vanderbilt.edu/Doxygen/Current/html/tao/ciao/tools/assembly_deployer/index.html"><strong>AssemblyManager:</strong></a> An AssemblyManager is the center part to do the Assembly work.</li><P> - - <li><a href="static_ciao_index.html"><strong>Static Configurator:</strong> </a>The CIAO -Static Configurator acts as a pre-processor that parses the XML descriptor -files into intermediate representation that gets linked into the main application. -This reduces the initialization time for an application that is statically -built. It is mainly aimed at RTOS' like VxWorks that lacks facilities like -shared objects or DLL.</li> -</UL> - - -<h2>CIAO CCM tutorials</h2> - -There are several tutorials to help you understand CIAO and CCM: - -<UL> -<LI> <A - HREF="http://www.cs.wustl.edu/~schmidt/OMG-CCM-Tutorial.ppt">Tutorial -on the CORBA Component Model (CCM)</A>. This tutorial presents an overview of the CORBA Component Model (CCM), -describing its key features and illustrating how to write CCM -applications in C++. <P> - - <li><a -href="./tutorial/Hello"><code>$(CIAO_ROOT)/docs/tutorial/Hello.</code></a> -This example shows the low level infomation about CIAO -Component/Component Home creation and deletion.</li><P> - - <li><a -href="../examples/Hello"><code>$(CIAO_ROOT)/examples/Hello.</code></a> -This example illustrates how to build a CIAO based application <a -href="../examples/Hello/step-by-step.html">step-by-step</a>. There is -also a detailed documentation explaining this example avalable in both -<a href="http://www.dre.vanderbilt.edu/~lu/CCM/CCM_Hello_example.PDF"> -PDF</a> and <a -href="http://www.dre.vanderbilt.edu/~lu/CCM/CCM_Hello_example.ppt"> -PowerPoint</a> format.</li> - -</UL> - - -<!--#include virtual="/~nanbor/signature.html" --> -<!-- <hr> --> -<!-- <\!-- hhmts start -\-> --> -<!-- Last modified: Mon Nov 04 07:55:22 Central Standard Time 2002 --> -<!-- <\!-- hhmts end -\-> --> -<!-- <address>Nanbor Wang <nanbor@cs.wustl.edu></address> --> -</body> </html> - -<!-- LocalWords: CCM UML vsd Visio - --> diff --git a/TAO/CIAO/docs/new_components.html b/TAO/CIAO/docs/new_components.html deleted file mode 100644 index db10fca2103..00000000000 --- a/TAO/CIAO/docs/new_components.html +++ /dev/null @@ -1,129 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<!-- $Id$ --> -<html> <head> -<title>Procedures to prepare a new component implementation</title> -</head> - -<body> -<h1>Preparing a new component implementation</h1> - -I am documenting the steps required to prepare a component implementation. -Personally, I prefer to set up a directory to contain only <b>one</b> -component implementation. I believe the procedures outlined below -will work if you have multiple component implementation in the same -IDL files. The purpose of this document is to record the procedures -and steps on how these files relate to each others and how they come -about during the development process.<p> - -Assuming we need to create a new component called -<code><b>Orc</b></code>. Below is the list of files you'll need to -deal with. Our goal is to greatly reduce the number of files you need -to deal with manually... - -<ol> - <li><font color="red"><code><b>Orc</b>.idl</code></font> - This is - the IDL file that contains the component and component home - definitions.<p> - - As you will eventually create 3 DLLs (or shared objects), you - will also need 3 sets of different export macros files as - following.<p> - - <li><code><b>Orc</b>_stub_export.h</code> - This file is generated - using the following command:<p> - - <code>generate_export_file.pl <b>ORC</b>_STUB > <b>Orc</b>_stub_export.h</code><p> - - This file makes macros like <code><b>ORC</b>_STUB_Export</code> - and friends available. They are usually controlled by - <code><b>ORC</b>_STUB_BUILD_DLL</code><p> - - <li><code><b>Orc</b>_svnt_export.h</code> - This file is generated - using the following command:<p> - - <code>generate_export_file.pl <b>ORC</b>_SVNT > <b>Orc</b>_svnt_export.h</code><p> - - This file makes macros like <code><b>ORC</b>_SVNT_Export</code> - and friends available. They are usually controlled by - <code><b>ORC</b>_SVNT_BUILD_DLL</code><p> - - <li><code><b>Orc</b>_exec_export.h</code> - This file is generated - using the following command:<p> - - <code>generate_export_file.pl <b>ORC</b>_EXEC > <b>Orc</b>_exec_export.h</code><p> - - This file makes macros like <code><b>ORC</b>_EXEC_Export</code> - and friends available. They are usually controlled by - <code><b>ORC</b>_EXEC_BUILD_DLL</code><p> - - <li><code><b>Orc</b>E.idl</code> - Component Executor equivalent - interface definitions. This file should be generated - automatically by the CIDL compiler as illustrated in this - <a href="com-impl.html">file</a> but we currently are still - working on the implementation of the CIDL compiler. Therefore, - you still need to create this file manually.<p> - - <li><font color="red"><code><b>Orc</b>EI.idl</code></font> - - Optional Component Executor implementation interface - definitions. Often time, when you implement a non-trivial - monolithic component implementation, you are required to define - the monolithic local executor interface which often inherits - from the component monolithic executor interface and all the - provided interfaces. The actually executor implementation will - inherit from this user defined interface instead of the default - executor mapping defined in <code><b>Orc</b>E.idl</code>. You - will need to do the same when you wish to support non-vanilla - component interface, such as - <code>Components::SessionComponent</code>, and/or - <code>Components::SessionSynchronization</code>.<p> - - Ideally, it would be perfect if we can auto-generate this - optional IDL file using CIDL compiler. However, I'm not sure - the plan CIDL language contains enough information that's - required to generate this file.<p> - - <li><font color="red"><code><b>Orc</b>_exec.*</code></font> - These - are files containing the actually component implementation that - you have to write manually. It, however, depends on the - equivalent executor IDL definition (that will be) generated by - the CIDL files.<p> - - <li><code><b>Orb</b>_svnt.*</code> - These are files containing the - servant glue code that bridge a container to the component - executor that you implement. Like the component executor - mapping IDL file, these files should be generated by the CIDL - compiler but are currently generated manually.<p> - - <li><code><b>Orc</b>.csd</code> - Component Softpkg Descriptor. We - need some kind of tool to generate this file automatically. It - is currently being generated manually, however.<p> - - - <li><code><b>Orc</b>.ssd</code> - Servant Softpkg Descriptor. This - is a CIAO extension descriptor file which uses the same softpkg - DTD as described in CCM spec. CIAO requires this file because - CIAO separates the executors into a completely separate DLL. - Like <code><b>Orc</b>.csd</code>, this file should be generated - automatically through some tool, but it is currently manually - crafted.<p> - - <li><code><b>Orc</b>.ccd</code> - CORBA Component Descriptor. This - file is currently being generated manually thou a template - should really be generated by CIAO's CIDL compiler.<p> - - <li><font color="red"><code><b>Orc</b>.mpc</code></font> - Makefile - Project Creator definition file. There is a perl script to - generate a minimal MPC definition at - <code>$(CIAO_ROOT)/bin/generate_component_mpc.pl</code> so - people can use it to implement the simplest component - implementation outlined in this file.<p> - -</ol> - - -<hr> -<address></address> -<!-- hhmts start --> -Last modified: Fri Mar 21 16:06:48 Central Standard Time 2003 -<!-- hhmts end --> -</body> </html> diff --git a/TAO/CIAO/docs/releasenotes/dance.html b/TAO/CIAO/docs/releasenotes/dance.html deleted file mode 100644 index e1aaa07459c..00000000000 --- a/TAO/CIAO/docs/releasenotes/dance.html +++ /dev/null @@ -1,229 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Id$ --> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> - <title>Deployment And Configuration Engine (DAnCE) Release Notes</title> - </head> - - <body> - <h1>Deployment And Configuration Engine (DAnCE) Release Notes</h1> - - <p><b>D</b>eployment <b>An</b>d <b>C</b>onfiguration <b>E</b>ngine - <b>(DAnCE)</b> is an implementation of the run-time infrastructure as - defined by the recently adopted OMG <a - href="http://www.omg.org/cgi-bin/doc?ptc/2003-07-02">Deployment & - Configuration (D&C)</a> specification, which deals with the - configuration and deployment of component-based applications. Currently - DAnCE only supports the deployment & configuration of CORBA - Component Model (CCM)-based applications, though we are interested in - generalizing it for other component models in future work. DAnCE uses - XML descriptors to drive the deployment it performs. One way to - generate these descriptors is using the <b>Co</b>mponent - <b>S</b>ynthesis using <b>M</b>odel-<b>I</b>ntegrated <b>C</b>omputing - (<a href="http://www.dre.vanderbilt.edu/cosmic">CoSMIC</a>) tool-suite. - DAnCE currently uses <b>C</b>omponent <b>I</b>ntegrated <b>A</b>CE - <b>O</b>RB (<a href="http://www.dre.vanderbilt.edu/CIAO">CIAO</a>) as - the underlying CCM implementation in the current release, though again - we are interested in generalizing it for other CCM implementations in - future work. - </p> - - <h3>D&C XML Schema Handling</h3> - - <p> The XML handlers shipped with DAnCE are capable of handling almost - all elements that are defined in the D&C schema. In this context, - handling refers to reading the XML tags and converting them to the - equivalent in-memory IDL-based data structures defined by the - specifications. DAnCE supports the following types of descriptors - specified in the D&C specification:</p> - <ul> - <li> - <p> - <b>CORBA Component Descriptor(.ccd)</b> – - Contains information about component interfaces including - component ports. - </p> - </li> - <li> - <p> - <b>Component Implementation Descriptor(.cid)</b> - – Contains information about component implementations - which might be either monolithic or assembly based. In the case - of assembly based implementations, this descriptor also captures - the dependencies and the connections among components - </p> - </li> - <li> - <p> - <b>Implementation Artifact Descriptor(.iad)</b> - – Contains information about implementation artifacts - in-cluding dependencies between such artifacts - </p> - </li> - <li> - <p> - <b>Component Package Descriptor(.cpd)</b> – - Contains information about grouping of multiple imple-mentations - of the same component interface into component packages - </p> - </li> - <li> - <p> - <b>Package Configuration Descriptor(.pcd)</b> - – Contains information about specific configurations of - such component packages - </p> - </li> - <li> - <p> - <b>Component Domain Descriptor(.cdd)</b> – - Contains information about the target environment in which the - component-based application will be deployed - </p> - </li> - <li> - <p> - <b>TopLevel Package Descriptor(.tpd)</b> – Contains - information identifying the top-level element in a component - package descriptor which might include information about multiple - elements - </p> - </li> - - <li> - <p> - <b>Component Deployment Plan(.cdp)</b> – Contains - information that actually drives the deployment including - information about individual components that represent the - leaf-nodes in case of a hierarchical assembly, connections - between components, and assignment of components to nodes etc. - </p> - </li> - </ul> - <p> For all the above elements, DAnCE supports proxying of the elements - as defined by XMI, i.e, DAnCE supports both parsing of the elements - inline and reference through <b><code>href</code></b> attribute. Some - D&C schema elements are however not handled, including:</p> - <ul> - <li> - <p> - <b>Deployment:Any</b> – This is a complex - element that is composed of many sub-elements. Currently, DAnCE - only parses a subset of the sub-elements of - <b><code>Deployment:Any</code></b>. Specifically, DAnCE supports all the - basic data types defined as part of <b><code>Deployment:Any</code></b>, - and doesn't understand any complex types. - </p> - </li> - <li> - <p> - <b>xmi:Extension</b> – This element allows the - augmention of the standard D&C schema with user-defined - elements. Currently DAnCE doesn't support user-defined extensions - to the schema. - </p> - </li> - <li> - <p> - <b>Deployment:Requirement</b> – This element is - allows the description of requirements of component-based - applications. Since handling this description requires interaction - with the <b><code>TargetManager</code></b> interface (which is not yet - supported), support for <b><code>Deployment:Requirement</code></b> is not - present. - </p> - </li> - <li> - <p> - <b>Deployment:ComponentPropertyDescriptioncode></b> – - This element is used to specify default values for attributes of - component. DAnCE doesn't support setting the values for attributes - of components using this tag. - </p> - </li> - <li> - <p> - <b>Deployment:ComponentExternalPortEndpoint, - Deployment:ExternalReferenceEndpoint</b> – These - elements are used to specify connections between ports of - components in one assembly with ports of components in a different - assembly, or connections between component ports and external - connection endpoints. These features are needed to support - assemblies of components. DAnCE doesn't support yet hierarchical - assemblies, i.e., creation of assemblies which can themselves - contain sub-assemblies. - </p> - </li> - <li> - <p> - <b>Deployment:PlanPropertyMapping</b> – This - element is used to delegate property mapping between a component's - external properties to properties of subcomponents that actually - implement the behavior of the larger component. Since DAnCE doesn't - support hierarchical assemblies, this tag is not yet supported. - </p> - </li> - </ul> - <p> We plan to support these features in future versions of DAnCE. - </p> - <hr /> - <h3> D&C Management Interfaces</h3> - - <p> The D&C specification defines a set of standard CORBA - interfaces that are used to perform the deployment of component-based - applications. These interfaces depend on the in-memory IDL data - structures that are built by DAnCE's XML handlers. Below we outline the - list of interfaces defined by the specification and the level of - support for each interface in DAnCE:</p> - <ul> - <li> - <p> - <b>RepositoryManager</b> – Only the - <b><code>installPackage()</code></b> and <b><code>findPackageByName()</code></b> - operations of this interface are implemented. - </p> - </li> - <li> - <p> - <b>TargetManager</b> – This interface has not - been implemented at all. Implementation of this interface is - planned for the future. - </p> - </li> - <li> - <p> - <b>ExecutionManager</b> – All operations defined - in this interface are implemented. - </p> - </li> - <li> - <p> - <b>DomainApplicationManager, DomainApplication</b> - – All operations except <b><code>getApplications()</code></b> - operation of DomainApplicationManager are implemented. - </p> - </li> - <li> - <p> - <b>NodeManager </b>– All operations except <strong><code>joinDomain()</code></strong> and <strong><code>leaveDomain()</code></strong> operations of NodeManager are implemented. </p> - </li> - <li> - <p><b> NodeApplicationManager, NodeApplication</b> – All operations defined in these interfaces are - implemented. </p> - </li> - </ul> - <p> - We plan to finish implementing the unsupported features in future versions of DAnCE. - </p> - <p> - <a href="http://validator.w3.org/check?uri=referer"> - <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" - height="31" width="88" /> - </a> - </p> - <address> - Last modified $Date$ by $Author$ - </address> - </body> -</html> diff --git a/TAO/CIAO/docs/releasenotes/index.html b/TAO/CIAO/docs/releasenotes/index.html deleted file mode 100644 index de865e9ff6a..00000000000 --- a/TAO/CIAO/docs/releasenotes/index.html +++ /dev/null @@ -1,136 +0,0 @@ -<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <meta name="GENERATOR" content="Mozilla/4.79 [en] (Windows NT 5.0; U) [Netscape]"> - <title>CIAO Release Information and TODO List</title> -</head> -<body text="#000000" bgcolor="#FFFFFF"> -<!-- $Id$ --> -<center> -<hr></center> - -<center> -<h3> -Release Information for the Component Integrated ACE ORB (CIAO)</h3></center> -This document contains information on the following topics related to the -<a href="../../VERSION">current -release</a> of <a href="http://www.dre.vanderbilt.edu/CIAO">CIAO</a>: - -<table BORDER=0 CELLSPACING=0 CELLPADDING=10 > -<tr> -<td VALIGN=TOP> -<b></b> -<br> -<ul> -<li> -<a href="../index.html">Introduction</a></li> -<li> -<a href="#status">Current Status of CIAO</a></li> -<li> -<a href="dance.html">Status of DAnCE</a></li> -<li> -<a href="../TODO.html">TODO list</a></li> -</ul> -</td> -</table> - - -<hr> -<h2>Current Status</h2><a name="status"> -<ol> -<li>The first cut of the new <a - href="http://www.omg.org/cgi-bin/doc?ptc/2003-07-02"> DnC </a> - specification implementation, which we call DAnCE is available in - this distribution. DAnCE is housed under <CODE> $CIAO_ROOT - </CODE>. We plan to enhance DAnCE in the next few months. We believe - DAnCE will replace existing tool sets in <CODE> - $CIAO_ROOT/tools</CODE>. There are a few features in - <CODE>$CIAO_ROOT/tools</CODE> that are missing in the DAnCE - implementation. Please see <a href="../TODO.html"> TODO </a> file - for more details. We plan to implement them soon and use DAnCE - continuously. - - <li> The first cut of DAnCE includes two parts: - <ul> - <li> - A modeling tool chain , <a href="http://www.dre.vanderbilt.edu/CoSMIC/"> - CoSMIC</a>, which is capable of describing the Assembly/Component - using <a - href="http://www.isis.vanderbilt.edu/Projects/gme/default.html"> - GME</a> as the development bed. The artifacts generated from the - CoSMIC are a set of XML descriptors. - - <!-- Tao, I realy don't understand what this means - Bala --> - <li>This run-time infrastructure that performs the actual deployment - and configuration, with a superset of the capabilities described in - OMG DnC specification with CIAO extension. </a>.<p><p> - - </ul> - <!-- Tao, can you please see whether this is needed --> - In the new DnC run-time framework we have migrated all the - functionalities present in the old CIAO runtime except the - Real-Time configuration and Static Configuration, which are - developed by Washington University in St. Louis. Currently, - the two CIAO runtime co-exist in our source and the component - implementation could be used with both framework without much - change. (For the change that one has to go through please - read <a href="./switch.html">this</a>.)<p> - - - - <li> Two operations <CODE> ciao_preactivate ()</CODE> and - <CODE>ciao_postactivate ()</CODE> have been added to the - <CODE>SessionComponent</CODE> interface. This implies that component - developers have to implement those operations within the - executor. We plan to get around this, i.e., users having to - implement these two operations, in the next month or so. <p> - - <li> - - Here is a set of updates in the CIDL Compiler.<p> - <ul> - <li>Fixed bugs in generation of inherited: home operations, - attribute operations, port operations, home factory operations, - supported operations.<p> - - <li>Added support for multiplex uses ports. This implies that users - could use "uses multiple" in their component definitions. <p> - - <li>Added automatic registration of value factories for event - consumers. This has been long outstanding. This change alleviates - component developers need to register the valuetype factory of their - eventtypes with the ORB. <p> - - <li>Added support for emits keyword and we now generate navigation - code for this.<p> - - <li>Fixed bug with multiple facets in a build that provide the same - interface.<p> - - <li>Implemented get_all_facets() and get_all_consumers() navigation - methods. - </ul> - <p> - - - <li> CIAO doesn't yet support features that help integrating CORBA - components with Enterprise Java Beans (EJB).<p> - - <li> Test to demonstrate composition of applications with real-time - behavior using CIAO's real-time extension was added. Please see - ACE_wrappers/TAO/CIAO/tests/RTCCM/Priority_Test.<p> - - <li> The CIAO static configurator tool has been enhanced to support - processing of RTCORBA policy related information. Please see - ACE_wrappers/TAO/CIAO/docs/static_ciao_index.html. - -</ol> - - - -<b>Email: </b><a href="mailto:"</a<ADDRESS>ciao-users@cse.wustl.edu</ADDRESS> -</body> </html> - -<!-- LocalWords: TODOs CCM IDL CCIDL CIDL backend idl - --> diff --git a/TAO/CIAO/docs/releasenotes/switch.html b/TAO/CIAO/docs/releasenotes/switch.html deleted file mode 100644 index 1120239b6ec..00000000000 --- a/TAO/CIAO/docs/releasenotes/switch.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<!-- $Id$ --> -<html> <head> -<title>Migrating the component implementation</title> -</head> - -<body> -<h3>When switching from the old CIAO runtime to the new one</h1> - -<ul> - There are only one thing needs to be done to migrate the component - implementation from the old runtime to the new runtime. - <br><br> - Find all the component MPC files in your component implementation - source directories and make the following changes. - - for every project in your MPC files which inherites from any of - the following MPC template (base project): <code> ciao_client, ciao_component, - ciao_servant, ciao_server,</code> replace them with <code> ciao_client_dnc, - ciao_component_dnc, ciao_servant_dnc, ciao_server_dnc</code>. Then - generate your makefile/solution/project files using either - <code>mwc.pl</code> or <code>mpc.pl</code> and build (rebuild) your - binaries.<br> - - A couple examples of the component implementation are at: - <code>$CIAO_ROOT/DAnCE/tests</code>. -</ul> - -<h3>When switching from the new CIAO runtime to the old one</h3> - <ul> - Reverse the above changes. - </ul> - - <b>Email: </b><a href="mailto:"</a<ADDRESS>ciao-users@cse.wustl.edu</ADDRESS> -</body> </html> diff --git a/TAO/CIAO/docs/static_ciao_contents.html b/TAO/CIAO/docs/static_ciao_contents.html deleted file mode 100755 index d043e4c0aee..00000000000 --- a/TAO/CIAO/docs/static_ciao_contents.html +++ /dev/null @@ -1,359 +0,0 @@ -<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> -<html> -<head> - <meta http-equiv="Content-Type" - content="text/html; charset=iso-8859-1"> - <meta name="Author" content="Venkita Subramonian"> - <meta name="GENERATOR" - content="Mozilla/4.76 [en] (Windows NT 5.0; U) [Netscape]"> - <title>CIAO Static Configuration</title> - <base target="main"><!-- $Id$ --> -</head> -<body> -<center> -<h2>CIAO Static Configuration Support for Real-Time Platforms</h2> -</center> -<h3> -<a name="intro"></a>1. Introduction</h3> -The dynamic packaging, assembly, and deployment mechanisms currently -available -in CIAO are useful for application domains where component metadata is -less likely to be known a priori, where implementation upgrades may -need -to be performed on-line, and where platform features like loading and -unloading -dynamic libraries are both available and useful. Furthermore, the -new CCM Deployment and Configuration specification describes a wider -range -of configuration capabilities, opening up the question of alternative -component -configuration strategies more generally and requiring that any solution -we devise can be migrated to that new configuration approach. -<p>Therefore, we have incorporated support for component configuration -in CIAO on platforms like VxWorks, as a set of optional strategies and -optimizations to the existing CIAO configuration capabilities. By -supporting both dynamic and static styles of configuration in CIAO, we -will both (1) be able to realize our short term goals in making CIAO -available -on VxWorks for use in the Boeing PCES/MoBIES OEP, and (2) set a -precedent -for availability of static configuration capabilities more generally, -so -that DRE systems are well-supported within the new Deployment and -Configuration -specification implementation for CIAO as well. -</p> -<p>The fundamental intuition in understanding our approach is that in -DRE -systems the stages of the overall system lifecycle are similar to those -in more dynamic conventional component-oriented client-server -applications. -However, in DRE systems several phases of the system lifecycle are -compressed -into the compile-time and system-initialization phases, so that (1) for -testing and verification purposes the set of components in an -application -can be identified and analyzed before run-time, and (2) overheads for -run-time -operation following initialization are reduced and made more -predictable. -Furthermore, due to the nuances of the platforms traditionally used for -deploying DRE systems, not all features of conventional platforms are -available. -Our approach therefore avoids certain mechanisms that are either -unavailable -or too costly in terms of performance. -</p> -<p>We follow these intuitions in our approach, taking the existing -configuration -phases in CIAO and pushing several of them earlier in the configuration -lifecycle. We ensure that our approach can be realized in the -context -of the platforms on which the Boeing PCES/MoBIES OEP will be deployed, -notably VxWorks, by re-factoring the configuration mechanisms and -retargeting -them to use only the services available on the target real-time -platforms. -<br> - -</p> -<h3><a name="currentarch"></a>2. Current CIAO Configuration Architecture</h3> -<center> -<p><br> -<img src="imgs/ciao-dynamic1.jpg" height="462" width="774"></p> -<p><b>Figure 1. Current configuration process in CIAO</b></p> -</center> -<p>The first stage of the CIAO system lifecycle occurs off-line, when -component -package (.csd) and assembly (.cad) files are generated by a modeling -tool -or other prior stage of the tool chain. These files contain an -abstract -specification of the configuration that is to be achieved by CIAO in -each -particular deployment environment . -</p> -<p>CIAO interprets these .csd and .cad files, and creates and -configures -the components, their run-time server environments, and QoS properties -within the supporting ORB and other related infrastructure. -Currently, -CIAO runs several daemon processes for each deployment environment: one -or more Component Installation / Server Activation (CISA) daemons on -each -machine where components can be deployed, an additional Assembly -Manager -daemon and an Assembly Deployer process used by the system developer. -</p> -<p>The Assembly Manager stores an internal table with the target -platform -availability information . The Assembly Deployer -tells -the Assembly Manager which assemblies of components (each assembly is -defined -in a separate .cad file) should be deployed on which target -machines. -The Assembly Manager parses the XML structures in the .cad file, and -generates -its own internal data structure (<b>Figure 2</b>) as an intermediate -representation -of that assembly. -</p> -<p>The Assembly Manager then traverses (<b>Figure 2</b>) this -intermediate -representation, instructing each CISA daemon to install and configure -specific -component servers and containers, to create specific homes, and to -instantiate -specific component instances. Each CISA daemon has -additional -information about the component implementations available on that -endsystem -– each component UUID is mapped to a disk path for the .dll or .so file -within which a factory method for its home factory is defined. -</p> -<center> -<p><img src="imgs/ciao-dynamic2.jpg" height="384" width="699"></p> -<p><b>Figure 2. Intermediate representation of configuration information</b></p> -</center> -<p>The following steps are optional, and will only be performed if they -are explicitly specified in the assembly definition itself. For -the -sake of discussion, we consider the case where all the steps are in -fact -specified. The Assembly Manager will tell the CISA daemon the -UUIDs -of the components to be installed in that component server, and the -CISA -daemon will look up and load the appropriate dynamic library, invoke -the -home factory method to create the home, and then invoke the home’s -component -creation method. After all the component instances and homes have -been created and references to them have been obtained, the assembly -manager -will then make all the connections between ports and receptacles, -facets, -and event sources and sinks by invoking connect and subscribe methods -on -the receiving end component. -</p> -<p>QoS-specific metadata like priorities can be configured by a .cad -file -extension called a real-time descriptor (.rtcad) file. The -Assembly -Manager will read the .rtcad file and will parse and associate -real-time -policies with the appropriate component instances. One -implication -of this mechanism is that the Assembly Manager will maintain QoS -meta-data -within its intermediate representation, alongside the conventional CCM -meta-data. -</p> -<p>Furthermore, when the Assembly Manager interacts with the CISA -daemon(s) -on each endsystem, commands to configure particular component and -component -server run-time infrastructure QoS properties are passed from the -Assembly -Manager to the CISA daemon. The ORB (and as a future extension -the -ORB Services) of the endsystem on which the components are installed is -currently configured via the ACE Service Configurator. The CISA -daemon -maps different service configurations (as defined in particular -svc.conf -files) to logical names used in the component assembly descriptors. -</p> -<p>The logical configuration names are encoded within the .cad file as -an extension of the conventional .cad file format using the “extension” -element of the existing .cad file XML DTD. The Assembly Manager -passes -a component server creation command, containing a logical configuration -name, which the CISA daemon maps to a particular svc.conf file when it -creates a new component server. The CISA daemon adds a command -line -flag to the execution command line used to spawn the new component -server, -which causes that configuration file to be parsed and applied during -startup -of the component server itself. -</p> -<h3><a name="staticapproach"></a>3. Static Configuration Approach</h3> -In the static configuration approach (<b>Figure 3</b>), -configurations -XML files are translated in a code generation step just before compile -time (managed by the same project/Makefile processes that do the -compilation) -into C++ header and source files that are then compiled and linked with -the main application. -<center> -<p><img src="imgs/ciao-static1.jpg" height="523" width="800"></p> -<p><b>Figure 3. Static Configuration in CIAO</b></p> -</center> -<p>First, one of the generated files is a C++ header file, so that it -can -be included directly by C++ source files. There is no additional -parsing required to import a number of static constants and identifiers -it declares and defines, so that those constants end up being compiled -directly into C++ code. Second, where enumeration of information -is needed, the header file contains simple homogeneous C++ arrays so -that -C++ source code can iterate over those arrays with minimal -overhead. -Third, it declares information so that later information depends on -earlier -information (<b>Figure 4</b>), and the components are directly -configured -within that header file. -</p> -<center> -<p><img src="imgs/ciao-static2.jpg" height="476" width="816"></p> -<p><b>Figure 4. All XML files are parsed offline and stored as -cross-referenced -tables in Static_Assembly_Config.h</b></p> -</center> -<p>The major issues that we addressed in developing a re-factored -version -of the CIAO configuration mechanisms are as follows: -</p> -<p>1. XML parsing is too expensive to be performed during system -initialization, -so that all such parsing has been moved off-line to before -compile-time, -and the resulting information is linked statically into the application -itself. -</p> -<p>2. Each endsystem boots and initializes in a single process address -space, so that any remaining inter-process communication between -daemons -is replaced by direct interactions between objects, or at most between -threads. -</p> -<p>3. Dynamic link libraries are unavailable on VxWorks, so an -alternative -mechanism for obtaining the home factory method entry point is needed. -We gather this information from the XML files and statically generate a -map containing the entry point function names and the entry point -function pointers. This information will be used by the CIAO container -implementation instead of trying to load a dll and then finding the -entry -point in the dll. -</p> -<h4>Moving XML Parsing Earlier</h4> -We first focused on taking the XML parsing stage off-line. Since -the time required to do this by CIAO is currently reasonable as an -off-line -activity, we simply created (<b>Figure 4</b>) a stripped-down version -of -the Assembly Manager (reusing the existing class libraries the Assembly -Manager uses) that after it performs the XML parsing and generation of -its intermediate representation, emits a C++ header file containing -that -intermediate representation. -<h4>Combining Configuration Daemons at Run-Time</h4> -The intermediate representation is included in a configuration engine -(CIAO::Static_Configurator) -that consists of a simple reader for the intermediate representation, -again -derived from the code currently used in the Assembly Manager, which -will -dispatch to the configuration code used by the CISA daemons in the -dynamic -case. The configuration engine will be invoked from the -application’s -main entry point prior to starting execution of the application itself. -<h4>Eliminating Dynamic Library Loading</h4> -All code will need to be known a priori, and linked statically into the -application. If alternative configurations must be supported -statically, -then those separate configurations can be alternative selections chosen -during the build process. If alternative configurations must be -selected -adaptively at run-time then all the code for each possible -configuration -must be linked in statically, and appropriate mechanisms used to -re-target -a logical name dynamically to each particular configuration (e.g., -different -configurations for different system modes). -<br> - -<br> - -<br> -<br> -<center> -<p><img src="imgs/ciao-static-vs-dynamic.jpg" height="384" width="735"><br> -<b>Figure 5. CIAO Dynamic vs Static Configuration</b></p> -</center> -<h3> -<a name="status"></a><b>4. Status of CIAO Static Configuration</b></h3> -The initial version of the CIAO static configurator is available under -$CIAO_ROOT/tools/static_configurator. -<p>To run the static configurator, -</p> -<p><b><tt>Static_Assembly_Parser -a <.cad file></tt></b> -</p> -<p>This will generate three files - -</p> -<p><b><tt>Static_CCM_App.cpp</tt></b> - this file contains the main -program -which instantiates the component server and invokes the static -configuration -engine to create containers, homes, etc. -</p> -<p><b><tt>Static_CCM_App.mpc</tt></b> - this file contains the -necessary -files for building the static application. You have to manually change -this file so as to include files that are not known to the static -configurator. -</p> -<p><b><tt>Static_Assembly_Config.h</tt></b> - this file contains the -C++ -intermediate representation of all the information in the .cad, .csd -and -.ssd XML files. -</p> -<p><a name="Example"></a><b>Example</b> - An <a - href="static_config_example.html">example</a> -run is shown using the <a href="../examples/OEP/BasicSP">BasicSP</a> -scenario. -</p> -<h3><a name="futurework"></a><b>5. Future work</b></h3> -<p>The current implementation does not have support for multiple -component -servers running on multiple processors. Multiprocessor scenario -involves -coordination and synchronization among the component servers running on -different processors. There has to be some kind of a mediator which -determines -that all components are instantiated before connections can be made -among -them.<br> -<br> - -</p> -</body> -</html> diff --git a/TAO/CIAO/docs/static_ciao_index.html b/TAO/CIAO/docs/static_ciao_index.html deleted file mode 100755 index 627e07c65ca..00000000000 --- a/TAO/CIAO/docs/static_ciao_index.html +++ /dev/null @@ -1,23 +0,0 @@ -<html> - -<head> -<meta name="GENERATOR" content="Microsoft FrontPage 5.0"> -<meta name="ProgId" content="FrontPage.Editor.Document"> -<title>New Page 1</title> -<!-- $Id$ --> - -</head> - -<frameset cols="294,*"> - <frame name="contents" target="main" src="static_ciao_toc.html"> - <frame name="main" src="static_ciao_contents.html" target="main"> - <noframes> - <body> - - <p>This page uses frames, but your browser doesn't support them.</p> - - </body> - </noframes> -</frameset> - -</html> diff --git a/TAO/CIAO/docs/static_ciao_toc.html b/TAO/CIAO/docs/static_ciao_toc.html deleted file mode 100755 index 35adb51ec1c..00000000000 --- a/TAO/CIAO/docs/static_ciao_toc.html +++ /dev/null @@ -1,26 +0,0 @@ -<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <meta name="Author" content="Venkita Subramonian"> - <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> - <title>CIAO Static Configuration</title> - <base target="contents"> -<!-- $Id$ --> -</head> -<body> -<h3 align="center">CIAO Static Configuration Documentation </h3> - -<ol> - -<li><a target="main" href="static_ciao_contents.html#intro">Introduction</a></li> -<li><a target="main" href="static_ciao_contents.html#currentarch">Current CIAO Configuration -Architecture</a></li> -<li><a target="main" href="static_ciao_contents.html#staticapproach">Static Configuration -Approach</a></li> -<li><a target="main" href="static_ciao_contents.html#status">Status of CIAO Static Configuration</a><br> -<a target="main" href="static_ciao_contents.html#Example">Example</a></li> -<li><a target="main" href="static_ciao_contents.html#futurework">Future work</a></li> -</ol> -</body> -</html> diff --git a/TAO/CIAO/docs/static_config_example.html b/TAO/CIAO/docs/static_config_example.html deleted file mode 100644 index 5e8c806e2cd..00000000000 --- a/TAO/CIAO/docs/static_config_example.html +++ /dev/null @@ -1,1353 +0,0 @@ -<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> -<html> -<head> - <meta http-equiv="Content-Type" - content="text/html; charset=iso-8859-1"> - <meta name="Author" content="Venkita Subramonian"> - <meta name="GENERATOR" - content="Mozilla/4.76 [en] (Windows NT 5.0; U) [Netscape]"> - <title>BasicSP example using CIAO Static Configurator</title> -<!-- $Id$ --> -</head> -<body> -This example illustrates -how to use the CIAO static configurator for building applications -statically. -For an example using RTCORBA policies, see <a - href="static_config_rtexample.html">BasicSP with RTCORBA extensions</a>. -From the <a href="../examples/OEP/BasicSP">BasicSP</a> directory do -the -following. -<p><b><tt>> cd descriptors</tt></b> -<br> -<b><tt>> $CIAO_ROOT/tools/static_configurator/Static_Assembly_Parser --a BasicSP.cad</tt></b> -</p> -<p>The following files are generated - -</p> -<p><a href="#Static_Assembly_Config.h">Static_Assembly_Config.h</a> -<br> -<a href="#Static_CCM_App.cpp">Static_CCM_App.cpp</a> -<br> -<a href="#Static_CCM_App.mpc">Static_CCM_App.mpc</a> -</p> -<p><a href="#Static_Assembly_Config.h">Static_Assembly_Config.h</a> -contains -the intermediate representation of all the parsed component and -assembly -information obtained from the XML files. <a href="#Static_CCM_App.cpp">Static_CCM_App.cpp</a> -contains the main driver application. Here a runtime <a - href="#static%20config%20engine">static -configuration engine</a> is used to create containers, homes, -components, -etc and then establish necessary connections between the components. In -the BasicSP example, an external controller (see <tt><a - href="../examples/OEP/BasicSP/README">$CIAO_ROOT/examples/OEP/BasicSP/README</a></tt>) -is used to start or stop a pulser. The generated main driver -application -(Static_CCM_App.cpp) is <a href="#Modified%20Static_CCM_App.cpp">modified</a> -to add code to trigger the pulser object on. The generated .mpc file is -<a href="#Modified%20Static_CCM_App.mpc">modified</a> -to add all other necessary files so that the application can be built -statically. -Note that the static configurator only generates only certain file -names -in the .mpc file. These filenames are obtained from the XML descriptor -files. All other necessary files have to be added manually as -indicated. -</p> -<p>Now the static build files can be generated by running the mpc -utility. -</p> -<p><b><tt>> cd ..</tt></b> -<br> -<b><tt>> $ACE_ROOT/bin/mpc -static Static_CCM_App.mpc</tt></b> -</p> -<p><a name="Static_Assembly_Config.h"></a><b><u>Static_Assembly_Config.h</u></b> -<br> -<tt><font color="#3333ff">#include "Static_Assembly.h"</font></tt> -</p> -<p><tt><font color="#3333ff">#include "CCM_ContainerC.h"</font></tt> -<br> -<tt><font color="#3333ff">#include "Container_Base.h"</font></tt> -</p> -<p><tt><font color="#3333ff">//Containers</font></tt> -<br> -<tt><font color="#3333ff">CIAO::Static_Config::ContainerAttributes -containers_table_[]=</font></tt> -<br> -<tt><font color="#3333ff">{</font></tt> -<br> -<tt><font color="#3333ff"> {"", 0}</font></tt> -<br> -<tt><font color="#3333ff">};</font></tt> -<br> - -</p> -<p><tt><font color="#3333ff">extern "C" -::Components::HomeExecutorBase_ptr -createECHome_Impl (void);</font></tt> -<br> -<tt><font color="#3333ff">extern "C" ::PortableServer::Servant -createECHome_Servant</font></tt> -<br> -<tt><font color="#3333ff"> (::Components::HomeExecutorBase_ptr -p,</font></tt> -<br> -<tt><font color="#3333ff"> ::CIAO::Session_Container *c</font></tt> -<br> -<tt><font color="#3333ff"> ACE_ENV_ARG_DECL_WITH_DEFAULTS);</font></tt> -<br> -<tt><font color="#3333ff">extern "C" ::Components::HomeExecutorBase_ptr -createBMDeviceHome_Impl (void);</font></tt> -<br> -<tt><font color="#3333ff">extern "C" ::PortableServer::Servant -createBMDeviceHome_Servant</font></tt> -<br> -<tt><font color="#3333ff"> (::Components::HomeExecutorBase_ptr -p,</font></tt> -<br> -<tt><font color="#3333ff"> ::CIAO::Session_Container *c</font></tt> -<br> -<tt><font color="#3333ff"> ACE_ENV_ARG_DECL_WITH_DEFAULTS);</font></tt> -<br> -<tt><font color="#3333ff">extern "C" ::Components::HomeExecutorBase_ptr -createBMClosedEDHome_Impl (void);</font></tt> -<br> -<tt><font color="#3333ff">extern "C" ::PortableServer::Servant -createBMClosedEDHome_Servant</font></tt> -<br> -<tt><font color="#3333ff"> (::Components::HomeExecutorBase_ptr -p,</font></tt> -<br> -<tt><font color="#3333ff"> ::CIAO::Session_Container *c</font></tt> -<br> -<tt><font color="#3333ff"> ACE_ENV_ARG_DECL_WITH_DEFAULTS);</font></tt> -<br> -<tt><font color="#3333ff">extern "C" ::Components::HomeExecutorBase_ptr -createBMDisplayHome_Impl (void);</font></tt> -<br> -<tt><font color="#3333ff">extern "C" ::PortableServer::Servant -createBMDisplayHome_Servant</font></tt> -<br> -<tt><font color="#3333ff"> (::Components::HomeExecutorBase_ptr -p,</font></tt> -<br> -<tt><font color="#3333ff"> ::CIAO::Session_Container *c</font></tt> -<br> -<tt><font color="#3333ff"> ACE_ENV_ARG_DECL_WITH_DEFAULTS);</font></tt> -<br> -<tt><font color="#3333ff">//Homes</font></tt> -<br> -<tt><font color="#3333ff">CIAO::Static_Config::HomeAttributes -homes_table_[]=</font></tt> -<br> -<tt><font color="#3333ff">{</font></tt> -<br> -<tt><font color="#3333ff"> {"a_ECHome", -"DCE:3148F760-F2ED-4204-A775-6B972C10E8CB", -"createECHome_Impl", createECHome_Impl, -"DCE:75309233-0E0A-4cfb-B186-3E99F69B1D40", -"createECHome_Servant", createECHome_Servant, 0, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {"a_BMDeviceHome", -"DCE:82C2B032-37F0-4315-A59F-7020D3264E4D", -"createBMDeviceHome_Impl", createBMDeviceHome_Impl, -"DCE:93D254CF-9538-44e8-BB98-AABCD134ADD3", -"createBMDeviceHome_Servant", createBMDeviceHome_Servant, 0, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {"a_BMClosedEDHome", -"DCE:8E6C468D-A39F-46b4-962B-265F1AA8D538", -"createBMClosedEDHome_Impl", createBMClosedEDHome_Impl, -"DCE:CDC06FCA-50FC-43ca-8ECC-BEFBD33FEE78", -"createBMClosedEDHome_Servant", createBMClosedEDHome_Servant, 0, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {"a_BMDisplayHome", -"DCE:8E92655E-CA07-46C8-B127-0F0872A8CC29", -"createBMDisplayHome_Impl", createBMDisplayHome_Impl, -"DCE:D7984625-8561-431d-9927-4E498B317C02", -"createBMDisplayHome_Servant", createBMDisplayHome_Servant, 0, 0 }</font></tt> -<br> -<tt><font color="#3333ff">};</font></tt> -<br> - -</p> -<p><tt><font color="#3333ff">//Components</font></tt> -<br> -<tt><font color="#3333ff">CIAO::Static_Config::ComponentAttributes -components_table_[]=</font></tt> -<br> -<tt><font color="#3333ff">{</font></tt> -<br> -<tt><font color="#3333ff"> {"a_EC", 0, 0, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {"a_BMDevice", -1, -1, 1 },</font></tt> -<br> -<tt><font color="#3333ff"> {"a_BMClosedED", -1, -1, 2 },</font></tt> -<br> -<tt><font color="#3333ff"> {"a_BMDisplay", -1, -1, 3 }</font></tt> -<br> -<tt><font color="#3333ff">};</font></tt> -<br> - -</p> -<p><tt><font color="#3333ff">//Component Registrations</font></tt> -<br> -<tt><font color="#3333ff">CIAO::Assembly_Placement::componentinstantiation::Register_Info -component_registrations_table_[]=</font></tt> -<br> -<tt><font color="#3333ff">{</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Placement::componentinstantiation::COMPONENT, -CIAO::Assembly_Placement::componentinstantiation::IORFILE, "", "ec.ior" -}</font></tt> -<br> -<tt><font color="#3333ff">};</font></tt> -<br> - -</p> -<p><tt><font color="#3333ff">//Connections</font></tt> -<br> -<tt><font color="#3333ff">CIAO::Static_Config::ConnectionAttributes -connections_table_[]=</font></tt> -<br> -<tt><font color="#3333ff">{</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::PUBLISHER_CONSUMER, -"", "timeout", 0, 1, 0, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::PUBLISHER_CONSUMER, -"", "data_available", 3, 4, 0, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::PUBLISHER_CONSUMER, -"", "out_avail", 6, 7, 0, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::INTERFACE, -"", "datain", 9, 10, 0, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::INTERFACE, -"", "comp_data", 12, 13, 0, 0 }</font></tt> -<br> -<tt><font color="#3333ff">};</font></tt> -<br> - -</p> -<p><tt><font color="#3333ff">//Resolver Infos</font></tt> -<br> -<tt><font color="#3333ff">CIAO::Static_Config::ResolveInfoAttributes -resolvers_table_[]=</font></tt> -<br> -<tt><font color="#3333ff">{</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::COMP_IDREF, -"a_EC", -1, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::CONSUMER, -"timeout", 2, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::COMP_IDREF, -"a_BMDevice", -1, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::COMP_IDREF, -"a_BMDevice", -1, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::CONSUMER, -"in_avail", 5, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::COMP_IDREF, -"a_BMClosedED", -1, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::COMP_IDREF, -"a_BMClosedED", -1, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::CONSUMER, -"data_ready", 8, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::COMP_IDREF, -"a_BMDisplay", -1, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::COMP_IDREF, -"a_BMClosedED", -1, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::PROVIDER, -"data_read", 11, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::COMP_IDREF, -"a_BMDevice", -1, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::COMP_IDREF, -"a_BMDisplay", -1, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::PROVIDER, -"dataout", 14, 0 },</font></tt> -<br> -<tt><font color="#3333ff"> {CIAO::Assembly_Connection::COMP_IDREF, -"a_BMClosedED", -1, 0 }</font></tt> -<br> -<tt><font color="#3333ff">};</font></tt> -</p> -<p><a name="Static_CCM_App.cpp"></a><b><u>Static_CCM_App.cpp</u></b> -<br> -<tt><font color="#3333ff">#include "ComponentServer_Impl.h"</font></tt> -<br> -<tt><font color="#3333ff">#include "CIAO_ServersC.h"</font></tt> -<br> -<tt><font color="#3333ff">#include "Server_init.h"</font></tt> -<br> -<tt><font color="#3333ff">#include "Static_Configurator.h"</font></tt> -<br> -<tt><font color="#3333ff">#include "ace/SString.h"</font></tt> -<br> -<tt><font color="#3333ff">#include "ace/Get_Opt.h"</font></tt> -</p> -<p><tt><font color="#3333ff">#include "Static_Assembly_Config.h"</font></tt> -</p> -<p><tt><font color="#3333ff">char *ior_file_name_ = "comp_serv.ior";</font></tt> -</p> -<p><tt><font color="#3333ff">int</font></tt> -<br> -<tt><font color="#3333ff">parse_args (int argc, char *argv[])</font></tt> -<br> -<tt><font color="#3333ff">{</font></tt> -<br> -<tt><font color="#3333ff"> ACE_Get_Opt get_opts (argc, argv, -"k:o:");</font></tt> -<br> -<tt><font color="#3333ff"> int c;</font></tt> -</p> -<p><tt><font color="#3333ff"> while ((c = get_opts ()) != -1)</font></tt> -<br> -<tt><font color="#3333ff"> switch (c)</font></tt> -<br> -<tt><font color="#3333ff"> {</font></tt> -<br> -<tt><font color="#3333ff"> case -'o': -// get the file name to write to</font></tt> -<br> -<tt><font color="#3333ff"> -ior_file_name_ -= get_opts.opt_arg ();</font></tt> -<br> -<tt><font color="#3333ff"> break;</font></tt> -</p> -<p><tt><font color="#3333ff"> case -'?': -// display help for use of the server.</font></tt> -<br> -<tt><font color="#3333ff"> default:</font></tt> -<br> -<tt><font color="#3333ff"> -ACE_ERROR_RETURN ((LM_ERROR,</font></tt> -<br> -<tt><font color="#3333ff"> -"usage: %s\n"</font></tt> -<br> -<tt><font color="#3333ff"> -"-o <ior_output_file>\n"</font></tt> -<br> -<tt><font color="#3333ff"> -"\n",</font></tt> -<br> -<tt><font color="#3333ff"> -argv [0]),</font></tt> -<br> -<tt><font color="#3333ff"> --1);</font></tt> -<br> -<tt><font color="#3333ff"> }</font></tt> -</p> -<p><tt><font color="#3333ff"> return 0;</font></tt> -<br> -<tt><font color="#3333ff">}</font></tt> -<br> - -</p> -<p><tt><font color="#3333ff">int</font></tt> -<br> -<tt><font color="#3333ff">main (int argc, char *argv[])</font></tt> -<br> -<tt><font color="#3333ff">{</font></tt> -<br> -<tt><font color="#3333ff"> ACE_TRY_NEW_ENV</font></tt> -<br> -<tt><font color="#3333ff"> {</font></tt> -<br> -<tt><font color="#3333ff"> // Initialize -orb</font></tt> -<br> -<tt><font color="#3333ff"> CORBA::ORB_var -orb = CORBA::ORB_init (argc,</font></tt> -<br> -<tt><font color="#3333ff"> -argv,</font></tt> -<br> -<tt><font color="#3333ff"> -0</font></tt> -<br> -<tt><font color="#3333ff"> -ACE_ENV_ARG_PARAMETER);</font></tt> -<br> -<tt><font color="#3333ff"> ACE_TRY_CHECK;</font></tt> -</p> -<p><tt><font color="#3333ff"> -CIAO::Server_init -(orb.in ());</font></tt> -</p> -<p><tt><font color="#3333ff"> if -(parse_args -(argc, argv) != 0)</font></tt> -<br> -<tt><font color="#3333ff"> -return -1;</font></tt> -</p> -<p><tt><font color="#3333ff"> // Get -reference -to Root POA.</font></tt> -<br> -<tt><font color="#3333ff"> -CORBA::Object_var -obj</font></tt> -<br> -<tt><font color="#3333ff"> -= orb->resolve_initial_references ("RootPOA"</font></tt> -<br> -<tt><font color="#3333ff"> -ACE_ENV_ARG_PARAMETER);</font></tt> -<br> -<tt><font color="#3333ff"> ACE_TRY_CHECK;</font></tt> -</p> -<p><tt><font color="#3333ff"> -PortableServer::POA_var -poa</font></tt> -<br> -<tt><font color="#3333ff"> -= PortableServer::POA::_narrow (obj.in ()</font></tt> -<br> -<tt><font color="#3333ff"> -ACE_ENV_ARG_PARAMETER);</font></tt> -<br> -<tt><font color="#3333ff"> ACE_TRY_CHECK;</font></tt> -</p> -<p><tt><font color="#3333ff"> // Activate -POA manager</font></tt> -<br> -<tt><font color="#3333ff"> -PortableServer::POAManager_var -mgr</font></tt> -<br> -<tt><font color="#3333ff"> -= poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);</font></tt> -<br> -<tt><font color="#3333ff"> ACE_TRY_CHECK;</font></tt> -</p> -<p><tt><font color="#3333ff"> -mgr->activate -(ACE_ENV_SINGLE_ARG_PARAMETER);</font></tt> -<br> -<tt><font color="#3333ff"> ACE_TRY_CHECK;</font></tt> -</p> -<p><tt><font color="#3333ff"> -CIAO::ComponentServer_Impl -*comserv_servant;</font></tt> -</p> -<p><tt><font color="#3333ff"> -CIAO::Static_Configurator -configurator;</font></tt> -<br> -<tt><font color="#3333ff"> int -containers_table_size -=</font></tt> -<br> -<tt><font color="#3333ff"> -sizeof -(containers_table_)/sizeof(CIAO::Static_Config::ContainerAttributes);</font></tt> -<br> -<tt><font color="#3333ff"> int -homes_table_size -=</font></tt> -<br> -<tt><font color="#3333ff"> -sizeof (homes_table_)/sizeof(CIAO::Static_Config::HomeAttributes);</font></tt> -<br> -<tt><font color="#3333ff"> int -components_table_size -=</font></tt> -<br> -<tt><font color="#3333ff"> -sizeof -(components_table_)/sizeof(CIAO::Static_Config::ComponentAttributes);</font></tt> -<br> -<tt><font color="#3333ff"> int -component_registrations_table_size -=</font></tt> -<br> -<tt><font color="#3333ff"> -sizeof -(component_registrations_table_)/sizeof(CIAO::Assembly_Placement::componentinstantiation::Register_Info);</font></tt> -<br> -<tt><font color="#3333ff"> int -connections_table_size -=</font></tt> -<br> -<tt><font color="#3333ff"> -sizeof -(connections_table_)/sizeof(CIAO::Static_Config::ConnectionAttributes);</font></tt> -<br> -<tt><font color="#3333ff"> int -resolvers_table_size -=</font></tt> -<br> -<tt><font color="#3333ff"> -sizeof -(resolvers_table_)/sizeof(CIAO::Static_Config::ResolveInfoAttributes);</font></tt> -</p> -<p><tt><font color="#3333ff"> -CIAO::HOMECREATOR_FUNCPTR_MAP -home_creator_fptr_map;</font></tt> -<br> -<tt><font color="#3333ff"> -CIAO::HOMESERVANTCREATOR_FUNCPTR_MAP -homesvnt_creator_fptr_map;</font></tt> -<br> -<tt><font color="#3333ff"> -CIAO::Static_Config_EntryPoints_Maps -maps;</font></tt> -<br> -<tt><font color="#3333ff"> -maps.home_creator_funcptr_map_ -= &home_creator_fptr_map;</font></tt> -<br> -<tt><font color="#3333ff"> -maps.home_servant_creator_funcptr_map_ -= &homesvnt_creator_fptr_map;</font></tt> -</p> -<p><tt><font color="#3333ff"> int i=0;</font></tt> -<br> -<tt><font color="#3333ff"> for (i=0; -i<homes_table_size; ++i)</font></tt> -<br> -<tt><font color="#3333ff"> -{</font></tt> -<br> -<tt><font color="#3333ff"> -home_creator_fptr_map.bind (homes_table_[i].executor_entrypt_,</font></tt> -<br> -<tt><font color="#3333ff"> -homes_table_[i].executor_fptr_);</font></tt> -</p> -<p><tt><font color="#3333ff"> -homesvnt_creator_fptr_map.bind (homes_table_[i].servant_entrypt_,</font></tt> -<br> -<tt><font color="#3333ff"> -homes_table_[i].servant_fptr_);</font></tt> -<br> -<tt><font color="#3333ff"> -}</font></tt> -</p> -<p><tt><font color="#3333ff"> -ACE_NEW_RETURN -(comserv_servant,</font></tt> -<br> -<tt><font color="#3333ff"> -CIAO::ComponentServer_Impl (orb.in (),</font></tt> -<br> -<tt><font color="#3333ff"> -poa.in (),</font></tt> -<br> -<tt><font color="#3333ff"> -1,</font></tt> -<br> -<tt><font color="#3333ff"> -&maps),</font></tt> -<br> -<tt><font color="#3333ff"> --1);</font></tt> -</p> -<p><tt><font color="#3333ff"> -PortableServer::ServantBase_var -safe_servant (comserv_servant);</font></tt> -</p> -<p><tt><font color="#3333ff"> -Components::ConfigValues -configs;</font></tt> -</p> -<p><tt><font color="#3333ff"> -comserv_servant->init -(configs</font></tt> -<br> -<tt><font color="#3333ff"> -ACE_ENV_ARG_PARAMETER);</font></tt> -<br> -<tt><font color="#3333ff"> ACE_TRY_CHECK;</font></tt> -</p> -<p><tt><font color="#3333ff"> // -Configuring -ComponentServer.</font></tt> -<br> -<tt><font color="#3333ff"> -PortableServer::ObjectId_var -cs_oid</font></tt> -<br> -<tt><font color="#3333ff"> -= poa->activate_object (comserv_servant</font></tt> -<br> -<tt><font color="#3333ff"> -ACE_ENV_ARG_PARAMETER);</font></tt> -<br> -<tt><font color="#3333ff"> ACE_TRY_CHECK;</font></tt> -</p> -<p><tt><font color="#3333ff"> obj = -poa->id_to_reference -(cs_oid.in ()</font></tt> -<br> -<tt><font color="#3333ff"> -ACE_ENV_ARG_PARAMETER);</font></tt> -<br> -<tt><font color="#3333ff"> ACE_TRY_CHECK;</font></tt> -</p> -<p><tt><font color="#3333ff"> -Components::Deployment::ComponentServer_var -comserv_obj =</font></tt> -<br> -<tt><font color="#3333ff"> -Components::Deployment::ComponentServer::_narrow (obj.in ()</font></tt> -<br> -<tt><font color="#3333ff"> -ACE_ENV_ARG_PARAMETER);</font></tt> -<br> -<tt><font color="#3333ff"> ACE_TRY_CHECK;</font></tt> -</p> -<p><tt><font color="#3333ff"> if -(CORBA::is_nil -(comserv_obj.in ()))</font></tt> -<br> -<tt><font color="#3333ff"> -ACE_ERROR_RETURN ((LM_ERROR, "Unable to activate ComponentServer -object\n"), --1);</font></tt> -<br> - -</p> -<p><tt><font color="#3333ff"> -Components::Deployment::ServerActivator_var -activator;</font></tt> -<br> -<tt><font color="#3333ff"> -Components::ConfigValues_var -config = new Components::ConfigValues;</font></tt> -</p> -<p><tt><font color="#3333ff"> -comserv_servant->set_objref -(activator.in (),</font></tt> -<br> -<tt><font color="#3333ff"> -config,</font></tt> -<br> -<tt><font color="#3333ff"> -comserv_obj.in ()</font></tt> -<br> -<tt><font color="#3333ff"> -ACE_ENV_ARG_PARAMETER);</font></tt> -<br> -<tt><font color="#3333ff"> ACE_TRY_CHECK;</font></tt> -</p> -<p><a name="static config engine"></a><tt><font color="#ff0000">configurator.configure -(orb.in (),</font></tt> -<br> -<tt><font color="#ff0000"> -comserv_obj.in (),</font></tt> -<br> -<tt><font color="#ff0000"> -containers_table_,</font></tt> -<br> -<tt><font color="#ff0000"> -containers_table_size,</font></tt> -<br> -<tt><font color="#ff0000"> -homes_table_,</font></tt> -<br> -<tt><font color="#ff0000"> -homes_table_size,</font></tt> -<br> -<tt><font color="#ff0000"> -components_table_,</font></tt> -<br> -<tt><font color="#ff0000"> -components_table_size,</font></tt> -<br> -<tt><font color="#ff0000"> -component_registrations_table_,</font></tt> -<br> -<tt><font color="#ff0000"> -component_registrations_table_size,</font></tt> -<br> -<tt><font color="#ff0000"> -connections_table_,</font></tt> -<br> -<tt><font color="#ff0000"> -connections_table_size,</font></tt> -<br> -<tt><font color="#ff0000"> -resolvers_table_,</font></tt> -<br> -<tt><font color="#ff0000"> -resolvers_table_size);</font></tt> -</p> -<p><tt><font color="#3333ff"> -CORBA::String_var -str = orb->object_to_string (comserv_obj.in ()</font></tt> -<br> -<tt><font color="#3333ff"> -ACE_ENV_ARG_PARAMETER);</font></tt> -</p> -<p><tt><font color="#3333ff"> -CIAO::Utility::write_IOR -(ior_file_name_, str.in ());</font></tt> -<br> -<tt><font color="#3333ff"> ACE_DEBUG -((LM_INFO, "ComponentServer IOR: %s\n", str.in ()));</font></tt> -</p> -<p><tt><font color="#3333ff"> ACE_DEBUG -((LM_DEBUG,</font></tt> -<br> -<tt><font color="#3333ff"> -"Running ComponentServer...\n"));</font></tt> -</p> -<p><tt><font color="#3333ff"> // Run the -main event loop for the ORB.</font></tt> -<br> -<tt><font color="#3333ff"> orb->run -(ACE_ENV_SINGLE_ARG_PARAMETER);</font></tt> -<br> -<tt><font color="#3333ff"> ACE_TRY_CHECK</font></tt> -<br> -<tt><font color="#3333ff"> }</font></tt> -<br> -<tt><font color="#3333ff"> ACE_CATCHANY</font></tt> -<br> -<tt><font color="#3333ff"> {</font></tt> -<br> -<tt><font color="#3333ff"> -ACE_PRINT_EXCEPTION -(ACE_ANY_EXCEPTION,</font></tt> -<br> -<tt><font color="#3333ff"> -"server::main \n");</font></tt> -<br> -<tt><font color="#3333ff"> return 1;</font></tt> -<br> -<tt><font color="#3333ff"> }</font></tt> -<br> -<tt><font color="#3333ff"> ACE_ENDTRY;</font></tt> -</p> -<p><tt><font color="#3333ff"> return 0;</font></tt> -<br> -<tt><font color="#3333ff">}</font></tt> -</p> -<p><a name="Static_CCM_App.mpc"></a><b><u>Static_CCM_App.mpc</u></b> -<br> -<tt><font color="#3333ff">project(Static_CCM_App) : ciao_server, -ciao_client, -rtcorba, rtportableserver, iortable, acexml {</font></tt> -<br> -<tt><font color="#3333ff">includes += -$(ACE_ROOT)/TAO/CIAO/tools/Assembly_Deployer</font></tt> -<br> -<tt><font color="#3333ff">includes += -$(ACE_ROOT)/TAO/CIAO/tools/static_configurator</font></tt> -<br> -<tt><font color="#3333ff">libs += CIAO_XML_Helpers Static_Configurator</font></tt> -<br> -<tt><font color="#3333ff">after += CIAO_XML_Helpers Static_Configurator</font></tt> -<br> - -</p> -<p><tt><font color="#3333ff">libs += EC_exec</font></tt> -<br> -<tt><font color="#3333ff">after += EC_exec</font></tt> -<br> -<tt><font color="#3333ff">libs += EC_svnt</font></tt> -<br> -<tt><font color="#3333ff">after += EC_svnt</font></tt> -<br> -<tt><font color="#3333ff">libs += BMDevice_exec</font></tt> -<br> -<tt><font color="#3333ff">after += BMDevice_exec</font></tt> -<br> -<tt><font color="#3333ff">libs += BMDevice_svnt</font></tt> -<br> -<tt><font color="#3333ff">after += BMDevice_svnt</font></tt> -<br> -<tt><font color="#3333ff">libs += BMClosedED_exec</font></tt> -<br> -<tt><font color="#3333ff">after += BMClosedED_exec</font></tt> -<br> -<tt><font color="#3333ff">libs += BMClosedED_svnt</font></tt> -<br> -<tt><font color="#3333ff">after += BMClosedED_svnt</font></tt> -<br> -<tt><font color="#3333ff">libs += BMDisplay_exec</font></tt> -<br> -<tt><font color="#3333ff">after += BMDisplay_exec</font></tt> -<br> -<tt><font color="#3333ff">libs += BMDisplay_svnt</font></tt> -<br> -<tt><font color="#3333ff">after += BMDisplay_svnt</font></tt> -<br> -<tt><font color="#3333ff"> Source_Files {</font></tt> -<br> -<tt><font color="#3333ff"> -Static_CCM_App.cpp</font></tt> -<br> -<tt><font color="#3333ff"> }</font></tt> -</p> -<p><tt><font color="#3333ff"> IDL_Files {</font></tt> -<br> -<tt><font color="#3333ff"> }</font></tt> -<br> -<tt><font color="#3333ff">}</font></tt> -</p> -<p><a name="Modified Static_CCM_App.cpp"></a><b><u>Modified -Static_CCM_App.cpp</u></b> <br> -</p> -<p><small><span style="font-weight: bold;">(Highlighted text is -manually added to the -generated .cpp file)<br> -<br> -</span></small><tt>#include "ComponentServer_Impl.h"</tt> -<br> -<tt>#include "CIAO_ServersC.h"</tt> -<br> -<tt>#include "Server_init.h"</tt> -<br> -<tt>#include "Static_Configurator.h"</tt> -<br> -<tt>#include "ace/SString.h"</tt> -<br> -<tt>#include "ace/Get_Opt.h"</tt> -</p> -<p><tt>#include "Static_Assembly_Config.h"</tt> -</p> -<p><tt>char *ior_file_name_ = "comp_serv.ior";</tt> -<br> -<b><tt><font color="#990000">int rate = 2;</font></tt></b> -</p> -<p><tt>int</tt> -<br> -<tt>parse_args (int argc, char *argv[])</tt> -<br> -<tt>{</tt> -<br> -<tt> ACE_Get_Opt get_opts (argc, argv, "k:o:");</tt> -<br> -<tt> int c;</tt> -</p> -<p><tt> while ((c = get_opts ()) != -1)</tt> -<br> -<tt> switch (c)</tt> -<br> -<tt> {</tt> -<br> -<tt> case 'o': // get the file -name to write to</tt> -<br> -<tt> ior_file_name_ = -get_opts.opt_arg -();</tt> -<br> -<tt> break;</tt> -</p> -<p><tt> case '?': // display help -for -use of the server.</tt> -<br> -<tt> default:</tt> -<br> -<tt> ACE_ERROR_RETURN -((LM_ERROR,</tt> -<br> -<tt> -"usage: %s\n"</tt> -<br> -<tt> -"-o <ior_output_file>\n"</tt> -<br> -<tt> -"\n",</tt> -<br> -<tt> -argv [0]),</tt> -<br> -<tt> --1);</tt> -<br> -<tt> }</tt> -</p> -<p><tt> return 0;</tt> -<br> -<tt>}</tt> -<br> - -</p> -<p><tt>int</tt> -<br> -<tt>main (int argc, char *argv[])</tt> -<br> -<tt>{</tt> -<br> -<tt> ACE_TRY_NEW_ENV</tt> -<br> -<tt> {</tt> -<br> -<tt> // Initialize orb</tt> -<br> -<tt> CORBA::ORB_var orb = CORBA::ORB_init -(argc,</tt> -<br> -<tt> -argv,</tt> -<br> -<tt> -0</tt> -<br> -<tt> -ACE_ENV_ARG_PARAMETER);</tt> -<br> -<tt> ACE_TRY_CHECK;</tt> -</p> -<p><tt> CIAO::Server_init (orb.in ());</tt> -</p> -<p><tt> if (parse_args (argc, argv) != 0)</tt> -<br> -<tt> return -1;</tt> -</p> -<p><tt> // Get reference to Root POA.</tt> -<br> -<tt> CORBA::Object_var obj</tt> -<br> -<tt> = -orb->resolve_initial_references -("RootPOA"</tt> -<br> -<tt> -ACE_ENV_ARG_PARAMETER);</tt> -<br> -<tt> ACE_TRY_CHECK;</tt> -</p> -<p><tt> PortableServer::POA_var poa</tt> -<br> -<tt> = -PortableServer::POA::_narrow -(obj.in ()</tt> -<br> -<tt> -ACE_ENV_ARG_PARAMETER);</tt> -<br> -<tt> ACE_TRY_CHECK;</tt> -</p> -<p><tt> // Activate POA manager</tt> -<br> -<tt> PortableServer::POAManager_var mgr</tt> -<br> -<tt> = poa->the_POAManager -(ACE_ENV_SINGLE_ARG_PARAMETER);</tt> -<br> -<tt> ACE_TRY_CHECK;</tt> -</p> -<p><tt> mgr->activate -(ACE_ENV_SINGLE_ARG_PARAMETER);</tt> -<br> -<tt> ACE_TRY_CHECK;</tt> -</p> -<p><tt> CIAO::ComponentServer_Impl -*comserv_servant;</tt> -</p> -<p><tt> CIAO::Static_Configurator -configurator;</tt> -<br> -<tt> int containers_table_size =</tt> -<br> -<tt> sizeof -(containers_table_)/sizeof(CIAO::Static_Config::ContainerAttributes);</tt> -<br> -<tt> int homes_table_size =</tt> -<br> -<tt> sizeof -(homes_table_)/sizeof(CIAO::Static_Config::HomeAttributes);</tt> -<br> -<tt> int components_table_size =</tt> -<br> -<tt> sizeof -(components_table_)/sizeof(CIAO::Static_Config::ComponentAttributes);</tt> -<br> -<tt> int -component_registrations_table_size -=</tt> -<br> -<tt> sizeof -(component_registrations_table_)/sizeof(CIAO::Assembly_Placement::componentinstantiation::Register_Info);</tt> -<br> -<tt> int connections_table_size =</tt> -<br> -<tt> sizeof -(connections_table_)/sizeof(CIAO::Static_Config::ConnectionAttributes);</tt> -<br> -<tt> int resolvers_table_size =</tt> -<br> -<tt> sizeof -(resolvers_table_)/sizeof(CIAO::Static_Config::ResolveInfoAttributes);</tt> -</p> -<p><tt> CIAO::HOMECREATOR_FUNCPTR_MAP -home_creator_fptr_map;</tt> -<br> -<tt> CIAO::HOMESERVANTCREATOR_FUNCPTR_MAP -homesvnt_creator_fptr_map;</tt> -<br> -<tt> CIAO::Static_Config_EntryPoints_Maps -maps;</tt> -<br> -<tt> maps.home_creator_funcptr_map_ = -&home_creator_fptr_map;</tt> -<br> -<tt> -maps.home_servant_creator_funcptr_map_ -= &homesvnt_creator_fptr_map;</tt> -</p> -<p><tt> int i=0;</tt> -<br> -<tt> for (i=0; i<homes_table_size; -++i)</tt> -<br> -<tt> {</tt> -<br> -<tt> -home_creator_fptr_map.bind -(homes_table_[i].executor_entrypt_,</tt> -<br> -<tt> -homes_table_[i].executor_fptr_);</tt> -</p> -<p><tt> -homesvnt_creator_fptr_map.bind -(homes_table_[i].servant_entrypt_,</tt> -<br> -<tt> -homes_table_[i].servant_fptr_);</tt> -<br> -<tt> }</tt> -</p> -<p><tt> ACE_NEW_RETURN (comserv_servant,</tt> -<br> -<tt> -CIAO::ComponentServer_Impl (orb.in (),</tt> -<br> -<tt> -poa.in (),</tt> -<br> -<tt> -1,</tt> -<br> -<tt> -&maps),</tt> -<br> -<tt> --1);</tt> -</p> -<p><tt> PortableServer::ServantBase_var -safe_servant -(comserv_servant);</tt> -</p> -<p><tt> Components::ConfigValues configs;</tt> -</p> -<p><tt> comserv_servant->init (configs</tt> -<br> -<tt> -ACE_ENV_ARG_PARAMETER);</tt> -<br> -<tt> ACE_TRY_CHECK;</tt> -</p> -<p><tt> // Configuring ComponentServer.</tt> -<br> -<tt> PortableServer::ObjectId_var cs_oid</tt> -<br> -<tt> = -poa->activate_object -(comserv_servant</tt> -<br> -<tt> -ACE_ENV_ARG_PARAMETER);</tt> -<br> -<tt> ACE_TRY_CHECK;</tt> -</p> -<p><tt> obj = poa->id_to_reference -(cs_oid.in -()</tt> -<br> -<tt> -ACE_ENV_ARG_PARAMETER);</tt> -<br> -<tt> ACE_TRY_CHECK;</tt> -</p> -<p><tt> -Components::Deployment::ComponentServer_var -comserv_obj =</tt> -<br> -<tt> -Components::Deployment::ComponentServer::_narrow -(obj.in ()</tt> -<br> -<tt> -ACE_ENV_ARG_PARAMETER);</tt> -<br> -<tt> ACE_TRY_CHECK;</tt> -</p> -<p><tt> if (CORBA::is_nil (comserv_obj.in -()))</tt> -<br> -<tt> ACE_ERROR_RETURN -((LM_ERROR, -"Unable to activate ComponentServer object\n"), -1);</tt> -<br> - -</p> -<p><tt> -Components::Deployment::ServerActivator_var -activator;</tt> -<br> -<tt> Components::ConfigValues_var config -= new Components::ConfigValues;</tt> -</p> -<p><tt> comserv_servant->set_objref -(activator.in -(),</tt> -<br> -<tt> -config,</tt> -<br> -<tt> -comserv_obj.in ()</tt> -<br> -<tt> -ACE_ENV_ARG_PARAMETER);</tt> -<br> -<tt> ACE_TRY_CHECK;</tt> -</p> -<p><tt> configurator.configure (orb.in (),</tt> -<br> -<tt> -comserv_obj.in (),</tt> -<br> -<tt> -containers_table_,</tt> -<br> -<tt> -containers_table_size,</tt> -<br> -<tt> -homes_table_,</tt> -<br> -<tt> -homes_table_size,</tt> -<br> -<tt> -components_table_,</tt> -<br> -<tt> -components_table_size,</tt> -<br> -<tt> -component_registrations_table_,</tt> -<br> -<tt> -component_registrations_table_size,</tt> -<br> -<tt> -connections_table_,</tt> -<br> -<tt> -connections_table_size,</tt> -<br> -<tt> -resolvers_table_,</tt> -<br> -<tt> -resolvers_table_size);</tt> -</p> -<p><tt> CORBA::String_var str = -orb->object_to_string -(comserv_obj.in ()</tt> -<br> -<tt> -ACE_ENV_ARG_PARAMETER);</tt> -</p> -<p><tt> CIAO::Utility::write_IOR -(ior_file_name_, -str.in ());</tt> -<br> -<tt> ACE_DEBUG ((LM_INFO, -"ComponentServer -IOR: %s\n", str.in ()));</tt> -</p> -<p><tt> ACE_DEBUG ((LM_DEBUG,</tt> -<br> -<tt> -"Running ComponentServer...\n"));</tt> -</p> -<p><b><tt><font color="#990000"> -CORBA::Object_var -pulser_obj</font></tt></b> -<br> -<b><tt><font color="#990000"> -= orb->string_to_object ("file://ec.ior"</font></tt></b> -<br> -<b><tt><font color="#990000"> -ACE_ENV_ARG_PARAMETER);</font></tt></b> -<br> -<b><tt><font color="#990000"> -ACE_TRY_CHECK;</font></tt></b> -</p> -<p><b><tt><font color="#990000"> -BasicSP::EC_var -pulser</font></tt></b> -<br> -<b><tt><font color="#990000"> -= BasicSP::EC::_narrow (pulser_obj.in ()</font></tt></b> -<br> -<b><tt><font color="#990000"> -ACE_ENV_ARG_PARAMETER);</font></tt></b> -<br> -<b><tt><font color="#990000"> -ACE_TRY_CHECK;</font></tt></b> -</p> -<p><b><tt><font color="#990000"> if -(CORBA::is_nil -(pulser.in ()))</font></tt></b> -<br> -<b><tt><font color="#990000"> -ACE_ERROR_RETURN ((LM_ERROR, "Unable to acquire 'EC' objref\n"), -1);</font></tt></b> -</p> -<p><b><tt><font color="#990000"> -pulser->hertz -(rate</font></tt></b> -<br> -<b><tt><font color="#990000"> -ACE_ENV_ARG_PARAMETER);</font></tt></b> -<br> -<b><tt><font color="#990000"> -ACE_TRY_CHECK;</font></tt></b> -</p> -<p><b><tt><font color="#990000"> -ACE_DEBUG -((LM_DEBUG, "Start up the Event services\n"));</font></tt></b> -</p> -<p><b><tt><font color="#990000"> -pulser->start -(ACE_ENV_SINGLE_ARG_PARAMETER);</font></tt></b> -<br> -<b><tt><font color="#990000"> -ACE_TRY_CHECK;</font></tt></b> -</p> -<p><tt> // Run the main event loop for -the -ORB.</tt> -<br> -<tt> orb->run -(ACE_ENV_SINGLE_ARG_PARAMETER);</tt> -<br> -<tt> ACE_TRY_CHECK</tt> -<br> -<tt> }</tt> -<br> -<tt> ACE_CATCHANY</tt> -<br> -<tt> {</tt> -<br> -<tt> ACE_PRINT_EXCEPTION -(ACE_ANY_EXCEPTION,</tt> -<br> -<tt> -"server::main \n");</tt> -<br> -<tt> return 1;</tt> -<br> -<tt> }</tt> -<br> -<tt> ACE_ENDTRY;</tt> -</p> -<p><tt> return 0;</tt> -<br> -<tt>}</tt> -</p> -<p><a name="Modified Static_CCM_App.mpc"></a><b><u>Modified -Static_CCM_App.mpc</u></b> <br> -</p> -<p><small><span style="font-weight: bold;">(Highlighted text is -manually added to the -generated .cpp file)<br> -<br> -</span></small><tt>project(Static_CCM_App) : ciao_server, ciao_client, -rtcorba, -rtportableserver, -iortable, acexml {</tt> -<br> -<tt>includes += $(ACE_ROOT)/TAO/CIAO/tools/Assembly_Deployer</tt> -<br> -<tt>includes += $(ACE_ROOT)/TAO/CIAO/tools/static_configurator</tt> -<br> -<tt>libs += CIAO_XML_Helpers Static_Configurator</tt> -<br> -<tt>after += CIAO_XML_Helpers Static_Configurator</tt> -</p> -<p><b><tt><font color="#990000">libs += BasicSP_stub BasicSP_svnt</font></tt></b> -<br> -<b><tt><font color="#990000">after += BasicSP_stub BasicSP_svnt</font></tt></b> -<br> -<tt>libs += EC_exec</tt> -<br> -<tt>after += EC_exec</tt> -<br> -<tt>libs += EC_svnt <b><font color="#990000">EC_stub</font></b></tt> -<br> -<tt>after += EC_svnt <b><font color="#990000">EC_stub</font></b></tt> -<br> -<tt>libs += BMDevice_exec</tt> -<br> -<tt>after += BMDevice_exec</tt> -<br> -<tt>libs += BMDevice_svnt <b><font color="#990000">BMDevice_stub</font></b></tt> -<br> -<tt>after += BMDevice_svnt <b><font color="#990000">BMDevice_stub</font></b></tt> -<br> -<tt>libs += BMClosedED_exec</tt> -<br> -<tt>after += BMClosedED_exec</tt> -<br> -<tt>libs += BMClosedED_svnt <b><font color="#990000">BMClosedED_stub</font></b></tt> -<br> -<tt>after += BMClosedED_svnt <b><font color="#990000">BMClosedED_stub</font></b></tt> -<br> -<tt>libs += BMDisplay_exec</tt> -<br> -<tt>after += BMDisplay_exec</tt> -<br> -<tt>libs += BMDisplay_svnt <b><font color="#990000">BMDisplay_stub</font></b></tt> -<br> -<tt>after += BMDisplay_svnt <b><font color="#990000">BMDisplay_stub</font></b></tt> -</p> -<p><tt> Source_Files {</tt> -<br> -<tt> Static_CCM_App.cpp</tt> -<br> -<tt> }</tt> -</p> -<p><tt> IDL_Files {</tt> -<br> -<tt> }</tt> -<br> -<tt>}</tt> -<br> - -</p> -</body> -</html> diff --git a/TAO/CIAO/docs/static_config_rtexample.html b/TAO/CIAO/docs/static_config_rtexample.html deleted file mode 100644 index 2e87e5aabe1..00000000000 --- a/TAO/CIAO/docs/static_config_rtexample.html +++ /dev/null @@ -1,1079 +0,0 @@ -<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> -<html> -<head> - <meta http-equiv="Content-Type" - content="text/html; charset=iso-8859-1"> - <meta name="Author" content="Venkita Subramonian"> - <meta name="GENERATOR" - content="Mozilla/4.76 [en] (Windows NT 5.0; U) [Netscape]"> - <title>BasicSP example using CIAO Static Configurator</title> -<!-- $Id$ --> -</head> -<body> -This example illustrates -how to use the CIAO static configurator to build applications using -RTCORBA policies statically. -From the <a href="../examples/OEP/BasicSP">BasicSP</a> directory do -the -following. -<p><b><tt>> cd descriptors</tt></b> -<br> -<b><tt>> $CIAO_ROOT/tools/static_configurator/Static_Assembly_Parser --a BasicSP-rt.cad</tt></b> -</p> -<p>The following files are generated - -</p> -<p><a href="#Static_Assembly_Config.h">Static_Assembly_Config.h</a> -<br> -<a href="#Modified%20Static_CCM_App.cpp">Static_CCM_App.cpp</a> -<br> -<a href="#Modified%20Static_CCM_App.mpc">Static_CCM_App.mpc</a> -</p> -<p><a href="#Static_Assembly_Config.h">Static_Assembly_Config.h</a> -contains -the intermediate representation of all the parsed component and -assembly -information obtained from the XML files. <a href="#Static_CCM_App.cpp">Static_CCM_App.cpp</a> -contains the main driver application. Here a runtime <a - href="#static_config_engine">static -configuration engine</a> is used to create containers, homes, -components, -etc and then establish necessary connections between the components. -The configuration engine is also used to <a href="#rtconfig">configure</a> -the containers and RTORB with the appropriate RTCORBA policies -specified declaratively in the .rtcad file. In -the BasicSP example, an external controller (see <tt><a - href="../examples/OEP/BasicSP/README">$CIAO_ROOT/examples/OEP/BasicSP/README</a></tt>) -is used to start or stop a pulser. The generated main driver -application -(Static_CCM_App.cpp) is <a href="#Modified%20Static_CCM_App.cpp">modified</a> -to add code to trigger the pulser object on. The generated .mpc file is -<a href="#Modified%20Static_CCM_App.mpc">modified</a> -to add all other necessary files so that the application can be built -statically. -Note that the static configurator only generates only certain file -names -in the .mpc file. These filenames are obtained from the XML descriptor -files. All other necessary files have to be added manually as -indicated. -</p> -<p>Now the static build files can be generated by running the mpc -utility. -</p> -<p><b><tt>> cd ..</tt></b> -<br> -<b><tt>> $ACE_ROOT/bin/mpc -static Static_CCM_App.mpc</tt></b> -</p> -<p><a name="Static_Assembly_Config.h"></a><b><u>Static_Assembly_Config.h</u></b> -<br> -<span style="font-family: monospace;">#include "Static_Assembly.h"</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;">#include "CCM_ContainerC.h"</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">#include "Container_Base.h"</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;">//Containers</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">CIAO::Static_Config::ContainerAttributes -containers_table_[]= </span><br style="font-family: monospace;"> -<span style="font-family: monospace;">{</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {"POLICY_1", -0},</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> {"", 0}</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">};</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;">extern "C" -::Components::HomeExecutorBase_ptr createECHome_Impl (void);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">extern "C" -::PortableServer::Servant createECHome_Servant </span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> - (::Components::HomeExecutorBase_ptr p,</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> - ::CIAO::Session_Container *c</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> - ACE_ENV_ARG_DECL_WITH_DEFAULTS);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">extern "C" -::Components::HomeExecutorBase_ptr createBMDeviceHome_Impl (void);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">extern "C" -::PortableServer::Servant createBMDeviceHome_Servant </span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> - (::Components::HomeExecutorBase_ptr p,</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> - ::CIAO::Session_Container *c</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> - ACE_ENV_ARG_DECL_WITH_DEFAULTS);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">extern "C" -::Components::HomeExecutorBase_ptr createBMClosedEDHome_Impl (void);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">extern "C" -::PortableServer::Servant createBMClosedEDHome_Servant </span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> - (::Components::HomeExecutorBase_ptr p,</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> - ::CIAO::Session_Container *c</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> - ACE_ENV_ARG_DECL_WITH_DEFAULTS);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">extern "C" -::Components::HomeExecutorBase_ptr createBMDisplayHome_Impl (void);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">extern "C" -::PortableServer::Servant createBMDisplayHome_Servant </span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> - (::Components::HomeExecutorBase_ptr p,</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> - ::CIAO::Session_Container *c</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> - ACE_ENV_ARG_DECL_WITH_DEFAULTS);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">//Homes</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">CIAO::Static_Config::HomeAttributes -homes_table_[]= </span><br style="font-family: monospace;"> -<span style="font-family: monospace;">{</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {"a_ECHome", -"DCE:3148F760-F2ED-4204-A775-6B972C10E8CB", "createECHome_Impl", -createECHome_Impl, "DCE:75309233-0E0A-4cfb-B186-3E99F69B1D40", -"createECHome_Servant", createECHome_Servant, 0, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{"a_BMDeviceHome", "DCE:82C2B032-37F0-4315-A59F-7020D3264E4D", -"createBMDeviceHome_Impl", createBMDeviceHome_Impl, -"DCE:93D254CF-9538-44e8-BB98-AABCD134ADD3", -"createBMDeviceHome_Servant", createBMDeviceHome_Servant, 0, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{"a_BMClosedEDHome", "DCE:8E6C468D-A39F-46b4-962B-265F1AA8D538", -"createBMClosedEDHome_Impl", createBMClosedEDHome_Impl, -"DCE:CDC06FCA-50FC-43ca-8ECC-BEFBD33FEE78", -"createBMClosedEDHome_Servant", createBMClosedEDHome_Servant, 0, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{"a_BMDisplayHome", "DCE:8E92655E-CA07-46C8-B127-0F0872A8CC29", -"createBMDisplayHome_Impl", createBMDisplayHome_Impl, -"DCE:D7984625-8561-431d-9927-4E498B317C02", -"createBMDisplayHome_Servant", createBMDisplayHome_Servant, 1, 0 }</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">};</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;">//Components</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">CIAO::Static_Config::ComponentAttributes -components_table_[]= </span><br style="font-family: monospace;"> -<span style="font-family: monospace;">{</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {"a_EC", 0, 0, -0 },</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> {"a_BMDevice", --1, -1, 1 },</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -{"a_BMClosedED", -1, -1, 2 },</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -{"a_BMDisplay", -1, -1, 3 }</span><br style="font-family: monospace;"> -<span style="font-family: monospace;">};</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;">//Component Registrations</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">CIAO::Assembly_Placement::componentinstantiation::Register_Info -component_registrations_table_[]= </span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">{</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Placement::componentinstantiation::COMPONENT, -CIAO::Assembly_Placement::componentinstantiation::IORFILE, "", "ec.ior" -}</span><br style="font-family: monospace;"> -<span style="font-family: monospace;">};</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;">//Connections</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">CIAO::Static_Config::ConnectionAttributes -connections_table_[]= </span><br style="font-family: monospace;"> -<span style="font-family: monospace;">{</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::PUBLISHER_CONSUMER, "", "timeout", 0, 1, 0, -0 },</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::PUBLISHER_CONSUMER, "", "data_available", -3, 4, 0, 0 },</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::PUBLISHER_CONSUMER, "", "out_avail", 6, 7, -0, 0 },</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::INTERFACE, "", "datain", 9, 10, 0, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::INTERFACE, "", "comp_data", 12, 13, 0, 0 }</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">};</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;">//Resolver Infos</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">CIAO::Static_Config::ResolveInfoAttributes -resolvers_table_[]= </span><br style="font-family: monospace;"> -<span style="font-family: monospace;">{</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::COMP_IDREF, "a_EC", -1, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::CONSUMER, "timeout", 2, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::COMP_IDREF, "a_BMDevice", -1, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::COMP_IDREF, "a_BMDevice", -1, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::CONSUMER, "in_avail", 5, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::COMP_IDREF, "a_BMClosedED", -1, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::COMP_IDREF, "a_BMClosedED", -1, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::CONSUMER, "data_ready", 8, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::COMP_IDREF, "a_BMDisplay", -1, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::COMP_IDREF, "a_BMClosedED", -1, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::PROVIDER, "data_read", 11, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::COMP_IDREF, "a_BMDevice", -1, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::COMP_IDREF, "a_BMDisplay", -1, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::PROVIDER, "dataout", 14, 0 },</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{CIAO::Assembly_Connection::COMP_IDREF, "a_BMClosedED", -1, 0 }</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">};</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;">//Thread Pool</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">CIAO::Static_Config::ThreadPoolAttributes -thread_pool_table_[]= </span><br style="font-family: monospace;"> -<span style="font-family: monospace;">{</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{"common_pool", 0, 10, 20, 1, 0, 0, 0},</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{"high_prio_pool", 0, 2, 2, 3, 0, 0, 0}</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">};</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;">//Lanes</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">CIAO::Static_Config::LaneAttributes -lane_table_[]= </span><br style="font-family: monospace;"> -<span style="font-family: monospace;">{</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {1, 100, 300},</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {2, 2, 2},</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {3, 1, 2},</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {1, 10, 30},</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {2, 3, 3},</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {3, 1, 2}</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">};</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;">//ThreadPoolLanes</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">CIAO::Static_Config::ThreadPoolLanesAttributes -thread_pool_lanes_table_[]= </span><br style="font-family: monospace;"> -<span style="font-family: monospace;">{</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{"shared_pool", 0, 0, 2, 0, 0, 0, 0},</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {"laned_pool", -0, 3, 5, 0, 0, 0, 0}</span><br style="font-family: monospace;"> -<span style="font-family: monospace;">};</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;">//Bands</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">CIAO::Static_Config::BandAttributes -band_table_[]= </span><br style="font-family: monospace;"> -<span style="font-family: monospace;">{</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {1, 1},</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {2, 2},</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {3, 3000}</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">};</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;">//PriorityBands</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">CIAO::Static_Config::PriorityBandsAttributes -priority_band_table_[]= </span><br style="font-family: monospace;"> -<span style="font-family: monospace;">{</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{"common_conn", 0, 2}</span><br style="font-family: monospace;"> -<span style="font-family: monospace;">};</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;">//Policy Configs</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">CIAO::Static_Config::PolicyConfigAttributes -policy_config_table_[]= </span><br style="font-family: monospace;"> -<span style="font-family: monospace;">{</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{RTCORBA::PRIORITY_MODEL_POLICY_TYPE, "", RTCORBA::SERVER_DECLARED, 2},</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{RTCORBA::THREADPOOL_POLICY_TYPE, "shared_pool", /*dummy variable*/ -RTCORBA::CLIENT_PROPAGATED, 0},</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{RTCORBA::PRIORITY_BANDED_CONNECTION_POLICY_TYPE, "common_conn", -/*dummy variable*/ RTCORBA::CLIENT_PROPAGATED, 0},</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{RTCORBA::THREADPOOL_POLICY_TYPE, "common_pool", /*dummy variable*/ -RTCORBA::CLIENT_PROPAGATED, 0},</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{RTCORBA::PRIORITY_MODEL_POLICY_TYPE, "", RTCORBA::CLIENT_PROPAGATED, 2}</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">};</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;">//Policy Set</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">CIAO::Static_Config::PolicySetAttributes -policy_set_table_[]= </span><br style="font-family: monospace;"> -<span style="font-family: monospace;">{</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {"POLICY_1", -0, 2},</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> {"POLICY_2", -3, 4}</span><br style="font-family: monospace;"> -<span style="font-family: monospace;">};</span><br> -<br> -<tt><font color="#3333ff"></font></tt></p> -<tt><font color="#3333ff"></font></tt><a - name="Modified Static_CCM_App.cpp"></a><b><u>Modified -Static_CCM_App.cpp</u></b> <br> -<p><span style="font-family: monospace;"></span><small><span - style="font-weight: bold;">(Highlighted text is manually added to the -generated .cpp file)</span></small></p> -<p><span style="font-family: monospace;">#include "RTServer_Impl.h"</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">#include "CIAO_ServersC.h"</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">#include "Server_init.h"</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">#include "Static_Configurator.h"</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">#include "ace/SString.h"</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">#include "ace/Get_Opt.h"</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">#include -"Static_Assembly_Config.h"</span><br style="font-family: monospace;"> -<span style="font-family: monospace;">#include -"tao/RTPortableServer/RTPortableServer.h"</span><br - style="font-family: monospace;"> -<span - style="font-family: monospace; color: rgb(153, 0, 0); font-weight: bold;">#include -"EC/ECC.h"</span><br - style="font-family: monospace; color: rgb(153, 0, 0); font-weight: bold;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;">char *ior_file_name_ = -"comp_serv.ior"; </span><br style="font-family: monospace;"> -<span - style="font-family: monospace; color: rgb(153, 0, 0); font-weight: bold;">int -rate = 2;</span><br style="font-family: monospace;"> -<span style="font-family: monospace;">int</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">parse_args (int argc, char -*argv[])</span><br style="font-family: monospace;"> -<span style="font-family: monospace;">{</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> ACE_Get_Opt get_opts -(argc, argv, "k:o:");</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> int c;</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> while ((c = get_opts ()) -!= -1)</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> switch (c)</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> case -'o': // get the file name to write to</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -ior_file_name_ = get_opts.opt_arg ();</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> break;</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> case -'?': // display help for use of the server.</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> default:</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_ERROR_RETURN ((LM_ERROR,</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -"usage: %s\n"</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -"-o <ior_output_file>\n"</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -"\n",</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -argv [0]),</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> --1);</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> }</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> return 0;</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">}</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;">int</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">main (int argc, char *argv[])</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">{</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> ACE_TRY_NEW_ENV</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> // -Initialize orb</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -CORBA::ORB_var orb = CORBA::ORB_init (argc,</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -argv</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_ENV_ARG_PARAMETER);</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_TRY_CHECK;</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -CIAO::Server_init (orb.in ());</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> if -(parse_args (argc, argv) != 0)</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -return -1;</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> // -Get reference to Root POA.</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -CORBA::Object_var object =</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -orb->resolve_initial_references ("RootPOA"</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_ENV_ARG_PARAMETER);</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_TRY_CHECK;</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -PortableServer::POA_var root_poa =</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -PortableServer::POA::_narrow (object.in ()</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> - - ACE_ENV_ARG_PARAMETER);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> // Get -reference to RTORB.</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -object =</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -orb->resolve_initial_references ("RTORB"</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_ENV_ARG_PARAMETER);</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_TRY_CHECK;</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -RTCORBA::RTORB_var rt_orb =</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -RTCORBA::RTORB::_narrow (object.in ()</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_ENV_ARG_PARAMETER);</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_TRY_CHECK;</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> // -Activate POA manager</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -PortableServer::POAManager_var poa_manager =</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_TRY_CHECK;</span><small><span style="font-weight: bold;">(Highlighted -files are manually added to the generated mpc file)</span></small><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_TRY_CHECK;</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -CIAO::RTServer::RTComponentServer_Impl *comserv_servant;</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -CIAO::Static_Configurator configurator;</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -int containers_table_size =</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -sizeof -(containers_table_)/sizeof(CIAO::Static_Config::ContainerAttributes);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -int homes_table_size =</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -sizeof (homes_table_)/sizeof(CIAO::Static_Config::HomeAttributes);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -int components_table_size =</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -sizeof -(components_table_)/sizeof(CIAO::Static_Config::ComponentAttributes);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -int component_registrations_table_size =</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -sizeof -(component_registrations_table_)/sizeof(CIAO::Assembly_Placement::componentinstantiation::Register_Info);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -int connections_table_size =</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -sizeof -(connections_table_)/sizeof(CIAO::Static_Config::ConnectionAttributes);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -int resolvers_table_size =</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -sizeof -(resolvers_table_)/sizeof(CIAO::Static_Config::ResolveInfoAttributes);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -int thread_pool_table_size=</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -sizeof(thread_pool_table_)/sizeof(CIAO::Static_Config::ThreadPoolAttributes);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -int thread_pool_lanes_table_size=</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -sizeof(thread_pool_lanes_table_)/sizeof(CIAO::Static_Config::ThreadPoolLanesAttributes);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -int priority_band_table_size=</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -sizeof(priority_band_table_)/sizeof(CIAO::Static_Config::PriorityBandsAttributes);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -int policy_set_table_size=</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -sizeof(policy_set_table_)/sizeof(CIAO::Static_Config::PolicySetAttributes);</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -CIAO::HOMECREATOR_FUNCPTR_MAP home_creator_fptr_map;</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -CIAO::HOMESERVANTCREATOR_FUNCPTR_MAP homesvnt_creator_fptr_map;</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -CIAO::Static_Config_EntryPoints_Maps maps;</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -maps.home_creator_funcptr_map_ = &home_creator_fptr_map;</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -maps.home_servant_creator_funcptr_map_ = &homesvnt_creator_fptr_map;</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -int i=0;</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -for (i=0; i<homes_table_size; ++i)</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -{</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -home_creator_fptr_map.bind (homes_table_[i].executor_entrypt_,</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -homes_table_[i].executor_fptr_);</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -homesvnt_creator_fptr_map.bind (homes_table_[i].servant_entrypt_,</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -homes_table_[i].servant_fptr_);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -}</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_NEW_RETURN (comserv_servant,</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -CIAO::RTServer::RTComponentServer_Impl (orb.in (),</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -rt_orb.in (),</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -root_poa.in (),</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -1, </span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -&maps), </span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> --1);</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -PortableServer::ServantBase_var safe_servant -(comserv_servant); </span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -Components::ConfigValues configs;</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -<span style="color: rgb(255, 0, 0);"><a name="rtconfig"></a>configurator.config_rt_info(configs, -</span></span><br style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -thread_pool_table_, </span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -thread_pool_table_size,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -lane_table_,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -thread_pool_lanes_table_,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -thread_pool_lanes_table_size,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -band_table_,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -priority_band_table_,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -priority_band_table_size,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -policy_config_table_,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -policy_set_table_,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -policy_set_table_size);</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -comserv_servant->init (configs</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_ENV_ARG_PARAMETER);</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_TRY_CHECK;</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> // -Configuring ComponentServer.</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -PortableServer::ObjectId_var cs_oid</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -= root_poa->activate_object (comserv_servant</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_ENV_ARG_PARAMETER);</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_TRY_CHECK; </span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> object = -root_poa->id_to_reference (cs_oid.in ()</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_ENV_ARG_PARAMETER);</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_TRY_CHECK;</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -Components::Deployment::ComponentServer_var comserv_obj =</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -Components::Deployment::ComponentServer::_narrow (object.in ()</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_ENV_ARG_PARAMETER);</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_TRY_CHECK;</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> if -(CORBA::is_nil (comserv_obj.in ()))</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_ERROR_RETURN ((LM_ERROR,</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -"Unable to activate RTComponentServer object\n"),</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> --1);</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -Components::Deployment::ServerActivator_var activator;</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> // -We are just storing the original configuration here.</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> // -Currently, we don't really use this ConfigValues direclty.</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -Components::ConfigValues_var more_config = new Components::ConfigValues;</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -comserv_servant->set_objref (activator.in (),</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -more_config.in (),</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -comserv_obj.in ()</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_ENV_ARG_PARAMETER);</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_TRY_CHECK;</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -<a name="static_config_engine"></a><span style="color: rgb(255, 0, 0);">configurator.configure -(orb.in (),</span></span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -comserv_obj.in (),</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -containers_table_,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -containers_table_size,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -homes_table_,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -homes_table_size,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -components_table_,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -components_table_size,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -component_registrations_table_,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -component_registrations_table_size,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -connections_table_,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -connections_table_size,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -resolvers_table_,</span><br - style="font-family: monospace; color: rgb(255, 0, 0);"> -<span style="font-family: monospace; color: rgb(255, 0, 0);"> -resolvers_table_size);</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -CORBA::String_var str = orb->object_to_string (comserv_obj.in ()</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_ENV_ARG_PARAMETER);</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -CIAO::Utility::write_IOR (ior_file_name_, str.in ());</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_DEBUG ((LM_INFO, "RTComponentServer IOR: %s\n", str.in ()));</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_DEBUG ((LM_DEBUG,</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -"Running RTComponentServer...\n"));</span><br - style="font-family: monospace;"> -</p> -<p><b><tt><font color="#990000"> -CORBA::Object_var -pulser_obj</font></tt></b> -<br> -<b><tt><font color="#990000"> -= orb->string_to_object ("file://ec.ior"</font></tt></b> -<br> -<b><tt><font color="#990000"> -ACE_ENV_ARG_PARAMETER);</font></tt></b> -<br> -<b><tt><font color="#990000"> -ACE_TRY_CHECK;</font></tt></b> -</p> -<p><b><tt><font color="#990000"> -BasicSP::EC_var -pulser</font></tt></b> -<br> -<b><tt><font color="#990000"> -= BasicSP::EC::_narrow (pulser_obj.in ()</font></tt></b> -<br> -<b><tt><font color="#990000"> -ACE_ENV_ARG_PARAMETER);</font></tt></b> -<br> -<b><tt><font color="#990000"> -ACE_TRY_CHECK;</font></tt></b> -</p> -<p><b><tt><font color="#990000"> if -(CORBA::is_nil -(pulser.in ()))</font></tt></b> -<br> -<b><tt><font color="#990000"> -ACE_ERROR_RETURN ((LM_ERROR, "Unable to acquire 'EC' objref\n"), -1);</font></tt></b> -</p> -<p><b><tt><font color="#990000"> -pulser->hertz -(rate</font></tt></b> -<br> -<b><tt><font color="#990000"> -ACE_ENV_ARG_PARAMETER);</font></tt></b> -<br> -<b><tt><font color="#990000"> -ACE_TRY_CHECK;</font></tt></b> -</p> -<p><b><tt><font color="#990000"> -ACE_DEBUG -((LM_DEBUG, "Start up the Event services\n"));</font></tt></b> -</p> -<p><b><tt><font color="#990000"> -pulser->start -(ACE_ENV_SINGLE_ARG_PARAMETER);</font></tt></b> -<br> -<b><tt><font color="#990000"> -ACE_TRY_CHECK;</font></tt></b> -</p> -<p><br style="font-family: monospace;"> -<span style="font-family: monospace;"> // -Run the main event loop for the ORB.</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_TRY_CHECK</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> }</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> ACE_CATCHANY</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> {</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -"server::main \n");</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -return 1;</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> }</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> ACE_ENDTRY;</span><br - style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> return 0;</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">}</span><br> -<tt></tt></p> -<a name="Modified Static_CCM_App.mpc"></a><b><u>Modified -Static_CCM_App.mpc</u></b> -<br> -<small><span style="font-weight: bold;"><br> -(Highlighted files are manually added to the generated mpc file)</span></small><br> -<tt></tt><span style="font-family: monospace;"><br> -project(Static_CCM_App) : ciao_server, ciao_client, rtcorba, -rtportableserver, iortable, acexml{</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">includes += -$(ACE_ROOT)/TAO/CIAO/tools/Assembly_Deployer</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">includes += -$(ACE_ROOT)/TAO/CIAO/tools/static_configurator</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">includes += -$(ACE_ROOT)/TAO/CIAO/tools/RTComponentServer</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">libs += RTComponent_Server -CIAO_XML_Helpers Static_Configurator</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">after += RTComponent_Server -CIAO_XML_Helpers Static_Configurator</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> </span><br - style="font-family: monospace;"> -<span - style="font-family: monospace; color: rgb(153, 0, 0); font-weight: bold;">libs -+= BasicSP_stub BasicSP_svnt</span><br - style="font-family: monospace; color: rgb(153, 0, 0); font-weight: bold;"> -<span - style="font-family: monospace; color: rgb(153, 0, 0); font-weight: bold;">after -+= BasicSP_stub BasicSP_svnt</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">libs += EC_exec</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">after += EC_exec</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">libs += EC_svnt <span - style="font-weight: bold; color: rgb(153, 0, 0);">EC_stub</span></span><br - style="font-family: monospace; font-weight: bold; color: rgb(153, 0, 0);"> -<span style="font-family: monospace;">after += EC_svnt<span - style="font-weight: bold; color: rgb(153, 0, 0);"> EC_stub</span></span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">libs += BMDevice_exec</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">after += BMDevice_exec</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">libs += BMDevice_svnt <span - style="font-weight: bold; color: rgb(153, 0, 0);">BMDevice_stub</span></span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">after += BMDevice_svnt <span - style="font-weight: bold; color: rgb(153, 0, 0);">BMDevice_stub</span></span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">libs += BMClosedED_exec</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">after += BMClosedED_exec</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">libs += BMClosedED_svnt <span - style="font-weight: bold; color: rgb(153, 0, 0);">BMClosedED_stub</span></span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">after += BMClosedED_svnt <span - style="font-weight: bold; color: rgb(153, 0, 0);">BMClosedED_stub</span></span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">libs += BMDisplay_exec</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">after += BMDisplay_exec</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">libs += BMDisplay_svnt <span - style="font-weight: bold; color: rgb(153, 0, 0);">BMDisplay_stub</span></span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">after += BMDisplay_svnt <span - style="font-weight: bold; color: rgb(153, 0, 0);">BMDisplay_stub</span></span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> </span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> Source_Files {</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -Static_CCM_App.cpp</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> }</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> </span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> IDL_Files {</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> }</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">}</span><br> -<br> -</body> -</html> diff --git a/TAO/CIAO/docs/templates/CIAO_Glue_Session_Template.cpp b/TAO/CIAO/docs/templates/CIAO_Glue_Session_Template.cpp deleted file mode 100644 index 4320b5a3177..00000000000 --- a/TAO/CIAO/docs/templates/CIAO_Glue_Session_Template.cpp +++ /dev/null @@ -1,1218 +0,0 @@ -// $Id$ - -// The generated filename for files using this template shoule be -// [idl-basename]GS.cpp GS --> GlueSession - -// @@ Notice: [ciao module name] can expand to either CIAO_GLUE or -// CIAO_GLUE_[module name] as defined in the header file. - -/// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -/// @@@ Notice that all component and interface names need to be -/// fully qualified as we are creating a new namespace for the CIAO's -/// container glue code. -/// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -#include "[idl-basename]_svnt.h" -#include "Cookies.h" - -#if !defined (__ACE_INLINE__) -# include "[idl-basename]_svnt.inl" -#endif /* __ACE_INLINE__ */ - -////////////////////////////////////////////////////////////////// -// Facet Glue Code implementation -// @@ We are assuming that these facets are declared under the same -// module as the component (thus, we are placing this glue code -// here under the same namespace. If they are not, we will -// either be generating them in separate namespaces, or include -// some other CIDL generated files to get the glue code -// implementation. -////////////////////////////////////////////////////////////////// - -##foreach [facet type] in (all facet interface types in the original IDL) - -// get_component implementation. -CORBA::Object_ptr -[ciao module name]::[facet type]_Servant::_get_component (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ::Components::SessionContext_var sc = - ::Components::SessionContext::_narrow (this->ctx_.in ()); - - if (! CORBA::is_nil(sc.in ())) - return sc->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER); - - ::Components::EntityContext_var ec = - ::Components::EntityContext::_narrow (this->ctx_.in ()); - - if (! CORBA::is_nil(ec.in ())) - return ec->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER); - - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); -} - -##end foreach [facet type] - - - -////////////////////////////////////////////////////////////////// -// Component specific context implementation -////////////////////////////////////////////////////////////////// - -##foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate: -## if ([receptacle name] is a multiplex ('uses multiple') receptacle) - // [receptacle name]Connections typedef'ed as a sequence of - // struct [receptacle name]Connection. -[receptacle name]Connections * -[ciao module name]::[component name]_Context::get_connections_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // @@ Strategized locking here. - - [receptacle name]Connections_var retv = - new [receptacle name]Connections (this->ciao_muses_[receptacle name]_.current_size ()); - - CORBA::ULong i = 0; - ACE_Active_Map_Manager<[uses type]_var>::iterator - end = this->ciso_muses_[receptacle name]_.end (); - for (ACE_Active_Map_Manager<[uses type]_var>::iterator - iter = this->ciso_muses_[receptacle name]_.begin (); - iter != end; - ++iter) - { - ACE_Active_Map_Manager<[uses type]_var>::ENTRY &entry = *iter; - retv[i]->objref = [uses type]::_narrow (entry.int_id_.in ()); - retv[i]->ck = new CIAO::Map_Key_Cookie (entry.ext_id_); - ++i; - } - - return retv._retn (); -} -## endif [receptacle name] -##end foreach [receptacle name] with [uses type] - -##foreach [event name] with [eventtype] in (list of all event sources) generate: -void -[ciao module name]::[component name]_Context::push_[event name] ([eventtype] *ev - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ -## if [event name] belongs to an 'emits' port - this->ciao_emits_[event name]_consumer_->push_[event name] (ev - ACE_ENV_ARG_PARAMETER); -## else [event name] belongs to a 'publishes' port - ACE_Active_Map_Manager<[eventtype]Consumer_var>::iterator - end = this->ciao_publishes_[event name]_map_.end (); - for (ACE_Active_Map_Manager<[eventtype]Consumer_var>::iterator - iter = this->ciao_publishes_[event name]_map_.begin (); - iter != end; - ++iter) - { - ACE_Active_Map_Manager<[eventtype]Consumer_var>::ENTRY &entry = *iter; - [eventtype]Consumer_var c - = [eventtype]Consumer::_narrow (entry.int_id_.in ()); - c->push_[eventtype] (ev - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } -## endif [event name] -} - -##end foreach [event name] with [eventtype] - - -// Operations for publishes interfaces. -##foreach [publish name] with [eventtype] in (list of all publishers) generate: -::Components::Cookie * -[ciao module name]::[component name]_Context::subscribe_[publish name] ([eventtype]Consumer_ptr c - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::ExceededConnectionLimit)) -{ - if (CORBA::is_nil (c)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - - [eventtype]Consumer_var sub - = [eventtype]Consumer::_duplicate (c); - - ACE_Active_Map_Manager_Key key; - this->ciao_publishes_[publish name]_map_.bind (sub.in (), - key); - - sub._retn (); // Release ownership to map. - - ::Components::Cookie_var retv = new CIAO::Map_Key_Cookie (key); - return retv._retn (); -} - -[eventtype]Consumer_ptr -[ciao module name]::[component name]_Context::unsubscribe_[publish name] (::Components::Cookie *ck - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::InvalidConnection)) -{ - [eventtype]Consumer_var retv; - - ACE_Active_Map_Manager_Key key; - if (ck == 0 || - CIAO::Map_Key_Cookie::extract (ck, key) == -1) - ACE_THROW_RETURN (::Components::InvalidConnection (), 0); - - if (this->ciao_publishes_[publish name]_map_.unbind (key, - retv) != 0) - ACE_THROW_RETURN (::Components::InvalidConnection (), 0); - - return retv._retn (); -} - -##end foreach [publish name] with [eventtype] - -##foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate: - -## if [receptacle name] is a simplex receptacle ('uses') - -[uses type]_ptr -[ciao module name]::[component name]_Context::get_connection_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return [uses type]::_duplicate (this->ciao_uses_[receptacle name]_.in ()); -} - -// Simplex [receptacle name] connection management operations -void -[ciao module name]::[component name]_Context::connect_[receptacle name] ([uses type]_ptr c - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)) -{ - if (! CORBA::is_nil (this->ciao_uses_[receptacle name]_.in ())) - ACE_THROW (::Components::AlreadyConnected ()); - - if (CORBA::is_nil (c)) - ACE_THROW (::Components::InvalidConnection ()); - - // When do we throw InvalidConnection exception? - this->ciao_uses_[receptacle name]_ = [uses type]::_duplicate (c); -} - -[uses type]_ptr -[ciao module name]::[component name]_Context::disconnect_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::NoConnection)) -{ - if (CORBA::is_nil (this->ciao_uses_[receptacle name]_.in ())) - ACE_THROW (::Components::NoConnection ()); - - return this->ciao_uses_[receptacle name]_._retn (); -} - -## else ([receptacle name] is a multiplex ('uses multiple') receptacle) -// Multiplex [receptacle name] connection management operations -::Components::Cookie * -[ciao module name]::[component name]_Context::connect_[receptacle name] ([uses type]_ptr c - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::ExceedConnectionLimit, - ::Components::InvalidConnection)) -{ - if (CORBA::is_nil (c)) - ACE_THROW_RETURN (::Components::InvalidConnection (), 0); - - [uses type]_var conn - = [uses type]::_duplicate (c); - - ACE_Active_Map_Manager_Key key; - this->ciao_muses_[receptacle name]_.bind (conn.in (), - key); - - conn._retn (); // Releases ownership to the map. - - ::Components::Cookie_var retv = new CIAO::Map_Key_Cookie (key); - return retv._retn (); -} - -[uses type]_ptr -[ciao module name]::[component name]_Context::disconnect_[receptacle name] (::Components::Cookie *ck - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::InvalidConnection)) -{ - [uses type]_var retv; - - ACE_Active_Map_Manager_Key key; - if (ck == 0 || - CIAO::Map_Key_Cookie::extract (ck, key) == -1) - ACE_THROW_RETURN (::Components::InvalidConnection (), 0); - - if (this->ciao_muses_[receptacle name]_.unbind (key, - retv) != 0) - ACE_THROW_RETURN (::Components::InvalidConnection (), 0); - - return retv._retn (); -} - -## endif [receptacle name] -##end foreach [receptacle name] with [uses type] - -// Operations for ::Components::SessionContext interface -CORBA::Object_ptr -[ciao module name]::[component name]_Context::get_CCM_object (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)) -{ - // @@ How do I check for IllegalState here? When it's not in a - // callback operation... - // ACE_THROW_RETURN (::Components::IllegalState (), 0); - - if (CORBA::is_nil (this->component_.in ())) - { - CORBA::Object_var obj = this->container_->get_objref (this->servant_ - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - this->component_ = [component name]::_narrow (obj.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - if (CORBA::is_nil (this->component_.in ())) - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); // This should not happen... - } - return [component name]::_duplicate (this->component_.in ()); -} - -////////////////////////////////////////////////////////////////// -// Component Servant Glue code implementation -////////////////////////////////////////////////////////////////// - -[ciao module name]::[component name]_Servant::[component name]_Servant (CCM_[component name]_ptr exe, - ::Components::CCMHome_ptr h, - ::CIAO::Session_Container *c) - : executor_ (CCM_[component name]::_duplicate (exe)), - container_ (c) -{ - this->context_ = new [ciao module name]::[component name]_Context (h, c, this); - - ACE_TRY_NEW_ENV - { - Components::SessionComponent_var scom = - Components::SessionComponent::_narrow (exe - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (! CORBA::is_nil (scom.in ())) - scom->set_session_context (this->context_ - ACE_ENV_ARG_PARAMETER); - } - ACE_CATCHANY - { - // @@ Ignore any exceptions? What happens if - // set_session_context throws an CCMException? - } - ACE_ENDTRY; -} - -[ciao module name]::[component name]_Servant::~[component name]_Servant (void) -{ - ACE_TRY_NEW_ENV - { - Components::SessionComponent_var scom = - Components::SessionComponent::_narrow (this->executor_.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (! CORBA::is_nil (scom.in ())) - scom->ccm_remove (ACE_ENV_SINGLE_ARG_PARAMETER); - } - ACE_CATCHANY - { - // @@ Ignore any exceptions? What happens if - // set_session_context throws an CCMException? - } - ACE_ENDTRY; - this->context_->_remove_ref (); -} - -// Operations for provides interfaces. -##foreach [facet name] with [facet type] in (list of all provided interfaces) generate: - -[facet type]_ptr -[ciao module name]::[component name]_Servant::provide_[facet name] (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - if (CORBA::is_nil (this->provide_[facet name]_.in ())) - { - CCM_[facet type]_var fexe = this->executor_->get_[facet name] (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - if (CORBA::is_nil (fexe.in ())) - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); - - [ciao module name]::[facet type]_Servant *svt = - new [ciao module name]::[facet type]_Servant (fexe.in (), - this->context_); - PortableServer::ServantBase_var safe_servant (svt); - - CORBA::Object_var obj = this->container_->install_servant (svt - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - [facet type]_var fo = [facet type]::_narrow (obj.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - this->provide_[facet name]_ = fo; - } - - return [facet type]::_duplicate (this->provide_[facet name]_.in ()); -} -##end foreach [facet name] with [facet type] - -// Operations for consumers interfaces. -##foreach [consumer name] with [eventtype] in (list of all consumers) generate: - -// EventConsumer Glue Code implementation - -// Inherit from ::Compopnents::EventBConsumerBase -void -[ciao module name]::[component name]_Servant::[eventtype]Consumer_[consumer name]_Servant::push_event (EventBase *ev - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::BadEventType)) -{ - [eventtype]_var ev_type = [eventtype]::_downcast (ev); - if (ev_type != 0) - { - this->push_[eventtype] (ev_type.in () - ACE_ENV_ARG_PARAMETER); - return; - } - - // @@ This include the case when we receive a parent eventtype of [eventtype] - - ACE_THROW (::Components::BadEventType ()); -} - -// get_component implementation. -[eventtype]Consumer_ptr -[ciao module name]::[component name]_Servant::get_consumer_[consumer name] (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - if (CORBA::is_nil (this->consumes_[consumer name]_.in ())) - { - [ciao module name]::[component name]_Servant::[eventtype]Consumer_[consumer name]_Servant *svt = - new [ciao module name]::[component name]_Servant::[eventtype]Consumer_[consumer name]_Servant (this->executor_.in (), - this->context_); - PortableServer::ServantBase_var safe_servant (svt); - - CORBA::Object_var obj = this->container_->install_servant (svt - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - [eventtype]Consumer_var eco = [eventtype]Consumer::_narrow (obj.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - this->consumes_[consumer name]_ = eco; - } - - return [eventtype]Consumer::_duplicate (this->consumes_[consumer name]_.in ()); -} - -##end foreach [consumer name] with [eventtype] - -// Operations for Navigation interface -CORBA::Object_ptr -[ciao module name]::[component name]_Servant::provide_facet (const char * name - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException , - Components::InvalidName)) -{ - if (name == 0) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - - // We simply iterate thru all the facets this component provides - // now. We can also use a hash map along with perfect hashing - // (i.e., gperf) if we need faster performance since all the provided - // interfaces are static to a component definition. - -##foreach [facet name] with [facet type] in (list of all provided interfaces) generate: - if (ACE_OS_String::strcmp (name, "[facet name]") == 0) - return this->provide_[facet name] (ACE_ENV_SINGLE_ARG_PARAMETER); -##end foreach [facet name] with [facet type] - - ACE_THROW_RETURN (::Components::InvalidName (), 0); -} - -::Components::FacetDescriptions * -[ciao module name]::[component name]_Servant::get_all_facets (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ::Components::FacetDescriptions_var collection - = new ::Components::FacetDescriptions (#99); // #99 = number of all provided - // facets including those inherited - // from parent component(s). - collection->length (#99); - - ::Components::FacetDescription_var x; - CORBA::ULong i = 0; - -##foreach [facet name] with [facet type] in (list of all provided interfaces) generate: - - x = new ::OBV_Components::FacetDescription; - - x->Name ((const char *)"[facet name]"); - x->type_id ((const char *) "[facet type's repo id]"); // - x->facet_ref (this->provide_[facet name] (ACE_ENV_SINGLE_ARG_PARAMETER)); - - collection[i] = x._retn (); - ++i; -##end foreach [facet name] with [facet type] - - return collection._retn (); - -} - -::Components::FacetDescriptions * -[ciao module name]::[component name]_Servant::get_named_facets (const Components::NameList & names - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)) -{ - ::Components::FacetDescriptions_var collection - = new ::Components::FacetDescriptions (names.length ()); - collection->length (names.length ()); - - ::Components::FacetDescription_var x; - CORBA::ULong i = 0; - for (; i < names.length (); ++i) - { - x = new ::OBV_Components::FacetDescription; - - // We probably need a more efficient way, e.g., a hash map, to handle all these. -##foreach [facet name] with [facet type] in (list of all provided interfaces) generate: - (else) if (ACE_OS_String::strcmp (names[i].in (), "[facet name]") == 0) - { - x->Name ((const char *)"[facet name]"); - x->type_id ((const char *) "[facet type's repo id]"); // - x->facet_ref (this->provide_[facet name] (ACE_ENV_SINGLE_ARG_PARAMETER)); - - } -##end foreach [facet name] with [facet type] - else - ACE_THROW_RETURN (::Components::InvalidName (), 0); - - collection[i] = x._retn (); - } - return collection._retn (); -} - -CORBA::Boolean -[ciao module name]::[component name]_Servant::same_component (CORBA::Object_ptr object_ref - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - if (CORBA::is_nil (object_ref)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - - CORBA::Object_var the_other = object_ref->_get_component (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - CORBA::Object_var me = this->context_->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - return me->_is_equivalent (object_ref - ACE_ENV_ARG_PARAMETER); -} - -// Operations for Receptacles interface -::Components::Cookie * -[ciao module name]::[component name]_Servant::connect (const char * name, - CORBA::Object_ptr connection - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::InvalidConnection, - Components::AlreadyConnected, - Components::ExceededConnectionLimit)) -{ - // @@ We can omit this if clause if there's no receptacle in this component. - if (name == 0) - ACE_THROW_RETURN (Components::InvalidName (), 0); - -##foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate: - if (ACE_OS_String::strcmp (name, "[receptacle name]") == 0) - { - [uses type]_var _ciao_conn = - [uses type]::_narrow (connection - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - if (CORBA::is_nil (_ciao_conn.in ())) - ACE_THROW_RETURN (::Components::InvalidConnection (), 0); - -## if [receptacle name] is a simplex receptacle ('uses') - this->connect_[receptacle name] (_caio_conn.in () - ACE_ENV_ARG_PARAMETER); - return 0; -## else ([receptacle name] is a multiplex ('uses multiple') receptacle) - return this->connect_[receptacle name] (_ciao_conn.in () - ACE_ENV_ARG_PARAMETER); -## endif [receptacle name] - } -##end foreach [receptacle name] with [uses type] - - ACE_THROW_RETURN (Components::InvalidName (), 0); -} - -/* -##foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate: -## if [receptacle name] is a simplex receptacle ('uses') -## else ([receptacle name] is a multiplex ('uses multiple') receptacle) -## endif [receptacle name] -##end foreach [receptacle name] with [uses type] -*/ - -CORBA::Object_ptr -[ciao module name]::[component name]_Servant::disconnect (const char * name, - Components::Cookie *ck - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::InvalidConnection, - Components::CookieRequired, - Components::NoConnection)) -{ - // @@ We can omit this if clause if there's no receptacle in this component. - if (name == 0) - ACE_THROW_RETURN (Components::InvalidName (), 0); - -##foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate: - if (ACE_OS_String::strcmp (name, "[receptacle name]") == 0) -## if [receptacle name] is a simplex receptacle ('uses') - return this->disconnect_[receptacle name] (ACE_ENV_SINGLE_ARG_PARAMETER); -## else ([receptacle name] is a multiplex ('uses multiple') receptacle) - return this->connect_[receptacle name] (ck - ACE_ENV_ARG_PARAMETER); -## endif [receptacle name] -##end foreach [receptacle name] with [uses type] - - ACE_THROW_RETURN (Components::InvalidName (), 0); -} - -::Components::ConnectionDescriptions * -[ciao module name]::[component name]_Servant::get_connections (const char * name - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)) -{ - // @@ We can omit this if clause if there's no receptacle in this component. - if (name == 0) - ACE_THROW_RETURN (Components::InvalidName (), 0); - -##foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate: - if (ACE_OS_String::strcmp (name, "[receptacle name]") == 0) - { -## if [receptacle name] is a simplex receptacle ('uses') - ::Components::ConnectionDescriptions_var retv = - new ::Components::ConnectionDescriptions (1); - retv->length (1); - - retv[0] = new OBV_Components::ConnectionDescription; - retv[0]->ck = 0; - retv[0]->objref = this->get_connection_[receptacle name] (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - return retv._retn (); -## else ([receptacle name] is a multiplex ('uses multiple') receptacle) - // @@ Return type does not match here. We can not return directly. - return this->get_connections_[receptacle name] (ACE_ENV_SINGLE_ARG_PARAMETER); -## endif [receptacle name] - } -##end foreach [receptacle name] with [uses type] - - ACE_THROW_RETURN (Components::InvalidName (), 0); -} - -::Components::ReceptacleDescriptions * -[ciao module name]::[component name]_Servant::get_all_receptacles (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ::Components::ReceptacleDescriptions_var retv = - new ::Components::ReceptacleDescriptions (#99); // #99 is number of receptacles - // this component has. - retv->length (#99); - CORBA::ULong i = 0; - -##foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate: - retv[i] = new OBV_Components::ReceptacleDescription; - - retv[i]->Name ((const char *) "[receptacle name]"); - retv[i]->type_id ((const char *) "[uses type repo id]"); -## if [receptacle name] is a simplex receptacle ('uses') - retv[i]->is_multiple (0); -## else ([receptacle name] is a multiplex ('uses multiple') receptacle) - retv[i]->is_multiple (1); -## endif [receptacle name] - retv[i]->connections (*this->get_connections ("[receptacle name]" - ACE_ENV_ARG_PARAMETER)); - ++i; -##end foreach [receptacle name] with [uses type] - - return retv._retn (); -} - -::Components::ReceptacleDescriptions * -[ciao module name]::[component name]_Servant::get_named_receptacles (const Components::NameList & names - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)) -{ - ::Components::ReceptacleDescriptions_var retv = - new ::Components::ReceptacleDescriptions (names.length ()); - retv->length (names.length ()); - - CORBA::ULong i = 0; - for (; i < names.length (); ++i) - { - retv[i] = new ::OBV_Components::ReceptacleDescription; -##foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate: - (else) if (ACE_OS_String::strcmp (names[i].in (), "[receptacle name]") == 0) - { - retv[i]->Name ((const char *) "[receptacle name]"); - retv[i]->type_id ((const char *) "[uses type repo id]"); -## if [receptacle name] is a simplex receptacle ('uses') - retv[i]->is_multiple (0); -## else ([receptacle name] is a multiplex ('uses multiple') receptacle) - retv[i]->is_multiple (1); -## endif [receptacle name] - retv[i]->connections (*this->get_connections ("[receptacle name]" - ACE_ENV_ARG_PARAMETER)); - } -##end foreach [receptacle name] with [uses type] - else - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - return retv._retn (); -} - -// Operations for Events interface -::Components::EventConsumerBase_ptr -[ciao module name]::[component name]_Servant::get_consumer (const char * sink_name - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)) -{ - // @@ We can omit this if clause if there's no event sinks in this component. - if (sink_name == 0) - ACE_THROW_RETURN (Components::InvalidName (), 0); - -##foreach [consumer name] with [eventtype] in (list of all consumers) generate: - if (ACE_OS_String::strcmp (sink_name, "[consumer name]") == 0) - return this->get_consumer_[consumer name] (ACE_ENV_SINGLE_ARG_PARAMETER); -##end foreach [consumer name] with [eventtype] - ACE_THROW_RETURN (Components::InvalidName (), 0); -} - -::Components::Cookie * -[ciao module name]::[component name]_Servant::subscribe (const char * publisher_name, - Components::EventConsumerBase_ptr subscriber - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::InvalidConnection, - Components::ExceededConnectionLimit)) -{ - // @@ We can omit this if clause if there's no publisher in this component. - if (publisher_name == 0) - ACE_THROW_RETURN (Components::InvalidName (), 0); - -##foreach [publish name] with [eventtype] in (list of all publishers) generate: - if (ACE_OS_String::strcmp (publisher_name, "[publish name]") == 0) - { - [eventtype]Consumer_var _ciao_consumer = - [eventtype]Consumer::_narrow (subscriber - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - if (CORBA::is_nil (_ciao_consumer.in ())) - ACE_THROW_RETURN (Components::InvalidConnection (), 0); - - return this->subscribe_[publish name] (_ciao_consumer.in () - ACE_ENV_ARG_PARAMETER); - } -##end foreach [publish name] with [eventtype] - - ACE_THROW_RETURN (Components::InvalidName (), 0); -} - -::Components::EventConsumerBase_ptr -[ciao module name]::[component name]_Servant::unsubscribe (const char * publisher_name, - Components::Cookie *ck - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::InvalidConnection)) -{ - // @@ We can omit this if clause if there's no publisher in this component. - if (publisher_name == 0) - ACE_THROW_RETURN (Components::InvalidName (), 0); - -##foreach [publish name] with [eventtype] in (list of all publishers) generate: - if (ACE_OS_String::strcmp (publisher_name, "[publish name]") == 0) - { - return this->unsubscribe_[publish name] (ck - ACE_ENV_ARG_PARAMETER); - } -##end foreach [publish name] with [eventtype] - - ACE_THROW_RETURN (Components::InvalidName (), 0); -} - -void -[ciao module name]::[component name]_Servant::connect_consumer (const char * emitter_name, - Components::EventConsumerBase_ptr consumer - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::AlreadyConnected, - Components::InvalidConnection)) -{ - // @@ We can omit this if clause if there's no emitter in this component. - if (emitter_name == 0) - ACE_THROW (Components::InvalidName ()); - -##foreach [emit name] with [eventtype] in (list of all emitters) generate: - if (ACE_OS_String::strcmp (emitter_name, "[emit name]") == 0) - { - [eventtype]Consumer_var _ciao_consumer = - [eventtype]Consumer::_narrow (consumer - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - if (CORBA::is_nil (_ciao_consumer.in ())) - ACE_THROW (Components::InvalidConnection); - - this->connect_[emit name] (_ciao_consumer.in () - ACE_ENV_ARG_PARAMETER); - return; - } -##end foreach [emit name] with [eventtype] - - ACE_THROW (Components::InvalidName ()); -} - -::Components::EventConsumerBase_ptr -[ciao module name]::[component name]_Servant::disconnect_consumer (const char * source_name - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::NoConnection)) -{ - // @@ We can omit this if clause if there's no emitter in this component. - if (source_name == 0) - ACE_THROW_RETURN (Components::InvalidName (), 0); - -##foreach [emit name] with [eventtype] in (list of all emitters) generate: - if (ACE_OS_String::strcmp (source_name, "[emit name]") == 0) - { - return this->disconnect_[emit name] (ACE_ENV_SINGLE_ARG_PARAMETER); - } -##end foreach [emit name] with [eventtype] - - ACE_THROW_RETURN (Components::InvalidName (), 0); -} - -::Components::ConsumerDescriptions * -[ciao module name]::[component name]_Servant::get_all_consumers (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ::Components::ConsumerDescriptions_var retv = - new ::Components::ConsumerDescriptions (#99); // #99 is the number of consumers - // this component has. - retv->length (#99); - - CORBA::ULong i = 0; -##foreach [consumer name] with [eventtype] in (list of all consumers) generate: - retv[i] = new OBV_Components::ConsumerDescription; - retv[i]->Name ("[consumer name]"); - retv[i]->type_id ("[eventtype]Consumer repo id"); - [eventtype]Consumer_var c - = this->get_consumer_[consumer name] (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - retv[i]->consumer (c.in ()); - - i++; -##end foreach [consumer name] with [eventtype] - - return retv._retn (); -} - -::Components::ConsumerDescriptions * -[ciao module name]::[component name]_Servant::get_named_consumers (const Components::NameList & names - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)) -{ - ::Components::ConsumerDescriptions_var retv = - new ::Components::ConsumerDescriptions (names.length ()); - retv->length (names.length ()); - - CORBA::ULong i = 0; - for (; i < names.length (); ++i) - { - retv[i] = new OBV_Components::ConsumerDescription; - -##foreach [consumer name] with [eventtype] in (list of all consumers) generate: - (else) if (ACE_OS_String::strcmp (names[i].in (), "[consumer name]") == 0) - { - retv[i]->Name ("[consumer name]"); - retv[i]->type_id ("[eventtype]Consumer repo id"); - [eventtype]Consumer_var c = - this->get_consumer_[consumer name] (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - retv[i]->consumer (c.in ()); - } -##end foreach [consumer name] with [eventtype] - else - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - return retv._retn (); -} - -::Components::EmitterDescriptions * -[ciao module name]::[component name]_Servant::get_all_emitters (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ::Components::EmitterDescriptions_var retv = - new ::Components::EmitterDescriptions (#99); // #99 is the number of emitters - // this component has. - retv->length (#99); - - CORBA::ULong i = 0; -##foreach [emit name] with [eventtype] in (list of all emitters) generate: - retv[i] = new OBV_Components::EmitterDescription; - retv[i]->Name ("[emit name]"); - retv[i]->type_id ("[eventtype]Consumer repo id"); - retv[i]->consumer ([eventtype]Consumer::_duplicate (this->context_->ciao_emits_[emit name]_consumer_)); - - i++; -##end foreach [emitter name] with [eventtype] - - return retv._retn (); -} - -::Components::EmitterDescriptions * -[ciao module name]::[component name]_Servant::get_named_emitters (const Components::NameList & names - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)) -{ - ::Components::EmitterDescriptions_var retv = - new ::Components::EmitterDescriptions (names.length ()); - retv->length (names.length ()); - - CORBA::ULong i = 0; - for (; i < names.length (); ++i) - { - retv[i] = new OBV_Components::EmitterDescription; - -##foreach [emit name] with [eventtype] in (list of all emitters) generate: - (else) if (ACE_OS_String::strcmp (names[i].in (), "[emit name]") == 0) - { - retv[i]->Name ("[emit name]"); - retv[i]->type_id ("[eventtype]Consumer repo id"); - retv[i]->consumer ([eventtype]Consumer::_duplicate (this->context_->ciao_emits_[emit name]_consumer_.in ())); - } -##end foreach [consumer name] with [eventtype] - else - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - return retv._retn (); -} - -::Components::PublisherDescriptions * -[ciao module name]::[component name]_Servant::get_all_publishers (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // @@ to-do - - // Need to add interfaces in the Context class to gather the information. - // Or we can just relay it to the Context object. - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); -} - -::Components::PublisherDescriptions * -[ciao module name]::[component name]_Servant::get_named_publishers (const Components::NameList & names - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)) -{ - // @@ to-do - - // Need to add interfaces in the Context class to gather the information. - // Or we can just relay it to the Context object. - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); -} - -// Operations for CCMObject interface -::CORBA::IRObject_ptr -[ciao module name]::[component name]_Servant::get_component_def (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // @@ to-do: Connect to an IfR? - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); -} - -::Components::CCMHome_ptr -[ciao module name]::[component name]_Servant::get_ccm_home (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return this->context_->get_CCM_home (ACE_ENV_SINGLE_ARG_PARAMETER); -} - -::Components::PrimaryKeyBase * -[ciao module name]::[component name]_Servant::get_primary_key (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::NoKeyAvailable)) -{ - // This is a keyless component. - ACE_THROW_RETURN (::Components::NoKeyAvailable (), 0); -} - -void -[ciao module name]::[component name]_Servant::configuration_complete (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidConfiguration)) -{ - // @@ to-do - // No-op. Don't know how to pass this info to monolithic executor. -} - -void -[ciao module name]::[component name]_Servant::remove (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::RemoveFailure)) -{ - // @@ to-do - // Need to figure out what to do here. E.g., tear down the all the connections - // this component has? -} - -::Components::ComponentPortDescription * -[ciao module name]::[component name]_Servant::get_all_ports (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ::Components::ComponentPortDescription_var retv = - new OBV_Components::ComponentPortDescription; - - ::Components::FacetDescriptions_var facets_desc - = this->get_all_facets (ACE_ENV_SINGLE_ARG_PARAMETER); - ::Components::ReceptacleDescriptions_var receptacle_desc - = get_all_receptacles (ACE_ENV_SINGLE_ARG_PARAMETER); - ::Components::ConsumerDescriptions_var consumer_desc - = this->get_all_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ::Components::EmitterDescriptions_var emitter_desc - = this->get_all_emitters (ACE_ENV_SINGLE_ARG_PARAMETER); - ::Components::PublisherDescriptions_var publisher_desc - = this->get_all_publishers (ACE_ENV_SINGLE_ARG_PARAMETER); - - retv->facets (facets_desc.in()); - retv->receptacles (receptacle_desc.in()); - retv->consumers (consumer_desc.in()); - retv->emitters (emitter_desc.in()); - retv->publishers (publisher_desc.in()); - - return retv._retn(); -} - -// get_component implementation. -CORBA::Object_ptr -[ciao module name]::[component name]_Servant::_get_component (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ::Components::SessionContext_var sc = - ::Components::SessionContext::_narrow (this->context_); - - if (! CORBA::is_nil(sc.in ())) - return sc->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER); - - // @@ Do we need to try the following case here? We are afterall implementing - // a session component here. - ::Components::EntityContext_var ec = - ::Components::EntityContext::_narrow (this->context_); - - if (! CORBA::is_nil(ec.in ())) - return ec->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER); - - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); -} - -void -[ciao module name]::[component name]_Servant::_ciao_activate (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ::Components::SessionComponent_var temp = - ::Components::SessionComponent::_narrow (this->executor_.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - if (! CORBA::is_nil (temp.in ())) - temp->ccm_activate (ACE_ENV_SINGLE_ARG_PARAMETER); -} - -void -[ciao module name]::[component name]_Servant::_ciao_passivate (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ::Components::SessionComponent_var temp = - ::Components::SessionComponent::_narrow (this->executor_.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - if (! CORBA::is_nil (temp.in ())) - temp->ccm_passivate (ACE_ENV_SINGLE_ARG_PARAMETER); -} - -////////////////////////////////////////////////////////////////// -// Component Home Glue code implementation -////////////////////////////////////////////////////////////////// - -[component name]_ptr -[ciao module name]::[home name]_Servant::_ciao_activate_component (CCM_[component name]_ptr exe - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - CORBA::Object_var hobj - = this->container_->get_objref (this - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - ::Components::CCMHome_var home - = ::Components::CCMHome::_narrow (hobj.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - [ciao module name]::[component name]_Servant *svt = - new [ciao module name]::[component name]_Servant (exe, - home.in (), - this->container_); - PortableServer::ServantBase_var safe (svt); - PortableServer::ObjectId_var oid; - - CORBA::Object_var objref - = this->container_->install_component (svt, - oid.out () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - svt->_ciao_activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - [component name]_var ho - = [component name]::_narrow (objref.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - if (this->component_map_.bind (oid.in (), svt) == 0) - { - // @@ what should happen if bind fail? - safe._retn (); - } - return ho._retn (); -} - -void -[ciao module name]::[home name]_Servant::_ciao_passivate_component ([component name]_ptr comp - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - PortableServer::ObjectId_var oid; - - this->container_->uninstall_component (comp, - oid.out () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - [ciao module name]::[component name]_Servant *servant = 0; - if (this->component_map_.unbind (oid.in (), servant) == 0) - { - PortableServer::ServantBase_var safe (servant); - servant->_ciao_passivate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } - // What happen if unbind failed? - -} - -// Operations for Implicit Home interface -[component name]_ptr -[ciao module name]::[home name]_Servant::create (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CreateFailure)) -{ - if (this->executor_.in () == 0) - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); - - Components::EnterpriseComponent_var _ciao_ec = - this->executor_->create (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - CCM_[component name]_var _ciao_comp - = CCM_[component name]::_narrow (_ciao_ec.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - return this->_ciao_activate_component (_ciao_comp.in () - ACE_ENV_ARG_PARAMETER); -} - -// Operations for CCMHome interface -void -[ciao module name]::[home name]_Servant::remove_component (Components::CCMObject_ptr comp - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::RemoveFailure)) -{ - [component name]_var _ciao_comp - = [component name]::_narrow (comp - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - if (CORBA::is_nil (_ciao_comp.in ())) - ACE_THROW (CORBA::INTERNAL ()); // What is the right exception to throw here? - - // @@ It seems to me that we need to make sure this is a component - // generated by this home before calling remove on this component. - _ciao_comp->remove (ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - - // Removing the object reference? get the servant from the POA with - // the objref, and call remove() on the component, deactivate the - // component, and then remove-ref the servant? - this->_ciao_passivate_component (_ciao_comp.in () - ACE_ENV_ARG_PARAMETER); -} - -extern "C" [SERVANT]_Export ::PortableServer::Servant -create[home name]_Servant (::Components::HomeExecutorBase_ptr p, - CIAO::Session_Container *c - ACE_ENV_ARG_DECL); -{ - if (p == 0) - return 0; - - CCM_[home name]_var x - = CCM_[home name]::_narrow (p - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - if (CORBA::is_nil (x.in ())) - return 0; - - return new [ciao module name]::[home name]_Servant (x.in (), - c); -} diff --git a/TAO/CIAO/docs/templates/CIAO_Glue_Session_Template.h b/TAO/CIAO/docs/templates/CIAO_Glue_Session_Template.h deleted file mode 100644 index 1ceb6f03485..00000000000 --- a/TAO/CIAO/docs/templates/CIAO_Glue_Session_Template.h +++ /dev/null @@ -1,737 +0,0 @@ -// $Id$ - -// =========================================================== -// -// @file CIAO_Glue_Session_Template.h -// -// This is a pseudo-meta generic servant implementations template -// for CIAO's CIDL compiler. It demonstrates how a servant -// implementation for a session component should look like. -// -// The generated filename for files using this template shoule be -// [idl-basename]_svnt.h -// -// @author Nanbor Wang <nanbor@cs.wustl.edu> -// -// =========================================================== - -#ifndef CIAO_GLUE_SESSION_[idl-basename]_SVNT_H -#define CIAO_GLUE_SESSION_[idl-basename]_SVNT_H -#include /**/ "ace/pre.h" - -#include "[idl-name]S.h" // Source in the skeletons for component - // client-view equivalent interfaces -#include "[idl-name]EC.h" // Source in the executor mapping - // that component implementations use -#include "ciao/Container_Base.h" //Source in the container interface definitions -#include "tao/LocalObject.h" -#include "tao/PortableServer/Key_Adapters.h" -#include "ace/Active_Map_Manager_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -/// @@@ Notice that all component and interface names need to be -/// fully qualified as we are creating a new namespace for the CIAO's -/// container glue code. -/// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -##if component is defined withing a [module name] -namespace CIAO_GLUE_[module_name] -##else -namespace CIAO_GLUE -##endif -{ - - ////////////////////////////////////////////////////////////////// - // Facet Glue Code implementation - // @@ We are assuming that these facets are declared under the same - // module as the component (thus, we are placing this glue code - // here under the same namespace. If they are not, we will - // either be generating them in separate namespaces, or include - // some other CIDL generated files to get the glue code - // implementation. - -##foreach [facet type] in (all facet interface types in the original IDL) - class [SERVANT]_Export [facet type]_Servant : - : public virtual POA_[facet type], // full skeleton name here - public virtual PortableServer::RefCountServantBase - { - public: - // Constructor and destructor. - [facet type]_Servant (CCM_[facet type]_ptr executor, - ::Components::CCMContext_ptr ctx); - ~[facet tyep]_Servant (); - -## foreach [operation] in (all facet operations) - // Generate operation decls. -## end foreach [operation] - - // get_component implementation. - virtual CORBA::Object_ptr - _get_component (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - protected: - // Facet executor. - CCM_[facet type]_var executor_; - - // Context object. - ::Components::CCMContext_var ctx_; - }; -##end foreach [facet type] - - - ////////////////////////////////////////////////////////////////// - // Component specific context implementation - class [SERVANT]_Export [component name]_Context : - public virtual CCM_[component name]_Context, - public virtual TAO_Local_RefCounted_Object - { - public: - // We will allow the the servant glue code we generate to access - // our states. - friend class [component name]_Servant; - - // Ctor. - [component name]_Context (::Components::CCMHome_ptr home, - ::CIAO::Session_Container *c, - [component name]_Servant *sv); - - // Dtor. - virtual ~[component name]_Context (); - - // Operations for [component name] event source, and - // receptacles defined in CCM_[component name]_Context. - -##foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate: -## if [receptacle name] is a simplex receptacle ('uses') - [uses type]_ptr - get_connection_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); -## else ([receptacle name] is a multiplex ('uses multiple') receptacle) - // [receptacle name]Connections typedef'ed as a sequence of - // struct [receptacle name]Connection. - [receptacle name]Connections * - get_connections_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); - ACE_THROW_SPEC ((CORBA::SystemException)); -## endif [receptacle name] -##end foreach [receptacle name] with [uses type] - -##foreach [event name] with [eventtype] in (list of all event sources) generate: - void push_[event name] ([eventtype] *ev - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); -##end foreach [event name] with [eventtype] - - // Operations for ::Components::CCMContext - virtual ::Components::Principal_ptr - get_caller_principal (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual ::Components::CCMHome_ptr - get_CCM_home (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual CORBA::Boolean - get_rollback_only (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)); - - virtual ::Components::Transaction::UserTransaction_ptr - get_user_transaction (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)); - - virtual CORBA::Boolean - is_caller_in_role (const char * role - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void - set_rollback_only (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)); - - // Operations for ::Components::SessionContext interface - virtual CORBA::Object_ptr - get_CCM_object (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)); - protected: - // We need to generate, in protected section, stuff that manage - // connections and consumers of this component. - -##foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate: -## if [receptacle name] is a simplex receptacle ('uses') - // Simplex [receptacle name] connection management operations - void - connect_[receptacle name] ([uses type]_ptr c - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)); - - [uses type]_ptr - disconnect_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::NoConnection)); - - // Simplex [receptacle name] connection - [uses type]_var ciao_uses_[receptacle name]_; - -## else ([receptacle name] is a multiplex ('uses multiple') receptacle) - // Multiplex [receptacle name] connection management operations - ::Components::Cookie * - connect_[receptacle name] ([uses type]_ptr c - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::ExceedConnectionLimit, - ::Components::InvalidConnection)); - - [uses type]_ptr - disconnect_[receptacle name] (::Components::Cookie *ck - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::InvalidConnection)); - - // Multiplex [receptacle name] connections - - ACE_Active_Map_Manager<[uses type]_var> ciao_muses_[receptacle name]_; -## endif [receptacle name] -##end foreach [receptacle name] with [uses type] - - // Operations for emits interfaces. -##foreach [emit name] with [eventtype] in (list of all emitters) generate: - void - connect_[emit name] ([eventtype]Consumer_ptr c - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::AlreadyConnected)); - - [eventtype]Consumer_ptr - disconnect_[emit name] (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::NoConnection)); - - [eventtype]Consumer_var ciao_emits_[emit name]_consumer_; -##end foreach [emit name] with [eventtype] - - // Operations for publishes interfaces. -##foreach [publish name] with [eventtype] in (list of all publishers) generate: - ::Components::Cookie * - subscribe_[publish name] ([eventtype]Consumer_ptr c - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::ExceededConnectionLimit)); - - [eventtype]Consumer_ptr - unsubscribe_[publish name] (::Components::Cookie *ck - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::InvalidConnection)); - - ACE_Active_Map_Manager<[eventtype]Consumer_var> ciao_publishes_[publish name]_map_; -##end foreach [publish name] with [eventtype] - - protected: - /// Cached component home reference. - ::Components::CCMHome_var home_; - - /// session container - ::CIAO::Session_Container *container_; - - /// Reference back to owner. - [component name]_Servant *servant_; - - /// @@ Cached component reference. - [component name]_var component_; - - }; - - ////////////////////////////////////////////////////////////////// - // Component Servant Glue code implementation - class [SERVANT]_Export [component name]_Servant - : public virtual POA_[component name], // full skeleton name here - public virtual PortableServer::RefCountServantBase - { - public: - // Ctor. - [component name]_Servant (CCM_[component name]_ptr executor, - ::Components::CCMHome_ptr home, - ::CIAO::Session_Container *c); - - // Dtor. - ~[component name]_Servant (void); - -##foreach [operation] in all supported interfaces of own component and all inherited components and attribute accessors/mutators - - // Generate the [operation] here. - -##end - - // Operations for provides interfaces. -##foreach [facet name] with [facet type] in (list of all provided interfaces) generate: - virtual [facet type]_ptr - provide_[facet name] (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); -##end foreach [facet name] with [facet type] - - // Operations for receptacles interfaces. - -##foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate: -## if [receptacle name] is a simplex receptacle ('uses') - // Simplex [receptacle name] connection management operations - virtual void - connect_[receptacle name] ([uses type]_ptr c - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)); - - virtual [uses type]_ptr - disconnect_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::NoConnection)); - - virtual [uses type]_ptr - get_connection_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); -## else ([receptacle name] is a multiplex ('uses multiple') receptacle) - // Multiplex [receptacle name] connection management operations - virtual ::Components::Cookie * - connect_[receptacle name] ([uses type]_ptr c - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::ExceedConnectionLimit, - ::Components::InvalidConnection)); - - virtual [uses type]_ptr - disconnect_[receptacle name] (::Components::Cookie *ck - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::InvalidConnection)); - - virtual [receptacle name]Connections * - get_connections_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); -## endif [receptacle name] -##end foreach [receptacle name] with [uses type] - - // Operations for consumers interfaces. -##foreach [consumer name] with [eventtype] in (list of all consumers) generate: - - // First we need to generate the event sink specific servant - class [SERVANT]_Export [eventtype]Consumer_[consumer name]_Servant - : public virtual POA_[eventtype]Consumer, // full skeleton name here - public virtual PortableServer::RefCountServantBase - { - public: - // Constructor and destructor. - [event type]Consumer_[consumer name]_Servant (CCM_[component name]_ptr executor, - CCM_[component name]_Context_ptr c); - - ~[event type]Consumer_[consumer name]_Servant (); - -## foreach [type] in ([eventtype] and all its parent eventtype, if any) - virtual void push_[type] ([type] *evt - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); -## end [type] - - // Inherit from ::Compopnents::EventConsumerBase - virtual void push_event (::Components::EventBase *ev - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::BadEventType)); - - // get_component implementation. - virtual CORBA::Object_ptr - _get_component (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - protected: - // Executor - CCM_[component name]_var executor_; - - // Context object. - CCM_[component name]_Context_var ctx_; - }; - - virtual [eventtype]Consumer_ptr - get_consumer_[consumer name] (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); -##end foreach [consumer name] with [eventtype] - - // Operations for emits interfaces. -##foreach [emit name] with [eventtype] in (list of all emitters) generate: - virtual void - connect_[emit name] ([eventtype]Consumer_ptr c - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException - ::Components::AlreadyConnected)); - - virtual [eventtype]Consumer_ptr - disconnect_[emit name] (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::NoConnection)); -##end foreach [emit name] with [eventtype] - - // Operations for publishes interfaces. -##foreach [publish name] with [eventtype] in (list of all publishers) generate: - virtual ::Components::Cookie * - subscribe_[publish name] ([eventtype]Consumer_ptr c - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::ExceededConnectionLimit)); - - virtual [eventtype]Consumer_ptr - unsubscribe_[publish name] (::Components::Cookie *ck - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::InvalidConnection)); -##end foreach [publish name] with [eventtype] - - // Operations for Navigation interface - virtual CORBA::Object_ptr - provide_facet (const char * name - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException , - Components::InvalidName)) ; - - virtual ::Components::FacetDescriptions * - get_all_facets (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual ::Components::FacetDescriptions * - get_named_facets (const Components::NameList & names - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException , - Components::InvalidName)); - - virtual CORBA::Boolean - same_component (CORBA::Object_ptr object_ref - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - // Operations for Receptacles interface - virtual ::Components::Cookie * - connect (const char * name, - CORBA::Object_ptr connection - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::InvalidConnection, - Components::AlreadyConnected, - Components::ExceededConnectionLimit)); - - virtual CORBA::Object_ptr - disconnect (const char * name, - Components::Cookie *ck - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::InvalidConnection, - Components::CookieRequired, - Components::NoConnection)); - - virtual ::Components::ConnectionDescriptions * - get_connections (const char * name - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); - - virtual ::Components::ReceptacleDescriptions * - get_all_receptacles (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual ::Components::ReceptacleDescriptions * - get_named_receptacles (const Components::NameList & names - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); - - // Operations for Events interface - virtual ::Components::EventConsumerBase_ptr - get_consumer (const char * sink_name - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); - - virtual ::Components::Cookie * - subscribe (const char * publisher_name, - Components::EventConsumerBase_ptr subscriber - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::InvalidConnection, - Components::ExceededConnectionLimit)); - - virtual ::Components::EventConsumerBase_ptr - unsubscribe (const char * publisher_name, - Components::Cookie *ck - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::InvalidConnection)); - - virtual void - connect_consumer (const char * emitter_name, - Components::EventConsumerBase_ptr consumer - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::AlreadyConnected, - Components::InvalidConnection)); - - virtual ::Components::EventConsumerBase_ptr - disconnect_consumer (const char * source_name - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName, - Components::NoConnection)); - - virtual ::Components::ConsumerDescriptions * - get_all_consumers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual ::Components::ConsumerDescriptions * - get_named_consumers (const Components::NameList & names - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); - - virtual ::Components::EmitterDescriptions * - get_all_emitters (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual ::Components::EmitterDescriptions * - get_named_emitters (const Components::NameList & names - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); - - virtual ::Components::PublisherDescriptions * - get_all_publishers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual ::Components::PublisherDescriptions * - get_named_publishers (const Components::NameList & names - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); - - // Operations for CCMObject interface - virtual ::CORBA::IRObject_ptr - get_component_def (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual ::Components::CCMHome_ptr - get_ccm_home (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual ::Components::PrimaryKeyBase * - get_primary_key (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::NoKeyAvailable)); - - virtual void - configuration_complete (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidConfiguration)); - - virtual void - remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::RemoveFailure)); - - virtual ::Components::ComponentPortDescription * - get_all_ports (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - // get_component implementation. - virtual CORBA::Object_ptr - _get_component (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - // CIAO specific operations. - - // Activate the object in the container_ - void - _ciao_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void - _ciao_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - protected: - // My Executor. - CCM_[component name]_var executor_; - - // My Run-time Context. - [component name]_Context *context_; - - // Managing container. - ::CIAO::Session_Container *container_; - - // Cached provided interfaces. -##foreach [facet name] with [facet type] in (list of all provided interfaces) generate: - [facet type]_var provide_[facet name]_; -##end foreach [facet name] with [facet type] - -##foreach [consumer name] with [eventtype] in (list of all consumers) generate: - [eventtype]Consumer_var consumes_[consumer name]_; -##end foreach [consumer name] with [eventtype] - - }; - - - ////////////////////////////////////////////////////////////////// - // Component Home Glue code implementation - - // Foreach component home - class [SERVANT]_Export [home name]_Servant : - public virtual POA_[home name], // full skeleton name here - public virtual PortableServer::RefCountServantBase - { - public: - // Ctor. - [home name]_Servant (CCM_[home name]_ptr exe, - CIAO::Session_Container *c); - - // Dtor. - ~[home name]_Servant (void); - - // User defined and inherited operations -##foreach [operation] in (all explicit operations in [home basename] including its parents) - - // The operation decl here. - -## end foreach opeartion - - // Factory operations -##foreach [factory name] in (all factory operations in [home basename] including its parents) - // for factory operations inherit from parent home(s), they should return - // the corresponding component types their homes manage - virtual [component name]_ptr - [factory name] (.... ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::CreateFailure, - ....)); -##end foreach [factory name] - - // Finder operations -##foreach [finder name] in (all finder operations in [home basename] including its parents) - // for finder operations inherit from parent home(s), they should return - // the corresponding component types their homes manage - virtual [component name]_ptr - [finder name] (.... ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::FinderFailure, - ....)); -##end foreach [finder name] - -## if [home name] is a keyless home - - // Operations for KeylessHome interface - virtual ::Components::CCMObject_ptr - create_component (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CreateFailure)); - -## else [home basename] is keyed home with [key type] - - // We do not support key'ed home at the moment but we might - // as well generate the mapping. - virtual [component name]_ptr create ([key type] *key - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::CreationFailure, - ::Components::DuplicateKeyValue, - ::Components::InvalidKey)); - - virtual [component name]_ptr - find_by_primary_key ([key type] *key - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::FinderFailure, - ::Components::UnknownKeyValue, - ::Components::InvalidKey)); - - virtual void remove ([key type] *key - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::RemoveFailure, - ::Components::UnknownKeyValue, - ::Components::InvalidKey)); - - virtual [key type] * - get_primary_key ([component name]_ptr comp - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - -## endif (keyed or keyless home) - - // Operations for Implicit Home interface - virtual [component name]_ptr - create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CreateFailure)); - - // Operations for CCMHome interface - virtual ::CORBA::IRObject_ptr - get_component_def (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual ::CORBA::IRObject_ptr - get_home_def (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void remove_component (Components::CCMObject_ptr comp - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::RemoveFailure)); - - protected: - // Helper method for factory operations. - [component name]_ptr - _ciao_activate_component (CCM_[component name]_ptr exe - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void - _ciao_passivate_component ([component name]_ptr comp - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - // My Executor. - CCM_[home name]_var executor_; - - // My Container - CIAO::Session_Container *container_; - - // Components this home manages. - ACE_Hash_Map_Manager_Ex <PortableServer::ObjectId, - [component name]_Servant*, - TAO_ObjectId_Hash, - ACE_Equal_To<PortableServer::ObjectId>, - ACE_SYNCH_MUTEX> component_map_; - }; - -} - -extern "C" [SERVANT]_Export ::PortableServer::Servant -create[home name]_Servant (::Components::HomeExecutorBase_ptr p, - CIAO::Session_Container *c - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - -#if defined (__ACE_INLINE__) -# include "[idl-name]_svnt.inl" -#endif /* __ACE_INLINE__ */ - - -#include /**/ "ace/post.h" -#endif /* CIAO_GLUE_SESSION_[idl-basename]_SVNT_H */ diff --git a/TAO/CIAO/docs/templates/CIAO_Glue_Session_Template.inl b/TAO/CIAO/docs/templates/CIAO_Glue_Session_Template.inl deleted file mode 100644 index 8b02307bc85..00000000000 --- a/TAO/CIAO/docs/templates/CIAO_Glue_Session_Template.inl +++ /dev/null @@ -1,494 +0,0 @@ -// $Id$ -*- C++ -*- - -// The generated filename for files using this template shoule be -// [idl-basename]GS.i GS --> GlueSession - -// @@ Notice: [ciao module name] can expand to either CIAO_GLUE or -// CIAO_GLUE_[module name] as defined in the header file. - -/// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -/// @@@ Notice that all component and interface names need to be -/// fully qualified as we are creating a new namespace for the CIAO's -/// container glue code. -/// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -////////////////////////////////////////////////////////////////// -// Facet Glue Code implementation -// @@ We are assuming that these facets are declared under the same -// module as the component (thus, we are placing this glue code -// here under the same namespace. If they are not, we will -// either be generating them in separate namespaces, or include -// some other CIDL generated files to get the glue code -// implementation. -////////////////////////////////////////////////////////////////// - -##foreach [facet type] in (all facet interface types in the original IDL) -// Constructor and destructor. -ACE_INLINE -[ciao module name]::[facet type]_Servant::[facet type]_Servant (CCM_[facet type]_ptr executor, - ::Components::CCMContext_ptr c) - : executor_ (CCM_[facet type]::_duplicate (executor)), - ctx_ (Components::CCMContext::_duplicate (c)) -{ -} - -ACE_INLINE -[ciao module name]::[facet type]_Servant::~[facet tyep]_Servant () -{ -} - - -## foreach [operation] in (all facet operations) - -// This is only a guideline... we always relay the operation to underlying -// executor. - -ACE_INLINE [operation return_type] -[ciao module name]::[facet type]_Servant::[operation] ([operation args]) -{ - // Simply relay to executor. May not need to return the result... - return this->executor_->operation ([operation args]); -} -## end foreach [operation] - -##end foreach [facet type] - - -////////////////////////////////////////////////////////////////// -// Component specific context implementation -////////////////////////////////////////////////////////////////// - -ACE_INLINE -[ciao module name]::[component name]_Context::[component name]_Context (::Components::CCMHome_ptr home, - ::CIAO::Session_Container *c, - [ciao module name]::[component name]_Servant *sv) - : home_ (::Components::CCMHome::_duplicate (home)), - container_ (c), - servant_ (sv) -{ - -} - -ACE_INLINE -[ciao module name]::[component name]_Context::~[component name]_Context () -{ -} - -// Operations for emits interfaces. -##foreach [emit name] with [eventtype] in (list of all emitters) generate: - -ACE_INLINE void -[ciao module name]::[component name]_Context::connect_[emit name] ([eventtype]Consumer_ptr c - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::AlreadyConnected)) -{ - if (CORBA::is_nil (c)) - ACE_THROW (CORBA::BAD_PARAM ()); - - if (! CORBA::is_nil (this->ciao_emits_[emit name]_consumer_.in ())) - ACE_THROW (::Components::AlreadyConnected ()); - - this->ciao_emits_[emit name]_consumer_ = c; -} - -ACE_INLINE [eventtype]Consumer_ptr -[ciao module name]::[component name]_Context::disconnect_[emit name] (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::NoConnection)) -{ - if (CORBA::is_nil (this->ciao_emits_[emit name]_consumer_.in ())) - ACE_THROW (::Components::NoConnection ()); - - return this->ciao_emits_[emit name]_consumer_._retn (); -} - -##end foreach [emit name] with [eventtype] - -// Operations for ::Components::CCMContext -ACE_INLINE ::Components::Principal_ptr -[ciao module name]::[component name]_Context::get_caller_principal (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // @@ We don't support Security in CIAO yet. - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); -} - -ACE_INLINE ::Components::CCMHome_ptr -[ciao module name]::[component name]_Context::get_CCM_home (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return ::Components::CCMHome::_duplicate (this->home_.in ()); -} - -ACE_INLINE CORBA::Boolean -[ciao module name]::[component name]_Context::get_rollback_only (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)) -{ - // @@ We don't support Transaction in CIAO yet. - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); -} - -ACE_INLINE ::Components::Transaction::UserTransaction_ptr -[ciao module name]::[component name]_Context::get_user_transaction (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)) -{ - // @@ We don't support Transaction in CIAO yet. - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); -} - -ACE_INLINE CORBA::Boolean -[ciao module name]::[component name]_Context::is_caller_in_role (const char * role - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ACE_UNUSED_ARG (role); - - // @@ We don't support Transaction in CIAO yet. - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); -} - -ACE_INLINE void -[ciao module name]::[component name]_Context::set_rollback_only (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)) -{ - // @@ We don't support Transaction in CIAO yet. - ACE_THROW (CORBA::NO_IMPLEMENT ()); -} - -////////////////////////////////////////////////////////////////// -// Component Servant Glue code implementation -////////////////////////////////////////////////////////////////// - -##foreach [operation] in all supported interfaces of own component and all inherited components and attribute accessors/mutators - -// This is only a guideline... we always relay the operation to underlying -// executor. - -ACE_INLINE [operation return_type] -[ciao module name]::[component name]_Servant::[operation] ([operation args]) -{ - // Simply relay to executor. May not need to return the result... - return this->executor_->operation ([operation args]); -} - -##end - -##foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate: -## if [receptacle name] is a simplex receptacle ('uses') -// Simplex [receptacle name] connection management operations -ACE_INLINE void -[ciao module name]::[component name]_Servant::connect_[receptacle name] ([uses type]_ptr c - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)) -{ - this->context_->connect_[receptacle name] (c - ACE_ENV_ARG_PARAMETER); -} - -ACE_INLINE [uses type]_ptr -[ciao module name]::[component name]_Servant::disconnect_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::NoConnection)) -{ - return this->context_->disconnect_[receptacle name] (ACE_ENV_SINGLE_ARG_PARAMETER); -} - -ACE_INLINE [uses type]_ptr -[ciao module name]::[component name]_Servant::get_connection_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return this->context_->get_connection_[receptacle name] (ACE_ENV_SINGLE_ARG_PARAMETER); -} -## else ([receptacle name] is a multiplex ('uses multiple') receptacle) - -// Multiplex [receptacle name] connection management operations -ACE_INLINE ::Components::Cookie * -[ciao module name]::[component name]_Servant::connect_[receptacle name] ([uses type]_ptr c - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::ExceedConnectionLimit, - ::Components::InvalidConnection)) -{ - return this->context_->connect_[receptacle name] (c - ACE_ENV_ARG_PARAMETER); -} - -ACE_INLINE [uses type]_ptr -[ciao module name]::[component name]_Servant::disconnect_[receptacle name] (::Components::Cookie *ck - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::InvalidConnection)) -{ - return this->context_->disconnect_[receptacle name] (ck - ACE_ENV_ARG_PARAMETER); -} - -ACE_INLINE [receptacle name]Connections * -[ciao module name]::[component name]_Servant::get_connections_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return this->context_->get_connections_[receptacle name] (ACE_ENV_SINGLE_ARG_PARAMETER); -} - -## endif [receptacle name] -##end foreach [receptacle name] with [uses type] - -////////////////////////////////////////////////////////////////// -// EventConsumer Glue Code implementation -// @@ We are assuming that these consumers are declared under the same -// module as the component (thus, we are placing this glue code -// here under the same namespace. If they are not, we will -// either be generating them in separate namespaces, or include -// some other CIDL generated files to get the glue code -// implementation. -////////////////////////////////////////////////////////////////// - -##foreach [consumer name] with [eventtype] in (list of all consumers) generate: - -// Constructor and destructor. -ACE_INLINE -[ciao module name]::[component name]_Servant::[eventtype]Consumer_[consumer name]_Servant::[eventtype]Consumer_[consumer name]_Servant - (CCM_[component name]_ptr executor, - CCM_[component name]_Context_ptr c) - : executor_ (CCM_[component name]::_duplicate (executor)), - ctx_ (CCM_[component name]_Context::_duplicate (c)) -{ -} - -ACE_INLINE -[ciao module name]::[component name]_Servant::[eventtype]Consumer_[consumer name]_Servant::~[eventtype]Consumer_[consumer name]_Servant () -{ -} - -ACE_INLINE CORBA::Object_ptr -[ciao module name]::[component name]_Servant::[eventtype]Consumer_[consumer name]_Servant::_get_component (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return this->ctx_->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER); -} - -ACE_INLINE void -[ciao module name]::[component name]_Servant::[eventtype]Consumer_[consumer name]_Servant::push_[eventtype] - ([eventtype] *evt - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - this->executor_->push_[consumer name] (evt - ACE_ENV_ARG_PARAMETER); -} - -## foreach [type] in (all parents of eventtype, if any, not including EventConsumerBase) -ACE_INLINE void -[ciao module name]::[component name]_Servant::[eventtype]Consumer_[consumer name]_Servant::push_[type] - ([type] *evt - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // @@ Problem, there's no way to handle this case. - - // this->executor_->push_[consumer name] (evt ACE_ENV_ARG); - ACE_THROW (::CORBA::BAD_PARAM ()); -} -## end [type] - -##end foreach [consumer name] - -// Operations for emits interfaces. -##foreach [emit name] with [eventtype] in (list of all emitters) generate: -ACE_INLINE void -[ciao module name]::[component name]_Servant::connect_[emit name] ([eventtype]Consumer_ptr c - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException - ::Components::AlreadyConnected)) -{ - this->context_->connect_[emit name] (c - ACE_ENV_ARG_PARAMETER); -} - -ACE_INLINE [eventtype]Consumer_ptr -[ciao module name]::[component name]_Servant::disconnect_[emit name] (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::NoConnection)) -{ - return this->context_->disconnect_[emit name] (ACE_ENV_SINGLE_ARG_PARAMETER); -} -##end foreach [emit name] with [eventtype] - -// Operations for publishes interfaces. -##foreach [publish name] with [eventtype] in (list of all publishers) generate: -ACE_INLINE ::Components::Cookie * -[ciao module name]::[component name]_Servant::subscribe_[publish name] ([eventtype]Consumer_ptr c - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::ExceededConnectionLimit)) -{ - return this->context_->subscribe_[publish name] (c - ACE_ENV_ARG_PARAMETER); -} - -ACE_INLINE [eventtype]Consumer_ptr -[ciao module name]::[component name]_Servant::unsubscribe_[publish name] (::Components::Cookie *ck - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::InvalidConnection)) -{ - return this->context_->unsubscribe_[publish name] (ck - ACE_ENV_ARG_PARAMETER); -} -##end foreach [publish name] with [eventtype] - -////////////////////////////////////////////////////////////////// -// Component Home Glue code implementation -////////////////////////////////////////////////////////////////// - -ACE_INLINE -[ciao module name]::[home name]_Servant::[home name]_Servant (CCM_[home name]_ptr exe, - CIAO::Session_Container *c) - : executor_ (CCM_[home name]::_duplicate (exe)), - container_ (c) -{ -} - -ACE_INLINE -[ciao module name]::[home name]_Servant::~[home name]_Servant (void) -{ -} - -##foreach [operation] in (all explicit operations in [home basename] including its parents) - -// The operation impl here. This can simply be relayed to the underlying executor... - -## end foreach opeartion - -##foreach [factory name] in (all factory operations in [home basename] including its parents) -// for factory operations inherit from parent home(s), they should return -// the corresponding component types their homes manage -ACE_INLINE [component name]_ptr -[ciao module name]::[home name]_Servant::[factory name] (.... ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::CreateFailure, - ....)) -{ - Components::EnterpriseComponent_var _ciao_ec = - this->executor_->[factory name] (.... ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - CCM_[component name]_var _ciao_comp - = CCM_[component name]::_narrow (_ciao_ec.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - return this->_ciao_activate_component (_ciao_comp.in () - ACE_ENV_ARG_PARAMETER); -} -##end foreach [factory name] - -##foreach [finder name] in (all finder operations in [home basename] including its parents) -// for finder operations inherit from parent home(s), they should return -// the corresponding component types their homes manage -ACE_INLINE [component name]_ptr -[ciao module name]::[home name]_Servant::[finder name] (.... ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::FinderFailure, - ....)) -{ - Components::EnterpriseComponent_var com = - this->executor_->[finder name] (.... ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - // Do we create a new object reference referring to the same object, - // or do we try to create a different objref referring to the same object? - return this->_ciao_create_helper (com - ACE_ENV_ARG_PARAMETER); -} -##end foreach [finder name] - -## if [home name] is a keyless home - -// Operations for KeylessHome interface -ACE_INLINE ::Components::CCMObject_ptr -[ciao module name]::[home name]_Servant::create_component (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CreateFailure)) -{ - // Simply forward to the create method. - return this->create (ACE_ENV_SINGLE_ARG_PARAMETER); -} - -## else [home basename] is keyed home with [key type] - -// We do not support key'ed home at the moment but we might -// as well generate the mapping. -ACE_INLINE [component name]_ptr -[ciao module name]::[home name]_Servant::create ([key type] *key) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::CreationFailure, - ::Components::DuplicateKeyValue, - ::Components::InvalidKey)) -{ - // @@ TO-DO when we suppor keyed home. - - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); -} - -ACE_INLINE [component name]_ptr -[ciao module name]::[home name]_Servant::find_by_primary_key ([key type] *key) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::FinderFailure, - ::Components::UnknownKeyValue, - ::Components::InvalidKey)) -{ - // @@ TO-DO when we suppor keyed home. - - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); -} - - -ACE_INLINE void -[ciao module name]::[home name]_Servant::remove ([key type] *key) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::RemoveFailure, - ::Components::UnknownKeyValue, - ::Components::InvalidKey)) -{ - // @@ TO-DO when we suppor keyed home. - - ACE_THROW (CORBA::NO_IMPLEMENT ()); -} - -ACE_INLINE [key type] * -[ciao module name]::[home name]_Servant::get_primary_key ([component name]_ptr comp) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // @@ TO-DO when we suppor keyed home. - - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); -} - -## endif (keyed or keyless home) - - -// Operations for CCMHome interface -ACE_INLINE ::CORBA::IRObject_ptr -[ciao module name]::[home name]_Servant::get_component_def (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // @@ TO-DO. Contact IfR? - - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); -} - -ACE_INLINE CORBA::IRObject_ptr -[ciao module name]::[home name]_Servant::get_home_def (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // @@ TO-DO. Contact IfR? - - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); -} diff --git a/TAO/CIAO/docs/templates/Executor.idl b/TAO/CIAO/docs/templates/Executor.idl deleted file mode 100644 index 259bffac0df..00000000000 --- a/TAO/CIAO/docs/templates/Executor.idl +++ /dev/null @@ -1,246 +0,0 @@ -// $Id$ - -// =========================================================== -// -// @file Executor.idl -// -// The purpose of this IDL file is to serve as a template for the CIDL -// generated equivalent executor file. The CIDL will generate this -// file directly which, in turn, gets compiled by the TAO IDL compiler -// to generate the C++ mappings for the stuff defined in this file -// into a set of [idl-name]EC.{h,inl,cpp} files. -// -// This intermediate step is necessary because component implemenetors -// will need to extend these executor definitions (thru inheritance) -// to implemenet more complex executor implementations, such as those -// that support session component interface. (This is necessary to -// properly support C++ mapping for features such as interface -// narrowing.) -// -// What are missing in the template for executor mappings are the -// exception specifications for most operations. -// -// @author Nanbor Wang <nanbor@cs.wustl.edu> -// -// =========================================================== - -#ifndef [component_idl]E_IDL -#define [component_idl]E_IDL - -#include "CCM_Container.idl" // Found in $(CIAO_ROOT)/ciao - // For various definitions of container - // internal/callback interfaces -#include "[component_idl].idl" // Original component IDL definition -// @@ We may need to include other *E.idl here.... Can't figure out -// if we can do this automagically or not. - -##if there are module definitions, preserve them all -module [module_name] { -##endif - -//////////////////////////////////////////////////////////////////// -//// * Iterate thru all supported interface types -//// It's possible that we need to put some of the common supported -//// interface definitions into a separate compilation unit. How do we -//// specify that in CCIDL? I haven't figured that out. Perhaps -//// allowing CCIDL to compile files that contain no component -//// definition? -##foreach [interface_type] in (types of all supported interface) generate: - - local interface CCM_[interface_type] : [interface_type] - { - }; - -##end foreach [interface_type] - -//////////////////////////////////////////////////////////////////// -//// * Iterate thru all facet ('provides' interface) interface types -//// It's possible that we need to put some of the common facet -//// definitions into a separate compilation unit. How do we -//// specify that in CCIDL? I haven't figured that out. Perhaps -//// allowing CCIDL to compile files that contain no component -//// definition? -##foreach [facet_interface_type] in (types of all facets) generate: - - local interface CCM_[facet_interface_type] : [facet_interface_type] - { - }; - -##end foreach [facet_interface_type] - -//////////////////////////////////////////////////////////////////// -//// * Iterate thru all event ('emits', "publishes', or 'consumes') types -//// It's possible that we need to put some of the EventConsumer -//// definitions into a separate compilation unit. Like in the case -//// of facets interface mappings, how do we -//// specify that in CCIDL? I haven't figured that out. Perhaps -//// allowing CCIDL to compile files that contain no component -//// definition? - -##foreach [eventtype] in (all eventtypes) generate: - - local interface CCM_[eventtype]Consumer - { - void push (in [eventtype] ev); - }; - -##end foreach [eventtype] - - -//////////////////////////////////////////////////////////////////// -//// * Iterate thru all component definitions in the IDL files. -//// Notice that there's no distinction between entity and session -//// components in executor mappings. - -##foreach [component basename] in (all component definitions) generate: - - // Component Main Executor Interface. We currently do not - // support Executor-based implementation. - - local interface CCM_[component basename]_Executor - : -## if [component basename] inherits from [parent component name] - CCM_[parent component name]_Executor -## else - ::Components::EnterpriseComponent -## endif -## foreach [interface name] in (all component supported interfaces) generate: - , [interface name] -## end foreach [interface name] - - { -## foreach [attribute definition] in (attributes defined in [component basename]) generate: - [attribute definition]; -## end foreach [attribute definition] - - }; - - // Monolithic component executor. - // For implementing monolithic component call back interface. - - local interface CCM_[component basename] - : -## if [component basename] inherits from [parent component name] - CCM_[parent component name] -## else - ::Components::EnterpriseComponent -## endif -## foreach [interface name] in (all component supported interfaces) generate: - , [interface name] -## end foreach [interface name] - - { -## foreach [attribute definition] in (attributes defined in [component basename]) generate: - [attribute definition]; -## end foreach [attribute definition] - -## foreach [facet name] with [facet type] in (list of all provided interfaces) generate: - CCM_[facet type] get_[facet name] (); -## end foreach [facet name] with [facet type] - -## foreach [event name] with [eventtype] in (list of all event sinks) generate: - void push_[event name] (in [eventtype] ev); -## end foreach [event name] with [eventtype] - - }; - - /** - * Component Context Interface - * - * Notice that we are taking a shortcut here to inherit the - * component-specific context from SessionContext directly instead - * of CCMContext. - */ - local interface CCM_[component basename]_Context - : -## if [component basename] inherits from [parent component name] - CCM_[parent component name]_Context -## else - ::Components::SessionContext -## endif - { - -## foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate: -## if [receptacle name] is a simplex receptacle ('uses') - [uses type] get_connection_[receptacle name] (); -## else ([receptacle name] is a multiplex ('uses multiple') receptacle) - // [receptacle name]Connections typedef'ed as a sequence of - // struct [receptacle name]Connection. - [receptacle name]Connections get_connections_[receptacle name] (); -## endif [receptacle name] -## end foreach [receptacle name] with [uses type] - -## foreach [event name] with [eventtype] in (list of all event sources) generate: - void push_[event name] (in [eventtype] ev); -## end foreach [event name] with [eventtype] - - }; - -##end foreach [component basename] - - -//////////////////////////////////////////////////////////////////// -//// * Iterate thru all home definitions in the IDL files. - -##foreach [home basename] in (all home definitions) generate: - - local interface CCM_[home basename]Explicit - : -## if [home basename] inherits from [parent home name] - CCM_[parent home name]Explicit -## else - ::Components::HomeExecutorBase -## endif -## foreach [interface name] in (all home supported interfaces) generate: - , [interface name] -## end foreach [interface name] - { -##foreach [operation] in (all explicit operations defined in [home basename]) - - // The operation decl here. - -## end foreach opeartion - -##foreach [factory name] in (all factory operations defined in [home basename]) - ::Components::EnterpriseComponent [factory name] (....) - raise (Components::CreateFailure, ....); -##end foreach [factory name] - -##foreach [finder name] in (all finder operations defined in [home basename]) - ::Components::EnterpriseComponent [finder name] (....) - raise (Components::FinderFailure, ....); -##end foreach [finder name] - }; - - local interface CCM_[home basename]Implicit - { -## if [home basename] is a keyless home - ::Components::EnterpriseComponent create () - raises (::Components::CCMException); -## else [home basename] is key'ed home with [key type] - // We do not support key'ed home at the moment but we might - // as well generate the mapping. - ::Components::EnterpriseComponent create (in [key type] key) - raises (::Components::CCMException); - - ::Components::EnterpriseComponent find_by_primary_key (in [key type] key) - raises (::Components::CCMException); - - void remove (in [key type] key) - raises (::Components::CCMException); -## endif (key'ed or keyless home) - }; - - local interface CCM_[home basename] - : CCM_[home basename]Explicit, - CCM_[home basename]Implicit - { - }; - -##end foreach [home basename] - -##if there are module definitions, preserve them all -}; -##endif - -#endif /* [component_idl]E_IDL */ diff --git a/TAO/CIAO/docs/templates/cidl_template.cidl b/TAO/CIAO/docs/templates/cidl_template.cidl deleted file mode 100644 index 3d359708f32..00000000000 --- a/TAO/CIAO/docs/templates/cidl_template.cidl +++ /dev/null @@ -1,31 +0,0 @@ -// $Id$ -*- C++ -*- - -/** - * @file cidl_template.cidl - * - * This file show an example cidl file. - */ - -// @@ We do not support import (yet). -//import [component module]; - -// [idl-basename] contains the IDL3 definitions for component(s) and -// home(s) and the interfaces that they need. - -#include "[idl-basename].idl" - -// We only support a simple session implementation definition, for -// now. @@ What is the relation of various names here and the -// generated names we used in the glue code? -composition session [composition name] -{ - home executor [home executor name] - { - implement [home name]; - manages [component executor name]; - }; -}; - - -// @@ We should also generate somet sort of implementaion template for -// users. E.g., a set of [idl-basename]_impl.* and the MPC files(?). diff --git a/TAO/CIAO/docs/tutorial/Hello/CIAO_Installation_Data.ini b/TAO/CIAO/docs/tutorial/Hello/CIAO_Installation_Data.ini deleted file mode 100644 index 30c917fe349..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/CIAO_Installation_Data.ini +++ /dev/null @@ -1,3 +0,0 @@ -[ComponentInstallation] -DCE:05833d92-4783-4b85-ac14-e2575dac26f7=hello_svnt -DCE:530a6305-8181-47ca-bd82-0b834016db97=hello_exec diff --git a/TAO/CIAO/docs/tutorial/Hello/README b/TAO/CIAO/docs/tutorial/Hello/README deleted file mode 100644 index 182f5e5baee..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/README +++ /dev/null @@ -1,104 +0,0 @@ -// $Id$ - -This example showcases a component implementation in its simplest -form. The utmost purpose of this example is to demonstrate how easy -it is to implement a component and a system using CCM and to provide -ourselves an example implementation of how the CCIDL generated code -should look like. - -To implement a component, all you need to do is to define the -component, as in hello.idl. Then you have to define some aspects of -the component implementations using the CIDL definition, as we do here -with hello.cidl. And finally, the component implementor implement the -component and home executors according to the executor mapping. - - -User Defined Notes -Files ---------- --------------------------------------- -hello.idl Component and Home IDL definitions. - -hello.cidl Component and Home implementation definitions. - -hello_exec Executor implementations. - - -We also generate 3 libraries and 2 executables in this example. They -may look perplexing at the first glance, but when we have full CCM -support, all but one library and one executable will need to be -generated manually. The rest should be generated thru the tools provided by CIAO. -Below is the list of libraries and executable in this example: - -Files Notes ---------- --------------------------------------- -hello_stub A library contains the client stub implementation. - Client programs can link to this library instead of including - the stub implementation directly in the executable. The real - purpose of putting the stub code in a separate library is - to avoid code duplication when various interdependent components - are installed into one component server (where they will need to - interact with other components using the collocation code in the - stub library.) - -hello_svant This library contains the server side skeletons and CIDL generated - (currently handcrafted) servant implementation for the component - and home defined in CIDL. - -server This is a minimalist's implementaion of a simple "generic server". - We should be able to generalize the example into a "component server" - in CIAO which will support component deployment and server configuration - thru some property files. - -client A simple client program that access the component. - -hello_exec This library contains the CIDL generated executor definitions and the - actual component and home implementations (business logic.) It it not - clear to me whether we should package this file together with hello_servants - library as most of the stuff included in these libraries are generated - by CIDL compiler. We will see in the future. - - -** Here's a more detailed break down of the process. - -1. Define the component, as in hello.idl which defines the client-view - of the component. This view is equivalent to the interfaces - defined in helloC.idl (for component unawared client.) - -2. Define how the component should be implemented, as in hello.cidl. - CIDL compiler should generate the executor definitions as in - helloE.idl. - -3. CIDL also generate the component-specific skeleton (container?) - implementations as in HelloSkel.xxx. These skeleton - implementations determine how the component should be activated, - how to manage the servant lifecycle, their OID and such. - -4. If a component implementation needs to support more advanced - features, such as transactional behavior, the developer needs to - "extend" the executor definitions by inheriting from other - components callback interfaces, such as SessionSynchronization. - We don't have an example here because we want to keep this example - as simple as possible. - -5. Component executors are implemention by implementing the desired - executor definition. - -6. Packaging and deploying the component.... This example only shows - how to deploy a single component implementation. The servant - skeletons can either be packaged with the component implementation - in a single DLL, or be packaged in a separate DLL which, in turn, - can be deployed with the component implementation together as an - assembly, or be put in some sort of repository. - - -How to Run: ----------- - -Run with - - run_test.pl to start the test using CIAO_Daemon and ComponentServer - -or - - run_simple_test.pl to start the test using Simple_Component_Server - Note: I am having trouble with the simple component server.
\ No newline at end of file diff --git a/TAO/CIAO/docs/tutorial/Hello/client.cpp b/TAO/CIAO/docs/tutorial/Hello/client.cpp deleted file mode 100644 index df7497cd9b9..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/client.cpp +++ /dev/null @@ -1,117 +0,0 @@ -// $Id$ - -#include "helloC.h" -#include "ace/Read_Buffer.h" -#include "ace/streams.h" - -int -invoke (CORBA::Object_ptr obj, - const char *msg - ACE_ENV_ARG_DECL) -{ - // Narrow - HelloHome_var hh = HelloHome::_narrow (obj - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); ; - - if (CORBA::is_nil (hh.in ())) - ACE_ERROR_RETURN ((LM_ERROR, "Argument is not a HelloHome reference\n"), -1); - - HelloWorld_var hw = hh->create (); - - if (CORBA::is_nil (hw.in ())) - ACE_ERROR_RETURN ((LM_ERROR, "Fail to create a HelloWorld reference\n"), -1); - - CORBA::String_var name = CORBA::string_dup (msg); - CORBA::String_var hi = hw->sayhello (name - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); - - ACE_DEBUG ((LM_INFO, "%s\n", hi.in ())); - - hh->remove_component (hw.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); - - return 0; -} - -int -main (int argc, char *argv[]) -{ - ACE_TRY_NEW_ENV - { - // Initialize orb - CORBA::ORB_var orb = CORBA::ORB_init (argc, argv ACE_ENV_ARG_PARAMETER); - - // Resolve HomeFinder interface - -#if 0 - CORBA::Object_var obj = orb->resolve_initial_references ("HomeFinder" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Components::HomeFinder_var home_finder = - Components::HomeFinder::_narrow (obj ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (CORBA::is_nil (home_finder.in ())) - ACE_ERROR_RETURN ((LM_ERROR, "Can't resolve initial HomeFinder reference\n"), -1); - - // Now get the HelloHome - - obj = home_finder->find_home_by_name ("HelloHome" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - invoke (obj.in (), - "Frodo Baggins using 'find_home_by_name'" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - obj = home_finder->find_home_by_home_type - ("IDL:omg.org/HelloHome:1.0" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - invoke (obj.in (), - "Samwise Gamgee using 'find_home_by_home_type'" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - obj = home_finder->find_home_by_component_type - ("IDL:omg.org/HelloWorld:1.0" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - invoke (obj.in (), - "Meriadoc Brandybuck using 'find_home_by_component_type'" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - -#else - CORBA::Object_var obj - = orb->string_to_object ("file://hello.ior" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - invoke (obj.in (), - "Meriadoc Brandybuck using 'file://hello.ior'" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; -#endif - - - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Who is the culprit \n"); - cerr << "Uncaught CORBA exception" << endl; - return 1; - } - ACE_ENDTRY; - - return 0; -} diff --git a/TAO/CIAO/docs/tutorial/Hello/config b/TAO/CIAO/docs/tutorial/Hello/config deleted file mode 100644 index 3bfe3d3dbe5..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/config +++ /dev/null @@ -1 +0,0 @@ -hello_executors|createHelloHome_Impl|hello_servants|createHelloHome_Servant|IDL:omg.org/HelloHome:1.0|IDL:omg.org/HelloWorld:1.0|HelloHome diff --git a/TAO/CIAO/docs/tutorial/Hello/hello.cidl b/TAO/CIAO/docs/tutorial/Hello/hello.cidl deleted file mode 100644 index fa41764521e..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/hello.cidl +++ /dev/null @@ -1,13 +0,0 @@ -// $Id$ -*- IDL -*- - -// Component implementation definition of hello.idl. -#include "hello.idl" - -composition session hello_example -{ - home executor HelloHome_Exec - { - implements HelloHome; // This implies that HelloWorld_Exec - manages HelloWorld_Exec; // implements HellowWorld. - }; -}; diff --git a/TAO/CIAO/docs/tutorial/Hello/hello.csd b/TAO/CIAO/docs/tutorial/Hello/hello.csd deleted file mode 100644 index ac185744423..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/hello.csd +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0"?> <!-- -*- SGML -*- --> - -<!-- If this file is moved to a different directory, make sure to change the - path to the DTD below. Otherwise the examples won't work. --> -<!DOCTYPE softpkg SYSTEM "../../../docs/XML/softpkg.dtd"> - -<!-- Hello World's Software Package Descriptor --> -<!-- This file describes various HelloWorld executor --> -<!-- implementations. --> - - -<softpkg name="CIAO-HelloWorld" version="1.0"> - <pkgtype>CORBA Component</pkgtype> - <title>Hello World</title> - <author> - <company>Washington University in St. Louis</company> - <webpage href="http://www.cs.wustl.edu/~doc/"/> - </author> - <description>A Hello World executor implementation.</description> - <license href="http://www.cs.wustl.edu/~schmidt/ACE-copying.html"/> - <idl id="IDL:HelloWorld:1.0" homeid="IDL:HelloHome:1.0"> - <fileinarchive name="hello.idl"/> - </idl> - - <!-- We don't need a property file for this example. However, --> - <!-- what to do with this element? Cache it in ComponentInstallation? --> - <!-- A better question maybe, when do we actually read the file and --> - <!-- build the attributes defined in the file? By Assembly perhaps? --> - <!-- Notice that this property file applies to the implementation itself. --> - <!-- Whatever that means. --> -<!-- <propertyfile> --> -<!-- <fileinarchive name="empty.cpf"/> --> -<!-- </propertyfile> --> - - <descriptor type="CORBA Component"> - <fileinarchive name="hello.ccd"/> - </descriptor> - - <implementation id="DCE:530a6305-8181-47ca-bd82-0b834016db97"> - <!-- Perhaps we can list more OS here as ACE knows what to look for? --> - <!-- Maybe not... But then selecting the right configuration becomes hard. --> - <os name="WinNT" version="4.0"/> - <os name="WinXP" version="5.0"/> - <processor name="x86"/> - <!-- What about configuration? Such as Debug/Release? --> - <compile name="MSVC" version="6.0"/> - <programminglanguage name="C++"/> - <dependency type="ORB"> - <name>TAO</name> - </dependency> - - <!-- CIAO extension --> - <dependency type="CIAODLL"> - <softpkgref> - <!-- .ssd stands for Servant Software Descriptors which is a CIAO extension --> - <fileinarchive name="hello.ssd"/> - <implref idref="DCE:05833d92-4783-4b85-ac14-e2575dac26f7"/> - </softpkgref> - </dependency> - - <!-- What happens when one define descriptors for both softpkg and --> - <!-- implementations? --> - - <code type="DLL"> - <!-- No need to specify extension below since ACE takes care of that, --> - <fileinarchive name="hello_exec"/> - <entrypoint>createHelloHome_Impl</entrypoint> - </code> - - </implementation> - - <!-- Let's add more implementation description later when we try to --> - <!-- compile this stuff on, say, Solaris and Linux. --> - -</softpkg> diff --git a/TAO/CIAO/docs/tutorial/Hello/hello.idl b/TAO/CIAO/docs/tutorial/Hello/hello.idl deleted file mode 100644 index fe1a29a0370..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/hello.idl +++ /dev/null @@ -1,19 +0,0 @@ -// $Id$ - -// A plain vanilla component definition. - -#include <Components.idl> - -interface Hello -{ - string sayhello (in string username); -}; - -component HelloWorld supports Hello -{ -}; - - -home HelloHome manages HelloWorld -{ -}; diff --git a/TAO/CIAO/docs/tutorial/Hello/hello.mpc b/TAO/CIAO/docs/tutorial/Hello/hello.mpc deleted file mode 100644 index 9146af9101f..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/hello.mpc +++ /dev/null @@ -1,80 +0,0 @@ -// $Id$ - -project(hello_stub): ciao_client { - sharedname = hello_stub - idlflags += -Wb,stub_export_macro=HELLO_STUB_Export -Wb,stub_export_include=hello_stub_export.h -Wb,skel_export_macro=HELLO_SVNT_Export -Wb,skel_export_include=hello_svnt_export.h - dynamicflags = HELLO_STUB_BUILD_DLL - - IDL_Files { - hello.idl - } - - Source_Files { - helloC.cpp - } -} - -project(hello_svnt) : ciao_servant { - after += hello_stub - sharedname = hello_svnt - libs += hello_stub - idlflags += -Wb,export_macro=HELLO_SVNT_Export -Wb,export_include=hello_svnt_export.h - dynamicflags = HELLO_SVNT_BUILD_DLL - - CIDL_Files { - hello.cidl - } - - IDL_Files { - helloE.idl - } - - Source_Files { - helloEC.cpp - helloS.cpp - hello_svnt.cpp - } -} - -project(hello_exec) : ciao_component { - after += hello_svnt - sharedname = hello_exec - libs += hello_stub hello_svnt - dynamicflags = HELLO_EXEC_BUILD_DLL - - IDL_Files { - } - - Source_Files { - hello_exec.cpp - } -} - -project (*normal_client) : ciao_client { - exename = client - after += hello_stub - libs += hello_stub - - IDL_Files { - } - - Source_Files { - client.cpp - } -} - -// Client for interacting with the Simple_Component_Server -project (*simple_client) : ciao_client { - libpaths += $(CIAO_ROOT)/tools/Simple_Component_Server - after += hello_stub Simple_Server_Stub - libpaths += $(CIAO_ROOT)/tools/Simple_Component_Server - libs += hello_stub CIAO_Simple_Server_Stub - exename = simple_client - - IDL_Files { - } - - Source_Files { - simple_client.cpp - } -} diff --git a/TAO/CIAO/docs/tutorial/Hello/hello.ssd b/TAO/CIAO/docs/tutorial/Hello/hello.ssd deleted file mode 100644 index 828ca435f5b..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/hello.ssd +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0"?> <!-- -*- SGML -*- --> - -<!-- If this file is moved to a different directory, make sure to change the - path to the DTD below. Otherwise the examples won't work. --> -<!DOCTYPE softpkg SYSTEM "../../../docs/XML/softpkg.dtd"> - -<!-- Hello World's Servant Software Descriptor --> -<!-- This file describes various HelloWorld servant --> -<!-- implementations. --> - - -<softpkg name="CIAO-HelloWorld-Servant" version="1.0"> - <pkgtype>CIAO Servant</pkgtype> - <title>Hello World Servants</title> - <author> - <company>Washington University in St. Louis</company> - <webpage href="http://www.cs.wustl.edu/~doc/"/> - </author> - <description>A Hello World executor implementation.</description> - <license href="http://www.cs.wustl.edu/~schmidt/ACE-copying.html"/> - <idl id="IDL:HelloWorld:1.0" homeid="IDL:HelloHome:1.0"> - <fileinarchive name="hello.idl"/> - </idl> - - <!-- Duplicate information. We should use the copy in hello.csd --> - <!-- So, do we really need this one? --> - <descriptor type="CORBA Component"> - <fileinarchive name="hello.ccd"/> - </descriptor> - - <implementation id="DCE:05833d92-4783-4b85-ac14-e2575dac26f7"> - <!-- The following stuff should match those defined in csd file. --> - <os name="WinNT" version="4.0"/> - <os name="WinXP" version="5.0"/> - <processor name="x86"/> - <compile name="MSVC" version="6.0"/> - <programminglanguage name="C++"/> - <dependency type="ORB"> - <name>TAO</name> - </dependency> - - <code> - <!-- No need to specify extension below since ACE takes care of that, --> - <fileinarchive name="hello_svnt"/> - <entrypoint>createHelloHome_Servant</entrypoint> - </code> - - </implementation> - - <!-- Let's add more implementation description later when we try to --> - <!-- compile this stuff on, say, Solaris and Linux. --> - -</softpkg> diff --git a/TAO/CIAO/docs/tutorial/Hello/hello_exec.cpp b/TAO/CIAO/docs/tutorial/Hello/hello_exec.cpp deleted file mode 100644 index 720f4061b04..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/hello_exec.cpp +++ /dev/null @@ -1,109 +0,0 @@ -// $Id$ - -#include "hello_exec.h" - -hello_example::HelloWorld_Impl::HelloWorld_Impl () -{ -} - -hello_example::HelloWorld_Impl::~HelloWorld_Impl () -{ -} - -char * -hello_example::HelloWorld_Impl::sayhello (const char *username - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - static const char *fmt = "Hello World message for "; - - CORBA::String_var str = - CORBA::string_alloc (ACE_OS::strlen (fmt) + - ACE_OS::strlen (username) + - 1); - - ACE_OS::strcpy (str.inout (), fmt); - ACE_OS::strcat (str.inout (), username); - - return str._retn (); -} - - -void -hello_example::HelloWorld_Impl::set_session_context (Components::SessionContext_ptr ctx - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CCMException)) -{ - ACE_DEBUG ((LM_DEBUG, "hello_example::HelloWorld_Impl::set_session_context\n")); - - this->context_ = - hello_example::HelloWorld_Exec_Context::_narrow (ctx - ACE_ENV_ARG_PARAMETER); - - ACE_CHECK; - - if (CORBA::is_nil (this->context_.in ())) - - ACE_THROW (CORBA::INTERNAL ()); - // Urm, we actually discard exceptions thown from this operation. - -} - -void -hello_example::HelloWorld_Impl::ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CCMException)) -{ -} - -void -hello_example::HelloWorld_Impl::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CCMException)) -{ -} - -void -hello_example::HelloWorld_Impl::ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CCMException)) -{ -} - -void -hello_example::HelloWorld_Impl::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CCMException)) -{ -} - -void -hello_example::HelloWorld_Impl::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CCMException)) -{ -} - - -hello_example::HelloHome_Impl::HelloHome_Impl () -{ -} - -hello_example::HelloHome_Impl::~HelloHome_Impl () -{ -} - -Components::EnterpriseComponent_ptr -hello_example::HelloHome_Impl::create (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((Components::CCMException, - CORBA::SystemException)) -{ - return new hello_example::HelloWorld_Impl (); -} - -extern "C" HELLO_EXEC_Export ::Components::HomeExecutorBase_ptr -createHelloHome_Impl (void) -{ - return new hello_example::HelloHome_Impl (); -} diff --git a/TAO/CIAO/docs/tutorial/Hello/hello_exec.h b/TAO/CIAO/docs/tutorial/Hello/hello_exec.h deleted file mode 100644 index ae837f15caa..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/hello_exec.h +++ /dev/null @@ -1,85 +0,0 @@ -// $Id$ - -// This file contains executor implementations. - -#if !defined (HELLO_EXECUTORS_H) -#define HELLO_EXECUTORS_H - -#include "helloEC.h" -#include "hello_exec_export.h" -#include "tao/LocalObject.h" - -namespace hello_example -{ - -class HelloWorld_Impl : - public virtual HelloWorld_Exec, - public virtual TAO_Local_RefCounted_Object -{ -public: - /// Default ctor. - HelloWorld_Impl (); - - /// Default dtor. - ~HelloWorld_Impl (); - - // Operations from Components::SessionComponent - virtual void set_session_context (Components::SessionContext_ptr ctx - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CCMException)); - - virtual void ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CCMException)); - - virtual void ccm_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CCMException)); - - virtual void ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CCMException)); - - virtual void ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CCMException)); - - virtual void ccm_remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CCMException)); - - virtual char *sayhello (const char *username - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - -protected: - HelloWorld_Exec_Context_var context_; -}; - -class HelloHome_Impl : - public virtual HelloHome_Exec, - public virtual TAO_Local_RefCounted_Object -{ -public: - /// Default ctor. - HelloHome_Impl (); - - /// Default dtor. - ~HelloHome_Impl (); - - virtual ::Components::EnterpriseComponent_ptr - create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((Components::CCMException, - CORBA::SystemException)); -}; - -// We still need to figure out a way to clean up the object created by -// the factory correctly. Like we did in ACE_FACTORY macro, with a -// Gobbler function. -} - -extern "C" HELLO_EXEC_Export ::Components::HomeExecutorBase_ptr -createHelloHome_Impl (void); - -#endif /* HELLO_EXECUTORS_H */ diff --git a/TAO/CIAO/docs/tutorial/Hello/hello_exec_export.h b/TAO/CIAO/docs/tutorial/Hello/hello_exec_export.h deleted file mode 100644 index 9ed6e395b0f..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/hello_exec_export.h +++ /dev/null @@ -1,54 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl HELLO_EXEC -// ------------------------------ -#ifndef HELLO_EXEC_EXPORT_H -#define HELLO_EXEC_EXPORT_H - -#include "ace/config-all.h" - -#if !defined (HELLO_EXEC_HAS_DLL) -# define HELLO_EXEC_HAS_DLL 1 -#endif /* ! HELLO_EXEC_HAS_DLL */ - -#if defined (HELLO_EXEC_HAS_DLL) && (HELLO_EXEC_HAS_DLL == 1) -# if defined (HELLO_EXEC_BUILD_DLL) -# define HELLO_EXEC_Export ACE_Proper_Export_Flag -# define HELLO_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define HELLO_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* HELLO_EXEC_BUILD_DLL */ -# define HELLO_EXEC_Export ACE_Proper_Import_Flag -# define HELLO_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define HELLO_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* HELLO_EXEC_BUILD_DLL */ -#else /* HELLO_EXEC_HAS_DLL == 1 */ -# define HELLO_EXEC_Export -# define HELLO_EXEC_SINGLETON_DECLARATION(T) -# define HELLO_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* HELLO_EXEC_HAS_DLL == 1 */ - -// Set HELLO_EXEC_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (HELLO_EXEC_NTRACE) -# if (ACE_NTRACE == 1) -# define HELLO_EXEC_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define HELLO_EXEC_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !HELLO_EXEC_NTRACE */ - -#if (HELLO_EXEC_NTRACE == 1) -# define HELLO_EXEC_TRACE(X) -#else /* (HELLO_EXEC_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define HELLO_EXEC_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (HELLO_EXEC_NTRACE == 1) */ - -#endif /* HELLO_EXEC_EXPORT_H */ - -// End of auto generated file. diff --git a/TAO/CIAO/docs/tutorial/Hello/hello_stub_export.h b/TAO/CIAO/docs/tutorial/Hello/hello_stub_export.h deleted file mode 100644 index 9a004d9a06b..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/hello_stub_export.h +++ /dev/null @@ -1,54 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl HELLO_STUB -// ------------------------------ -#ifndef HELLO_STUB_EXPORT_H -#define HELLO_STUB_EXPORT_H - -#include "ace/config-all.h" - -#if !defined (HELLO_STUB_HAS_DLL) -# define HELLO_STUB_HAS_DLL 1 -#endif /* ! HELLO_STUB_HAS_DLL */ - -#if defined (HELLO_STUB_HAS_DLL) && (HELLO_STUB_HAS_DLL == 1) -# if defined (HELLO_STUB_BUILD_DLL) -# define HELLO_STUB_Export ACE_Proper_Export_Flag -# define HELLO_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define HELLO_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* HELLO_STUB_BUILD_DLL */ -# define HELLO_STUB_Export ACE_Proper_Import_Flag -# define HELLO_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define HELLO_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* HELLO_STUB_BUILD_DLL */ -#else /* HELLO_STUB_HAS_DLL == 1 */ -# define HELLO_STUB_Export -# define HELLO_STUB_SINGLETON_DECLARATION(T) -# define HELLO_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* HELLO_STUB_HAS_DLL == 1 */ - -// Set HELLO_STUB_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (HELLO_STUB_NTRACE) -# if (ACE_NTRACE == 1) -# define HELLO_STUB_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define HELLO_STUB_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !HELLO_STUB_NTRACE */ - -#if (HELLO_STUB_NTRACE == 1) -# define HELLO_STUB_TRACE(X) -#else /* (HELLO_STUB_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define HELLO_STUB_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (HELLO_STUB_NTRACE == 1) */ - -#endif /* HELLO_STUB_EXPORT_H */ - -// End of auto generated file. diff --git a/TAO/CIAO/docs/tutorial/Hello/hello_svnt_export.h b/TAO/CIAO/docs/tutorial/Hello/hello_svnt_export.h deleted file mode 100644 index 6cd3a02b663..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/hello_svnt_export.h +++ /dev/null @@ -1,54 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl HELLO_SVNT -// ------------------------------ -#ifndef HELLO_SVNT_EXPORT_H -#define HELLO_SVNT_EXPORT_H - -#include "ace/config-all.h" - -#if !defined (HELLO_SVNT_HAS_DLL) -# define HELLO_SVNT_HAS_DLL 1 -#endif /* ! HELLO_SVNT_HAS_DLL */ - -#if defined (HELLO_SVNT_HAS_DLL) && (HELLO_SVNT_HAS_DLL == 1) -# if defined (HELLO_SVNT_BUILD_DLL) -# define HELLO_SVNT_Export ACE_Proper_Export_Flag -# define HELLO_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define HELLO_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* HELLO_SVNT_BUILD_DLL */ -# define HELLO_SVNT_Export ACE_Proper_Import_Flag -# define HELLO_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define HELLO_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* HELLO_SVNT_BUILD_DLL */ -#else /* HELLO_SVNT_HAS_DLL == 1 */ -# define HELLO_SVNT_Export -# define HELLO_SVNT_SINGLETON_DECLARATION(T) -# define HELLO_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* HELLO_SVNT_HAS_DLL == 1 */ - -// Set HELLO_SVNT_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (HELLO_SVNT_NTRACE) -# if (ACE_NTRACE == 1) -# define HELLO_SVNT_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define HELLO_SVNT_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !HELLO_SVNT_NTRACE */ - -#if (HELLO_SVNT_NTRACE == 1) -# define HELLO_SVNT_TRACE(X) -#else /* (HELLO_SVNT_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define HELLO_SVNT_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (HELLO_SVNT_NTRACE == 1) */ - -#endif /* HELLO_SVNT_EXPORT_H */ - -// End of auto generated file. diff --git a/TAO/CIAO/docs/tutorial/Hello/run_simple_test.pl b/TAO/CIAO/docs/tutorial/Hello/run_simple_test.pl deleted file mode 100755 index f09d29f3915..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/run_simple_test.pl +++ /dev/null @@ -1,47 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# $Id$ -# -*- perl -*- - -# This perl script run the Hello World component using the -# Simple Component Server - -use lib "../../../../../bin"; -use PerlACE::Run_Test; - -$iorfile = PerlACE::LocalFile ("ior"); -unlink $iorfile; -$status = 0; - -$SV = new PerlACE::Process ("../../../tools/Simple_Component_Server/Simple_Component_Server", - "-i config -o $iorfile"); - -$CL = new PerlACE::Process ("simple_client", "-i file://$iorfile -x"); - -$SV->Spawn (); - -if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); $SV->TimedWait (1); - exit 1; -} - -$client = $CL->SpawnWaitKill (300); - -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; - $status = 1; -} - -$server = $SV->WaitKill (10); - -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; - $status = 1; -} - -unlink $iorfile; - -exit $status; diff --git a/TAO/CIAO/docs/tutorial/Hello/run_test.pl b/TAO/CIAO/docs/tutorial/Hello/run_test.pl deleted file mode 100755 index aa1c949d64d..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/run_test.pl +++ /dev/null @@ -1,113 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# $Id$ -# -*- perl -*- - -use lib "../../../../../bin"; -use PerlACE::Run_Test; - -$status = 0; -$daemon_ior = PerlACE::LocalFile ("daemon.ior"); -$svr_ior = PerlACE::LocalFile ("server.ior"); -$home_ior = PerlACE::LocalFile ("hello.ior"); - -unlink $daemon_ior; -unlink $svr_ior; -unlink $home_ior; - -$cs_exe = PerlACE::Process::Normalize_Executable_Name ("../../../tools/ComponentServer/ComponentServer"); - -# CIAO Daemon command line arguments -$daemon_args = "-o $daemon_ior -n $cs_exe"; - -# CIAO Daemon Controller location: -$controller = "../../../tools/Daemon/DaemonController"; - -# Daemon controller common command line arguments -$common_args = "-ORBInitRef CIAODaemon=file://$daemon_ior"; - -# Daemon controller start_home command -$start_args = "start_home -s hello.csd -m $home_ior -c $svr_ior"; - -# Daemon controller end_home command -$end_args = "end_home -c file://$svr_ior"; - -# Daemon controller shutdown command -$shutdown_args = "shutdown"; - -# Client program command line arguments -$cl_args = ""; - -# Naming_Service process definition -$DS = new PerlACE::Process ("../../../tools/Daemon/CIAO_Daemon", - "$daemon_args"); - -# Client process definition -$CL = new PerlACE::Process ("client", - "$cl_args"); - -## Starting up the CIAO daemon -$DS->Spawn (); -if (PerlACE::waitforfile_timed ($daemon_ior, 15) == -1) { - print STDERR "ERROR: Could not find daemon ior file <$daemon_ior>\n"; - $DS->Kill (); - exit 1; -} - -## Starting up a ComponentServer running the hello world home. -$DC = new PerlACE::Process ("$controller", - "$common_args $start_args"); - -$DC->SpawnWaitKill (60); -if (PerlACE::waitforfile_timed ($home_ior, 15) == -1) { - print STDERR "ERROR: Could not find home ior file <$home_ior>\n"; - $DS->Kill (); - exit 1; -} - - -$client = $CL->SpawnWaitKill (60); - -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; - $status = 1; -} - - -## Terminating the ComponentServer running the hello world home. -$DC = new PerlACE::Process ("$controller", - "$common_args $end_args"); - -$ctrl = $DC->SpawnWaitKill (60); -if ($ctrl != 0) { - print STDERR "ERROR: Fail to end component server\n"; - $DS->Kill (); - exit 1; -} - -## Terminating the ComponentServer running the hello world home. -$DC = new PerlACE::Process ("$controller", - "$common_args $shutdown_args"); - -$ctrl = $DC->SpawnWaitKill (60); -if ($ctrl != 0) { - print STDERR "ERROR: Fail to shutdown CIAODaemon\n"; - $DS->Kill (); - exit 1; -} - -$ctrl = $DS->WaitKill (60); -if ($ctrl != 0) { - print STDERR "ERROR: CIAODaemon didn't shutdown gracefully $ctrl\n"; - $DS->Kill (); - exit 1; -} - - -unlink $daemon_ior; -unlink $svr_ior; -unlink $home_ior; - -exit $status; diff --git a/TAO/CIAO/docs/tutorial/Hello/simple_client.cpp b/TAO/CIAO/docs/tutorial/Hello/simple_client.cpp deleted file mode 100644 index 89fde740942..00000000000 --- a/TAO/CIAO/docs/tutorial/Hello/simple_client.cpp +++ /dev/null @@ -1,103 +0,0 @@ -// $Id$ - -#include "tools/Simple_Component_Server/Simple_ServerC.h" -#include "ace/Get_Opt.h" -#include "ace/Read_Buffer.h" -#include "helloC.h" -#include "ace/streams.h" - -char *ior = 0; -int shutdown_server = 0; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "i:x"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'x': // Shutdown server when exit? - shutdown_server = 1; - break; - - case 'i': // get component configuration - ior = get_opts.opt_arg (); - break; - - case '?': // display help for use of the server. - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s\n" - "-i <simple server ior>\n" - "-x shutdown server when exit\n" - "\n", - argv [0]), - -1); - } - - return 0; -} - -int -main (int argc, char *argv[]) -{ - ACE_TRY_NEW_ENV - { - // Initialize orb - CORBA::ORB_var orb = CORBA::ORB_init (argc, argv ACE_ENV_ARG_PARAMETER); - - if (parse_args (argc, argv) != 0) - return -1; - - CORBA::Object_var obj - = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - CIAO::Simple_Server_var cserve - = CIAO::Simple_Server::_narrow (obj.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Components::CCMHome_var home = cserve->get_home (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - HelloHome_var hh = HelloHome::_narrow (home.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (CORBA::is_nil (hh.in ())) - ACE_ERROR_RETURN ((LM_ERROR, "Argument is not a HelloHome reference\n"), -1); - - HelloWorld_var hw = hh->create (); - - if (CORBA::is_nil (hw.in ())) - ACE_ERROR_RETURN ((LM_ERROR, "Fail to create a HelloWorld reference\n"), -1); - - CORBA::String_var hi = hw->sayhello ("Simple_Component_Server" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_INFO, "%s\n", hi.in ())); - - hh->remove_component (hw.in () - ACE_ENV_ARG_PARAMETER); - - if (shutdown_server != 0) - cserve->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Who is the culprit \n"); - cerr << "Uncaught CORBA exception" << endl; - return 1; - } - ACE_ENDTRY; - - return 0; -} |