summaryrefslogtreecommitdiff
path: root/CIAO/examples
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2010-06-18 13:43:38 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2010-06-18 13:43:38 +0000
commite88b0cfed8842bc47f2c800ba7d768b4cad896aa (patch)
tree4c3c9d0db2f738fa86bedcc156f05c863f1d9984 /CIAO/examples
parent138c48610dda35e65387fb61f0df8439715a8409 (diff)
downloadATCD-e88b0cfed8842bc47f2c800ba7d768b4cad896aa.tar.gz
Fri Jun 18 13:43:02 UTC 2010 William R. Otte <wotte@dre.vanderbilt.edu>
* examples/Hello/Sender/Sender.idl: * examples/Hello/Sender/Sender_exec.h: * examples/Hello/Sender/Sender_exec.cpp: * examples/Hello/descriptors/DeploymentPlan.cdp: * examples/Hello/descriptors/DeploymentPlan_without_ns.cdp: * examples/Hello/descriptors/PlanLocality_DifferentProcesses.cdp: * examples/Hello/descriptors/PlanLocality_SameProcess.cdp: Removed un-needed complex types from this example.
Diffstat (limited to 'CIAO/examples')
-rw-r--r--CIAO/examples/Hello/Sender/Sender.idl26
-rw-r--r--CIAO/examples/Hello/Sender/Sender_exec.cpp130
-rw-r--r--CIAO/examples/Hello/Sender/Sender_exec.h55
-rw-r--r--CIAO/examples/Hello/descriptors/DeploymentPlan.cdp133
-rw-r--r--CIAO/examples/Hello/descriptors/DeploymentPlan_without_ns.cdp133
-rwxr-xr-xCIAO/examples/Hello/descriptors/PlanLocality_DifferentProcesses.cdp133
-rwxr-xr-xCIAO/examples/Hello/descriptors/PlanLocality_SameProcess.cdp133
7 files changed, 2 insertions, 741 deletions
diff --git a/CIAO/examples/Hello/Sender/Sender.idl b/CIAO/examples/Hello/Sender/Sender.idl
index 0431438fab7..7531e19eddd 100644
--- a/CIAO/examples/Hello/Sender/Sender.idl
+++ b/CIAO/examples/Hello/Sender/Sender.idl
@@ -18,38 +18,12 @@ module Hello
void start ();
};
- enum COLOR_SELECTION
- {
- empty,
- white,
- red,
- yellow
- };
-
- typedef sequence<COLOR_SELECTION> COLORS;
-
- struct COLOR_STRUCT
- {
- string color_name;
- unsigned long color_id;
- COLOR_SELECTION color;
- };
-
component Sender supports trigger
{
provides ReadMessage push_message;
publishes TimeOut click_out;
attribute string local_message;
-
- // A test attribute to test setting attributes through XML
- attribute COLOR_SELECTION color;
-
- // Testing attributes of sequence type.
- attribute COLORS the_colors;
- attribute CORBA::StringSeq str_seq;
-
- attribute COLOR_STRUCT color_st;
};
home SenderHome manages Sender
diff --git a/CIAO/examples/Hello/Sender/Sender_exec.cpp b/CIAO/examples/Hello/Sender/Sender_exec.cpp
index fa9e5282c33..146e71c73f9 100644
--- a/CIAO/examples/Hello/Sender/Sender_exec.cpp
+++ b/CIAO/examples/Hello/Sender/Sender_exec.cpp
@@ -61,14 +61,12 @@ namespace CIAO_Hello_Sender_Impl
//============================================================
Sender_exec_i::Sender_exec_i (void)
- : message_(CORBA::string_dup ("Default Message")),
- color_ (::Hello::empty)
+ : message_(CORBA::string_dup ("Default Message"))
{
}
Sender_exec_i::Sender_exec_i (const char* local_message)
- : message_(CORBA::string_dup (local_message)),
- color_ (::Hello::empty)
+ : message_(CORBA::string_dup (local_message))
{
}
@@ -86,67 +84,6 @@ namespace CIAO_Hello_Sender_Impl
event->data ("ACE/TAO/CIAO");
ACE_DEBUG ((LM_EMERGENCY, "Sender initiates the process.\n"));
this->context_->push_click_out (event.in ());
-
- ACE_DEBUG ((LM_EMERGENCY, "My current color is:"));
-
- switch (this->color_)
- {
- case ::Hello::empty:
- ACE_DEBUG ((LM_EMERGENCY, "ERROR: Enum attribute initialization failed.\n"));
- break;
-
- case ::Hello::white:
- ACE_DEBUG ((LM_EMERGENCY, "white\n"));
- break;
-
- case ::Hello::red:
- ACE_DEBUG ((LM_EMERGENCY, "red\n"));
- break;
-
- case ::Hello::yellow:
- ACE_DEBUG ((LM_EMERGENCY, "yellow\n"));
- break;
-
- default:
- ACE_DEBUG ((LM_EMERGENCY, "Unknown color!\n"));
-
- }
-
- // check color sequence
- ACE_DEBUG ((LM_DEBUG, "Checking color sequence\n"));
- if (this->colors_.length () == 3)
- {
- if ((this->colors_[0] != ::Hello::white) &&
- (this->colors_[1] != ::Hello::red) &&
- (this->colors_[2] != ::Hello::yellow))
- {
- ACE_ERROR ((LM_EMERGENCY, "error: Unexpected color in color sequence\n"));
- }
- }
- else
- ACE_ERROR ((LM_EMERGENCY, "error: color sequence is wrong length!\n"));
-
- ACE_DEBUG ((LM_DEBUG, "Checking string sequence\n"));
- if (this->strings_.length () == 3)
- {
- if ((ACE_OS::strcmp ("Hello", this->strings_[0]) != 0) &&
- (ACE_OS::strcmp ("World", this->strings_[1]) != 0) &&
- (ACE_OS::strcmp ("!", this->strings_[2]) != 0))
- {
- ACE_ERROR ((LM_EMERGENCY, "error: string in sequence\n"));
- }
- }
- else
- ACE_ERROR ((LM_EMERGENCY, "error: string sequence is wrong length!\n"));
-
- ACE_DEBUG ((LM_DEBUG, "Checking color struct\n"));
- if ((ACE_OS::strcmp ("Yellow!", this->color_struct_.color_name) != 0) &&
- this->color_struct_.color_id != 42 &&
- this->color_struct_.color != Hello::yellow)
- {
- ACE_ERROR ((LM_EMERGENCY, "error: members of the color struct are wrong\n"));
- }
-
}
// Component attributes and port operations.
@@ -175,69 +112,6 @@ namespace CIAO_Hello_Sender_Impl
message_ = CORBA::string_dup (local_message);
}
- ::Hello::COLOR_SELECTION
- Sender_exec_i::color (void)
- {
- /* Your code here. */
- return this->color_;
- }
-
- void
- Sender_exec_i::color (
- ::Hello::COLOR_SELECTION color)
- {
- /* Your code here. */
- this->color_ = color;
- }
-
- ::Hello::COLORS *
- Sender_exec_i::the_colors (void)
- {
- /* Your code here. */
- return 0;
- }
-
- void
- Sender_exec_i::the_colors (
- const ::Hello::COLORS & the_colors)
- {
- this->colors_.length (the_colors.length ());
- for (CORBA::ULong i = 0; i < the_colors.length (); ++i)
- {
- this->colors_[i] = the_colors[i];
- }
- }
-
- ::CORBA::StringSeq *
- Sender_exec_i::str_seq (void)
- {
- return 0;
- }
-
- void
- Sender_exec_i::str_seq (
- const ::CORBA::StringSeq & strings)
- {
- this->strings_.length (strings.length ());
- for (CORBA::ULong i = 0; i < strings.length (); ++i)
- {
- this->strings_[i] = strings[i];
- }
- }
-
- ::Hello::COLOR_STRUCT *
- Sender_exec_i::color_st (void)
- {
- return 0;
- }
-
- void
- Sender_exec_i::color_st (
- const ::Hello::COLOR_STRUCT &col_struct)
- {
- this->color_struct_ = col_struct;
- }
-
// Operations from Components::SessionComponent.
void
diff --git a/CIAO/examples/Hello/Sender/Sender_exec.h b/CIAO/examples/Hello/Sender/Sender_exec.h
index e4426b881ed..ddef58132d4 100644
--- a/CIAO/examples/Hello/Sender/Sender_exec.h
+++ b/CIAO/examples/Hello/Sender/Sender_exec.h
@@ -111,57 +111,6 @@ namespace CIAO_Hello_Sender_Impl
local_message (
const char * local_message);
- // TAO_IDL - Generated from
- // c:\middleware\ace_wrappers\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:42
-
- virtual ::Hello::COLOR_SELECTION
- color (void);
-
- // TAO_IDL - Generated from
- // c:\middleware\ace_wrappers\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:42
-
- virtual void
- color (
- ::Hello::COLOR_SELECTION color);
- //@}
-
- // TAO_IDL - Generated from
- // w:\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:36
-
- virtual ::Hello::COLORS *
- the_colors (void);
-
- // TAO_IDL - Generated from
- // w:\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:36
-
- virtual void
- color_st (
- const ::Hello::COLOR_STRUCT & the_colors);
-
- virtual ::Hello::COLOR_STRUCT *
- color_st (void);
-
- // TAO_IDL - Generated from
- // w:\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:36
-
- virtual void
- the_colors (
- const ::Hello::COLORS & the_colors);
-
- // TAO_IDL - Generated from
- // w:\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:36
-
- virtual ::CORBA::StringSeq *
- str_seq (void);
-
- // TAO_IDL - Generated from
- // w:\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:36
-
- virtual void
- str_seq (
- const ::CORBA::StringSeq & str_seq);
- //@}
-
//@{
/** Operations from Components::SessionComponent. */
@@ -181,10 +130,6 @@ namespace CIAO_Hello_Sender_Impl
::Hello::CCM_Sender_Context_var context_;
CORBA::String_var message_;
CORBA::Boolean log_time_;
- ::Hello::COLOR_SELECTION color_;
- ::Hello::COLORS colors_;
- ::Hello::COLOR_STRUCT color_struct_;
- ::CORBA::StringSeq strings_;
friend class ReadMessage_exec_i;
};
diff --git a/CIAO/examples/Hello/descriptors/DeploymentPlan.cdp b/CIAO/examples/Hello/descriptors/DeploymentPlan.cdp
index 730632fca76..e3c96e7ca08 100644
--- a/CIAO/examples/Hello/descriptors/DeploymentPlan.cdp
+++ b/CIAO/examples/Hello/descriptors/DeploymentPlan.cdp
@@ -290,139 +290,6 @@
</value>
</configProperty>
<configProperty>
- <name>color</name>
- <value>
- <type>
- <kind>tk_enum</kind>
- <enum>
- <name>COLOR_SELECTION</name>
- <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId>
- <member>empty</member>
- <member>white</member>
- <member>red</member>
- <member>yellow</member>
- </enum>
- </type>
- <value>
- <enum>yellow</enum>
- </value>
- </value>
- </configProperty>
- <configProperty>
- <name>the_colors</name>
- <value>
- <type>
- <kind>tk_sequence</kind>
- <sequence>
- <elementType>
- <kind>tk_enum</kind>
- <enum>
- <name>COLOR_SELECTION</name>
- <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId>
- <member>empty</member>
- <member>white</member>
- <member>red</member>
- <member>yellow</member>
- </enum>
- </elementType>
- </sequence>
- </type>
- <value>
- <element>
- <enum>white</enum>
- </element>
- <element>
- <enum>red</enum>
- </element>
- <element>
- <enum>yellow</enum>
- </element>
- </value>
- </value>
- </configProperty>
- <configProperty>
- <name>str_seq</name>
- <value>
- <type>
- <kind>tk_sequence</kind>
- <sequence>
- <elementType>
- <kind>tk_string</kind>
- </elementType>
- </sequence>
- </type>
- <value>
- <element>
- <string>Hello</string>
- </element>
- <element>
- <string>World</string>
- </element>
- <element>
- <string>!</string>
- </element>
- </value>
- </value>
- </configProperty>
- <configProperty>
- <name>color_st</name>
- <value>
- <type>
- <kind>tk_struct</kind>
- <struct>
- <name>COLOR_STRUCT</name>
- <typeId>IDL:Hello/COLOR_STRUCT:1.0</typeId>
- <member>
- <name>color_name</name>
- <type>
- <kind>tk_string</kind>
- </type>
- </member>
- <member>
- <name>color_id</name>
- <type>
- <kind>tk_ulong</kind>
- </type>
- </member>
- <member>
- <name>color</name>
- <type>
- <kind>tk_enum</kind>
- <enum>
- <name>COLOR_SELECTION</name>
- <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId>
- <member>empty</member>
- <member>white</member>
- <member>red</member>
- <member>yellow</member>
- </enum>
- </type>
- </member>
- </struct>
- </type>
- <value>
- <member>
- <name>color_name</name>
- <value>
- <string>Yellow!</string>
- </value>
- </member>
- <member>
- <name>color_id</name>
- <value>
- <ulong>42</ulong>
- </value>
- </member>
- <member>
- <name>color</name>
- <value>
- <enum>yellow</enum>
- </value>
- </member>
- </value>
- </value>
- </configProperty>
- <configProperty>
<name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name>
<value>
<type>
diff --git a/CIAO/examples/Hello/descriptors/DeploymentPlan_without_ns.cdp b/CIAO/examples/Hello/descriptors/DeploymentPlan_without_ns.cdp
index 067f8e4f639..a733e352bd1 100644
--- a/CIAO/examples/Hello/descriptors/DeploymentPlan_without_ns.cdp
+++ b/CIAO/examples/Hello/descriptors/DeploymentPlan_without_ns.cdp
@@ -246,139 +246,6 @@
</value>
</configProperty>
<configProperty>
- <name>color</name>
- <value>
- <type>
- <kind>tk_enum</kind>
- <enum>
- <name>COLOR_SELECTION</name>
- <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId>
- <member>empty</member>
- <member>white</member>
- <member>red</member>
- <member>yellow</member>
- </enum>
- </type>
- <value>
- <enum>yellow</enum>
- </value>
- </value>
- </configProperty>
- <configProperty>
- <name>the_colors</name>
- <value>
- <type>
- <kind>tk_sequence</kind>
- <sequence>
- <elementType>
- <kind>tk_enum</kind>
- <enum>
- <name>COLOR_SELECTION</name>
- <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId>
- <member>empty</member>
- <member>white</member>
- <member>red</member>
- <member>yellow</member>
- </enum>
- </elementType>
- </sequence>
- </type>
- <value>
- <element>
- <enum>white</enum>
- </element>
- <element>
- <enum>red</enum>
- </element>
- <element>
- <enum>yellow</enum>
- </element>
- </value>
- </value>
- </configProperty>
- <configProperty>
- <name>str_seq</name>
- <value>
- <type>
- <kind>tk_sequence</kind>
- <sequence>
- <elementType>
- <kind>tk_string</kind>
- </elementType>
- </sequence>
- </type>
- <value>
- <element>
- <string>Hello</string>
- </element>
- <element>
- <string>World</string>
- </element>
- <element>
- <string>!</string>
- </element>
- </value>
- </value>
- </configProperty>
- <configProperty>
- <name>color_st</name>
- <value>
- <type>
- <kind>tk_struct</kind>
- <struct>
- <name>COLOR_STRUCT</name>
- <typeId>IDL:Hello/COLOR_STRUCT:1.0</typeId>
- <member>
- <name>color_name</name>
- <type>
- <kind>tk_string</kind>
- </type>
- </member>
- <member>
- <name>color_id</name>
- <type>
- <kind>tk_ulong</kind>
- </type>
- </member>
- <member>
- <name>color</name>
- <type>
- <kind>tk_enum</kind>
- <enum>
- <name>COLOR_SELECTION</name>
- <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId>
- <member>empty</member>
- <member>white</member>
- <member>red</member>
- <member>yellow</member>
- </enum>
- </type>
- </member>
- </struct>
- </type>
- <value>
- <member>
- <name>color_name</name>
- <value>
- <string>Yellow!</string>
- </value>
- </member>
- <member>
- <name>color_id</name>
- <value>
- <ulong>42</ulong>
- </value>
- </member>
- <member>
- <name>color</name>
- <value>
- <enum>yellow</enum>
- </value>
- </member>
- </value>
- </value>
- </configProperty>
- <configProperty>
<name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name>
<value>
<type>
diff --git a/CIAO/examples/Hello/descriptors/PlanLocality_DifferentProcesses.cdp b/CIAO/examples/Hello/descriptors/PlanLocality_DifferentProcesses.cdp
index a2d0eb92503..8ca3f16abea 100755
--- a/CIAO/examples/Hello/descriptors/PlanLocality_DifferentProcesses.cdp
+++ b/CIAO/examples/Hello/descriptors/PlanLocality_DifferentProcesses.cdp
@@ -150,139 +150,6 @@
</value>
</value>
</configProperty>
- <configProperty>
- <name>color</name>
- <value>
- <type>
- <kind>tk_enum</kind>
- <enum>
- <name>COLOR_SELECTION</name>
- <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId>
- <member>empty</member>
- <member>white</member>
- <member>red</member>
- <member>yellow</member>
- </enum>
- </type>
- <value>
- <enum>yellow</enum>
- </value>
- </value>
- </configProperty>
- <configProperty>
- <name>the_colors</name>
- <value>
- <type>
- <kind>tk_sequence</kind>
- <sequence>
- <elementType>
- <kind>tk_enum</kind>
- <enum>
- <name>COLOR_SELECTION</name>
- <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId>
- <member>empty</member>
- <member>white</member>
- <member>red</member>
- <member>yellow</member>
- </enum>
- </elementType>
- </sequence>
- </type>
- <value>
- <element>
- <enum>white</enum>
- </element>
- <element>
- <enum>red</enum>
- </element>
- <element>
- <enum>yellow</enum>
- </element>
- </value>
- </value>
- </configProperty>
- <configProperty>
- <name>str_seq</name>
- <value>
- <type>
- <kind>tk_sequence</kind>
- <sequence>
- <elementType>
- <kind>tk_string</kind>
- </elementType>
- </sequence>
- </type>
- <value>
- <element>
- <string>Hello</string>
- </element>
- <element>
- <string>World</string>
- </element>
- <element>
- <string>!</string>
- </element>
- </value>
- </value>
- </configProperty>
- <configProperty>
- <name>color_st</name>
- <value>
- <type>
- <kind>tk_struct</kind>
- <struct>
- <name>COLOR_STRUCT</name>
- <typeId>IDL:Hello/COLOR_STRUCT:1.0</typeId>
- <member>
- <name>color_name</name>
- <type>
- <kind>tk_string</kind>
- </type>
- </member>
- <member>
- <name>color_id</name>
- <type>
- <kind>tk_ulong</kind>
- </type>
- </member>
- <member>
- <name>color</name>
- <type>
- <kind>tk_enum</kind>
- <enum>
- <name>COLOR_SELECTION</name>
- <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId>
- <member>empty</member>
- <member>white</member>
- <member>red</member>
- <member>yellow</member>
- </enum>
- </type>
- </member>
- </struct>
- </type>
- <value>
- <member>
- <name>color_name</name>
- <value>
- <string>Yellow!</string>
- </value>
- </member>
- <member>
- <name>color_id</name>
- <value>
- <ulong>42</ulong>
- </value>
- </member>
- <member>
- <name>color</name>
- <value>
- <enum>yellow</enum>
- </value>
- </member>
- </value>
- </value>
- </configProperty>
</instance>
<connection>
diff --git a/CIAO/examples/Hello/descriptors/PlanLocality_SameProcess.cdp b/CIAO/examples/Hello/descriptors/PlanLocality_SameProcess.cdp
index 2492f9f3213..1cf5b2a0380 100755
--- a/CIAO/examples/Hello/descriptors/PlanLocality_SameProcess.cdp
+++ b/CIAO/examples/Hello/descriptors/PlanLocality_SameProcess.cdp
@@ -150,139 +150,6 @@
</value>
</value>
</configProperty>
- <configProperty>
- <name>color</name>
- <value>
- <type>
- <kind>tk_enum</kind>
- <enum>
- <name>COLOR_SELECTION</name>
- <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId>
- <member>empty</member>
- <member>white</member>
- <member>red</member>
- <member>yellow</member>
- </enum>
- </type>
- <value>
- <enum>yellow</enum>
- </value>
- </value>
- </configProperty>
- <configProperty>
- <name>the_colors</name>
- <value>
- <type>
- <kind>tk_sequence</kind>
- <sequence>
- <elementType>
- <kind>tk_enum</kind>
- <enum>
- <name>COLOR_SELECTION</name>
- <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId>
- <member>empty</member>
- <member>white</member>
- <member>red</member>
- <member>yellow</member>
- </enum>
- </elementType>
- </sequence>
- </type>
- <value>
- <element>
- <enum>white</enum>
- </element>
- <element>
- <enum>red</enum>
- </element>
- <element>
- <enum>yellow</enum>
- </element>
- </value>
- </value>
- </configProperty>
- <configProperty>
- <name>str_seq</name>
- <value>
- <type>
- <kind>tk_sequence</kind>
- <sequence>
- <elementType>
- <kind>tk_string</kind>
- </elementType>
- </sequence>
- </type>
- <value>
- <element>
- <string>Hello</string>
- </element>
- <element>
- <string>World</string>
- </element>
- <element>
- <string>!</string>
- </element>
- </value>
- </value>
- </configProperty>
- <configProperty>
- <name>color_st</name>
- <value>
- <type>
- <kind>tk_struct</kind>
- <struct>
- <name>COLOR_STRUCT</name>
- <typeId>IDL:Hello/COLOR_STRUCT:1.0</typeId>
- <member>
- <name>color_name</name>
- <type>
- <kind>tk_string</kind>
- </type>
- </member>
- <member>
- <name>color_id</name>
- <type>
- <kind>tk_ulong</kind>
- </type>
- </member>
- <member>
- <name>color</name>
- <type>
- <kind>tk_enum</kind>
- <enum>
- <name>COLOR_SELECTION</name>
- <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId>
- <member>empty</member>
- <member>white</member>
- <member>red</member>
- <member>yellow</member>
- </enum>
- </type>
- </member>
- </struct>
- </type>
- <value>
- <member>
- <name>color_name</name>
- <value>
- <string>Yellow!</string>
- </value>
- </member>
- <member>
- <name>color_id</name>
- <value>
- <ulong>42</ulong>
- </value>
- </member>
- <member>
- <name>color</name>
- <value>
- <enum>yellow</enum>
- </value>
- </member>
- </value>
- </value>
- </configProperty>
</instance>
<connection>