diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2009-11-10 20:33:31 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2009-11-10 20:33:31 +0000 |
commit | f1790ce045fad390af2c69b2c25f714705c90b66 (patch) | |
tree | 45261f5f605e6cf33789427f838cc87599dbc485 /modules/CIAO/tests/CIDL | |
parent | 0e7e7420693d452ba049b31217a915c2c52da1fe (diff) | |
download | ATCD-test_branch_one.tar.gz |
branching/taggingtest_branch_one
Diffstat (limited to 'modules/CIAO/tests/CIDL')
-rw-r--r-- | modules/CIAO/tests/CIDL/CodeGen/Basic.idl | 65 | ||||
-rw-r--r-- | modules/CIAO/tests/CIDL/CodeGen/Basic.mpc | 80 | ||||
-rw-r--r-- | modules/CIAO/tests/CIDL/CodeGen/CodeGen.idl | 46 | ||||
-rw-r--r-- | modules/CIAO/tests/CIDL/CodeGen/CodeGen.mpc | 116 | ||||
-rw-r--r-- | modules/CIAO/tests/CIDL/CodeGen/README | 40 |
5 files changed, 347 insertions, 0 deletions
diff --git a/modules/CIAO/tests/CIDL/CodeGen/Basic.idl b/modules/CIAO/tests/CIDL/CodeGen/Basic.idl new file mode 100644 index 00000000000..9c86c4b7846 --- /dev/null +++ b/modules/CIAO/tests/CIDL/CodeGen/Basic.idl @@ -0,0 +1,65 @@ +// $Id$ +//============================================================================= +/** + * @file Basic.idl + * + * Definition of events, and common interfaces used in the BasicSP module. + * + * @author Balachandran Natarajan <bala@dre.vanderbilt.edu> + */ +//============================================================================= + +#ifndef CIAO_BASIC_IDL +#define CIAO_BASIC_IDL + +#include <Components.idl> + +// @@NOTE: Do we need a pragma prefix. Anyway its broken now in TAO.. + +module Extra +{ + exception NoReason {}; + exception NoRhyme {}; + + struct UserDataQosPolicy { + sequence<octet> value; + }; + + struct key { + long value[3]; + }; + + interface Superfluous + { + attribute string useless_attr; + long superfluous_op (in string empty_arg) + raises (NoReason); + }; + + interface Supernumerary + { + void supernumerary_op (out string dummy_arg) + raises (NoRhyme, NoReason); + }; +}; + +// #pragma prefix "" + +module Basic +{ + interface ReadData : Extra::Superfluous + { + string get_data (); + }; + + interface AnalyzeData + { + void perform_analysis (inout string data); + attribute boolean fine_tooth_comb; + }; + + eventtype TimeOut {}; + eventtype DataAvailable {}; +}; + +#endif /*CIAO_BASIC_IDL*/ diff --git a/modules/CIAO/tests/CIDL/CodeGen/Basic.mpc b/modules/CIAO/tests/CIDL/CodeGen/Basic.mpc new file mode 100644 index 00000000000..35f827366be --- /dev/null +++ b/modules/CIAO/tests/CIDL/CodeGen/Basic.mpc @@ -0,0 +1,80 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -n Basic" + +project(Basic_idl_gen) : componentidldefaults { + custom_only = 1 + idlflags += -Wb,stub_export_macro=BASIC_STUB_Export \ + -Wb,stub_export_include=Basic_stub_export.h \ + -Wb,skel_export_macro=BASIC_SKEL_Export \ + -Wb,skel_export_include=Basic_skel_export.h + + IDL_Files { + Basic.idl + } +} + +project(Basic_lem_gen) : componentidldefaults { + custom_only = 1 + after += Basic_idl_gen + idlflags += -Wb,stub_export_macro=BASIC_STUB_Export \ + -Wb,stub_export_include=Basic_stub_export.h \ + -Wb,skel_export_macro=BASIC_SKEL_Export \ + -Wb,skel_export_include=Basic_skel_export.h + + IDL_Files { + BasicE.idl + } +} + +project(Basic_stub) : ccm_stub { + after += Basic_lem_gen + libs += + + sharedname = Basic_stub + dynamicflags = BASIC_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + BasicC.cpp + BasicEC.cpp + } + + Header_Files { + BasicC.h + Basic_stub_export.h + } + + Inline_Files { + BasicC.inl + } +} + + +project(Basic_skel) : ciao_executor { + after += Basic_stub + sharedname = Basic_skel + libs += Basic_stub + + + dynamicflags = BASIC_SKEL_BUILD_DLL + + IDL_Files { + } + + Source_Files { + BasicS.cpp + } + + Header_Files { + BasicS.h + Basic_skel_export.h + } + + Inline_Files { + BasicS.inl + } +} + + diff --git a/modules/CIAO/tests/CIDL/CodeGen/CodeGen.idl b/modules/CIAO/tests/CIDL/CodeGen/CodeGen.idl new file mode 100644 index 00000000000..224315de2b8 --- /dev/null +++ b/modules/CIAO/tests/CIDL/CodeGen/CodeGen.idl @@ -0,0 +1,46 @@ +//$Id$ +#include "Basic.idl" +#include "BasicE.idl" + +module Basic +{ + component Base supports Extra::Supernumerary, Extra::Superfluous + { + provides ReadData data_read; + attribute boolean is_not_necessary; + }; + + component CodeGen : Base + { + provides ReadData data_out; + uses ReadData data_in; + publishes DataAvailable out_avail; + consumes DataAvailable in_avail; + provides AnalyzeData data_crunch; + + readonly attribute boolean is_necessary; + }; + + home BaseHome supports Extra::Supernumerary manages Base + { + void base_do_nothing (); + + factory create_no_base (in long fake_id) + raises (Extra::NoRhyme); + + finder find_no_base (); + + readonly attribute boolean is_useful; + }; + + home CodeGenHome : BaseHome manages CodeGen + { + factory create_no_derived (); + + finder find_no_derived (); + + attribute boolean is_not_useful; + + string do_nothing (); + }; +}; diff --git a/modules/CIAO/tests/CIDL/CodeGen/CodeGen.mpc b/modules/CIAO/tests/CIDL/CodeGen/CodeGen.mpc new file mode 100644 index 00000000000..70e490dea96 --- /dev/null +++ b/modules/CIAO/tests/CIDL/CodeGen/CodeGen.mpc @@ -0,0 +1,116 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p Basic CodeGen" +// +// NOTE: This MPC file has been hand edited so the executor files +// will be autogenerated part of the build process. Excercise +// caution when regenerating this file (that is, remember to +// insert the logic for autogeneration of executor files). + +project(Basic_CodeGen_idl_gen) : componentidldefaults { + after += Basic_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=CODEGEN_STUB_Export \ + -Wb,stub_export_include=CodeGen_stub_export.h \ + -Wb,skel_export_macro=CODEGEN_SVNT_Export \ + -Wb,skel_export_include=CodeGen_svnt_export.h \ + -Wb,exec_export_macro=CODEGEN_EXEC_Export \ + -Wb,exec_export_include=CodeGen_exec_export.h \ + -Gex + + IDL_Files { + CodeGen.idl + } +} + +project(Basic_CodeGen_lem_gen) : ciaoidldefaults { + custom_only = 1 + after += Basic_CodeGen_idl_gen + idlflags += -Wb,export_macro=CODEGEN_EXEC_Export \ + -Wb,export_include=CodeGen_exec_export.h \ + -SS + IDL_Files { + CodeGenE.idl + } +} + +project(Basic_CodeGen_stub) : ccm_stub { + after += Basic_CodeGen_idl_gen Basic_stub + libs += Basic_stub + + sharedname = CodeGen_stub + dynamicflags = CODEGEN_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + CodeGenC.cpp + } + + Header_Files { + CodeGenC.h + CodeGen_stub_export.h + } + + Inline_Files { + CodeGenC.inl + } +} + +project(Basic_CodeGen_exec) : ciao_executor { + after += Basic_CodeGen_lem_gen Basic_CodeGen_stub + sharedname = CodeGen_exec + libs += CodeGen_stub Basic_stub + + dynamicflags = CODEGEN_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + CodeGenEC.cpp + CodeGen_exec.cpp + } + + Header_Files { + CodeGenEC.h + CodeGen_exec.h + CodeGen_exec_export.h + } + + Inline_Files { + CodeGenEC.inl + } +} + + +project(Basic_CodeGen_svnt) : ciao_servant { + after += Basic_skel Basic_CodeGen_exec + sharedname = CodeGen_svnt + libs += CodeGen_exec \ + CodeGen_stub \ + Basic_skel \ + Basic_stub + + dynamicflags = CODEGEN_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + CodeGenS.cpp + CodeGen_svnt.cpp + } + + Header_Files { + CodeGenS.h + CodeGen_svnt.h + CodeGen_svnt_export.h + } + + Inline_Files { + CodeGenS.inl + } +} + + diff --git a/modules/CIAO/tests/CIDL/CodeGen/README b/modules/CIAO/tests/CIDL/CodeGen/README new file mode 100644 index 00000000000..da6e8f6ee90 --- /dev/null +++ b/modules/CIAO/tests/CIDL/CodeGen/README @@ -0,0 +1,40 @@ + +Code Generation Test +======================== + +While the tests in CIAO_ROOT/tests/IDL3 target IDL3 support +and IDL3-specific code generation in particular, the tests +in CIAO_ROOT/CIDL target CIDL features and code generated +from .cidl files. The test in this directory particularly +stresses the code generation of the CIDL compiler. This +code includes the executor mapping IDL, the servant code, +and the executor implementation code. The latter is not +fully generated of course, it's merely classes (one for +each component executor, home executor, and facet executor) +with the spec-defined operations filled in, but with the +IDL-defined operations and attributes left blank. + +The IDL files in this test include most if not all of the +IDL3 features that might cause a problem in code generation - +catching operations and attributes for supported interfaces, +operations and attributes for supported interface base +classes, operations and attributes for inherited home +classes, factory and finder operations for homes and those +inherited from base homes - you get the idea. More stuff +will be added as we think of it or a problem crops up.The object +of this test is for all builds to complete successfully - +there's no execution involved, since every build is a +library, there's no executable to drive it. + +Please see the README file in CIAO_ROOT for info on how +to set up builds with MPC. The builds in this test depend +directly on CIAO_Container, CIAO_Servant and CIAO_Stub, +and indirectly on everything those three depend on. There's +a list in the above mentioned README file - to build those +libraries, you'll of course need ACE (ACE_ROOT/ace), TAO +(ACE_ROOT/TAO/tao) the IDL compiler (3 builds in +ACE_ROOT/TAO/TAO_IDL) and gperf (ACE_ROOT/apps/gperf/src). + +Enjoy! + +Jeff
\ No newline at end of file |