diff options
Diffstat (limited to 'modules/CIAO/tests/IDL_Test/Reused_Facet_Interface')
5 files changed, 290 insertions, 0 deletions
diff --git a/modules/CIAO/tests/IDL_Test/Reused_Facet_Interface/Basic.idl b/modules/CIAO/tests/IDL_Test/Reused_Facet_Interface/Basic.idl new file mode 100644 index 00000000000..4e686a47fab --- /dev/null +++ b/modules/CIAO/tests/IDL_Test/Reused_Facet_Interface/Basic.idl @@ -0,0 +1,54 @@ +// $Id$ +//============================================================================= +/** + * @file Basic.idl + * + * Definition of events, and common interfaces used in the BasicSP module. + * + * @author Balachandran Natarajan <bala@dre.vanderbilt.edu> + * Jeff Parsons <j.parsons@vanderbilt.edu> + */ +//============================================================================= + +#ifndef CIAO_BASIC_IDL +#define CIAO_BASIC_IDL + +#include <Components.idl> + +module Extra +{ + exception NoReason {}; + exception NoRhyme {}; + + 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); + }; +}; + +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/IDL_Test/Reused_Facet_Interface/Basic.mpc b/modules/CIAO/tests/IDL_Test/Reused_Facet_Interface/Basic.mpc new file mode 100644 index 00000000000..73bec73a93a --- /dev/null +++ b/modules/CIAO/tests/IDL_Test/Reused_Facet_Interface/Basic.mpc @@ -0,0 +1,67 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -n Basic" + +project(Reused_Facet_Interface_Basic_idl_gen) : ciaoidldefaults, anytypecode { + 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 \ + -Gxhst -Gxhsk + + IDL_Files { + Basic.idl + } +} + +project(Reused_Facet_Interface_Basic_stub) : ccm_stub { + after += Reused_Facet_Interface_Basic_idl_gen + libs += + + sharedname = Basic_stub + dynamicflags = BASIC_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + BasicC.cpp + } + + Header_Files { + BasicC.h + Basic_stub_export.h + } + + Inline_Files { + BasicC.inl + } +} + + +project(Reused_Facet_Interface_Basic_skel) : ciao_executor { + after += Reused_Facet_Interface_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/IDL_Test/Reused_Facet_Interface/CodeGen.idl b/modules/CIAO/tests/IDL_Test/Reused_Facet_Interface/CodeGen.idl new file mode 100644 index 00000000000..8d9a893acfd --- /dev/null +++ b/modules/CIAO/tests/IDL_Test/Reused_Facet_Interface/CodeGen.idl @@ -0,0 +1,46 @@ +//$Id$ + +#include "Basic.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/IDL_Test/Reused_Facet_Interface/README b/modules/CIAO/tests/IDL_Test/Reused_Facet_Interface/README new file mode 100644 index 00000000000..b25ef8cfd1a --- /dev/null +++ b/modules/CIAO/tests/IDL_Test/Reused_Facet_Interface/README @@ -0,0 +1,12 @@ + +Reused Facet Interface Test +=========================== + +This test uses IDL that contains a variety of port, attribute, +operation, factory and finder definitions, some inherited. The +main focus of the test, however, is the reuse of the same +interface for two different facet ports. The facet servant class, +and facet executor IDL interface must be generated only once. + +Jeff Parsons +June 16, 2009
\ No newline at end of file diff --git a/modules/CIAO/tests/IDL_Test/Reused_Facet_Interface/Reused_Facet_Interface.mpc b/modules/CIAO/tests/IDL_Test/Reused_Facet_Interface/Reused_Facet_Interface.mpc new file mode 100644 index 00000000000..6f5f2f3f24f --- /dev/null +++ b/modules/CIAO/tests/IDL_Test/Reused_Facet_Interface/Reused_Facet_Interface.mpc @@ -0,0 +1,111 @@ +// $Id$ +// + +project(Reused_Facet_Interface_idl_gen) : componentidldefaults { + 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(Reused_Facet_Interface_lem_gen) : ciaoidldefaults { + custom_only = 1 + after += Reused_Facet_Interface_idl_gen + idlflags += -Wb,export_macro=CODEGEN_EXEC_Export \ + -Wb,export_include=CodeGen_exec_export.h \ + -SS + + IDL_Files { + CodeGenE.idl + } +} + +project(Reused_Facet_Interface_stub) : ccm_stub { + after += Reused_Facet_Interface_idl_gen Reused_Facet_Interface_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(Reused_Facet_Interface_exec) : ciao_executor { + after += Reused_Facet_Interface_lem_gen Reused_Facet_Interface_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(Reused_Facet_Interface_svnt) : ciao_servant { + after += Reused_Facet_Interface_Basic_skel Reused_Facet_Interface_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 + } +} + + |