You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(86) |
Dec
(163) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(114) |
Feb
(254) |
Mar
(166) |
Apr
(122) |
May
(131) |
Jun
(59) |
Jul
(201) |
Aug
(85) |
Sep
(80) |
Oct
(64) |
Nov
(103) |
Dec
(36) |
2005 |
Jan
(231) |
Feb
(204) |
Mar
(71) |
Apr
(54) |
May
(50) |
Jun
(120) |
Jul
(17) |
Aug
(124) |
Sep
(75) |
Oct
(154) |
Nov
(37) |
Dec
(143) |
2006 |
Jan
(346) |
Feb
(170) |
Mar
|
Apr
|
May
(273) |
Jun
(113) |
Jul
(427) |
Aug
(570) |
Sep
(212) |
Oct
(550) |
Nov
(348) |
Dec
(314) |
2007 |
Jan
(709) |
Feb
(223) |
Mar
(104) |
Apr
(24) |
May
(11) |
Jun
(3) |
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Robert L. <rle...@us...> - 2007-03-23 11:04:23
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/supports_exception/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17271/test/CppGenerator/supports_exception/impl Modified Files: _check_Test.cc Log Message: C++: the local home adapter has no longer a dependency to the home's implementation Index: _check_Test.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/supports_exception/impl/_check_Test.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** _check_Test.cc 5 Jan 2007 14:17:27 -0000 1.3 --- _check_Test.cc 23 Mar 2007 11:03:44 -0000 1.4 *************** *** 1,4 **** /*** ! * CCM Tools Test Client * * This file was automatically generated by the CCM Tools. --- 1,4 ---- /*** ! * CCM Tools Test Client * * This file was automatically generated by the CCM Tools. *************** *** 6,11 **** * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. --- 6,11 ---- * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. *************** *** 17,20 **** --- 17,21 ---- #include <Components/ccmtools.h> + #include <TestHome_entry.h> #include <TestHome_gen.h> *************** *** 28,33 **** Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); ! error = deploy_TestHome("TestHome"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; --- 29,34 ---- Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); ! error = deploy_TestHome("TestHome"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; *************** *** 35,40 **** } ! try ! { Test::SmartPtr myTest; TestHome::SmartPtr myTestHome(dynamic_cast<TestHome*>( --- 36,41 ---- } ! try ! { Test::SmartPtr myTest; TestHome::SmartPtr myTestHome(dynamic_cast<TestHome*>( *************** *** 47,51 **** long len = myTest->print(s); assert(len == s.length()); ! try { --- 48,52 ---- long len = myTest->print(s); assert(len == s.length()); ! try { *************** *** 54,68 **** assert(0); } ! catch(Error& e) { cout << "OK: error exception catched! "; ! cout << "(" ! << e.info[0].code << ", " ! << e.info[0].message << ")" << "[ " << e.what() << "]" << endl; } ! ! try { string s = "SuperError"; --- 55,69 ---- assert(0); } ! catch(Error& e) { cout << "OK: error exception catched! "; ! cout << "(" ! << e.info[0].code << ", " ! << e.info[0].message << ")" << "[ " << e.what() << "]" << endl; } ! ! try { string s = "SuperError"; *************** *** 70,74 **** assert(0); } ! catch(SuperError& e) { cout << "OK: super_error exception catched! " --- 71,75 ---- assert(0); } ! catch(SuperError& e) { cout << "OK: super_error exception catched! " *************** *** 76,81 **** << endl; } ! ! try { string s = "FatalError"; --- 77,82 ---- << endl; } ! ! try { string s = "FatalError"; *************** *** 83,89 **** assert(0); } ! catch(FatalError& e) { ! cout << "OK: fatal_error exception catched! " << "[ " << e.what() << "]" << endl; --- 84,90 ---- assert(0); } ! catch(FatalError& e) { ! cout << "OK: fatal_error exception catched! " << "[ " << e.what() << "]" << endl; *************** *** 91,118 **** myTest->remove(); ! } ! catch ( Components::HomeNotFound ) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } ! catch ( Components::NotImplemented& e ) { ! cout << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; return -1; ! } ! catch ( Components::InvalidName& e ) { ! cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what ( ) << endl; return -1; } ! catch ( ... ) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; error = -1; } ! if (error < 0) { return error; --- 92,119 ---- myTest->remove(); ! } ! catch ( Components::HomeNotFound ) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } ! catch ( Components::NotImplemented& e ) { ! cout << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; return -1; ! } ! catch ( Components::InvalidName& e ) { ! cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what ( ) << endl; return -1; } ! catch ( ... ) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; error = -1; } ! if (error < 0) { return error; *************** *** 120,129 **** error = undeploy_TestHome("TestHome"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; return error; } ! cout << ">>>> Stop Test Client: " << __FILE__ << endl; } --- 121,130 ---- error = undeploy_TestHome("TestHome"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; return error; } ! cout << ">>>> Stop Test Client: " << __FILE__ << endl; } |
From: Robert L. <rle...@us...> - 2007-03-23 11:04:23
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/any/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17271/test/CppGenerator/any/impl Modified Files: _check_Test.cc Log Message: C++: the local home adapter has no longer a dependency to the home's implementation Index: _check_Test.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/any/impl/_check_Test.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** _check_Test.cc 5 Jan 2007 14:17:28 -0000 1.3 --- _check_Test.cc 23 Mar 2007 11:03:43 -0000 1.4 *************** *** 1,11 **** /*** ! * CCM Tools Test Client * ! * This file was automatically generated by CCM Tools * <http://ccmtools.sourceforge.net/> * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. --- 1,11 ---- /*** ! * CCM Tools Test Client * ! * This file was automatically generated by CCM Tools * <http://ccmtools.sourceforge.net/> * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. *************** *** 20,23 **** --- 20,24 ---- #include <Components/ccmtools.h> + #include <TestHome_entry.h> #include <TestHome_gen.h> *************** *** 30,35 **** int error = 0; ! error = deploy_TestHome("TestHome"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; --- 31,36 ---- int error = 0; ! error = deploy_TestHome("TestHome"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; *************** *** 37,46 **** } ! try { Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); Test::SmartPtr myTest; AnyTest::SmartPtr test; ! TestHome::SmartPtr myTestHome(dynamic_cast<TestHome*>( homeFinder->find_home_by_name("TestHome").ptr())); --- 38,47 ---- } ! try { Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); Test::SmartPtr myTest; AnyTest::SmartPtr test; ! TestHome::SmartPtr myTestHome(dynamic_cast<TestHome*>( homeFinder->find_home_by_name("TestHome").ptr())); *************** *** 49,59 **** test = myTest->provide_test(); myTest->configuration_complete(); ! ! { // any op1(in any p1, inout any p2, out any p3); SmartPtr<Value> p1(new ShortValue(11)); SmartPtr<Value> p2(new ShortValue(22)); SmartPtr<Value> p3; SmartPtr<Value> result = test->op1(p1, p2, p3); ! ShortValue* p2Value = dynamic_cast<ShortValue*>(p2.ptr()); assert(p2Value->value() == 11); --- 50,60 ---- test = myTest->provide_test(); myTest->configuration_complete(); ! ! { // any op1(in any p1, inout any p2, out any p3); SmartPtr<Value> p1(new ShortValue(11)); SmartPtr<Value> p2(new ShortValue(22)); SmartPtr<Value> p3; SmartPtr<Value> result = test->op1(p1, p2, p3); ! ShortValue* p2Value = dynamic_cast<ShortValue*>(p2.ptr()); assert(p2Value->value() == 11); *************** *** 67,76 **** { // anyList op2(in anyList p1, inout anyList p2, out anyList p3); ! AnyList p1; AnyList p2; AnyList p3; AnyList result; ! for(int i = 0; i < 5; i++) { SmartPtr<Value> p1Value(new ShortValue(i)); --- 68,77 ---- { // anyList op2(in anyList p1, inout anyList p2, out anyList p3); ! AnyList p1; AnyList p2; AnyList p3; AnyList result; ! for(int i = 0; i < 5; i++) { SmartPtr<Value> p1Value(new ShortValue(i)); *************** *** 80,84 **** } result = result = test->op2(p1, p2, p3); ! for(int i = 0; i < 5; i++) { ShortValue* p2Value = dynamic_cast<ShortValue*>(p2.at(i).ptr()); --- 81,85 ---- } result = result = test->op2(p1, p2, p3); ! for(int i = 0; i < 5; i++) { ShortValue* p2Value = dynamic_cast<ShortValue*>(p2.at(i).ptr()); *************** *** 92,96 **** } } ! { // pair op3(in pair p1, inout pair p2, out pair p3); Pair p1; --- 93,97 ---- } } ! { // pair op3(in pair p1, inout pair p2, out pair p3); Pair p1; *************** *** 108,112 **** result = test->op3(p1, p2, p3); ! assert(p2.name == "key1"); LongValue* p2Value = dynamic_cast<LongValue*>(p2.value.ptr()); --- 109,113 ---- result = test->op3(p1, p2, p3); ! assert(p2.name == "key1"); LongValue* p2Value = dynamic_cast<LongValue*>(p2.value.ptr()); *************** *** 116,120 **** LongValue* p3Value = dynamic_cast<LongValue*>(p3.value.ptr()); assert(p3Value->value() == 2); ! assert(result.name == "key1"); LongValue* resultValue = dynamic_cast<LongValue*>(result.value.ptr()); --- 117,121 ---- LongValue* p3Value = dynamic_cast<LongValue*>(p3.value.ptr()); assert(p3Value->value() == 2); ! assert(result.name == "key1"); LongValue* resultValue = dynamic_cast<LongValue*>(result.value.ptr()); *************** *** 123,145 **** myTest->remove(); ! } ! catch(Components::HomeNotFound& e) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } ! catch(Components::NotImplemented& e) { ! cout << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; return -1; ! } ! catch(Components::InvalidName& e) { ! cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what() << endl; return -1; } ! catch(...) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; --- 124,146 ---- myTest->remove(); ! } ! catch(Components::HomeNotFound& e) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } ! catch(Components::NotImplemented& e) { ! cout << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; return -1; ! } ! catch(Components::InvalidName& e) { ! cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what() << endl; return -1; } ! catch(...) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; *************** *** 148,160 **** error += undeploy_TestHome("TestHome"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; return error; } ! // Clean up HomeFinder singleton Components::HomeFinder::destroy(); ! cout << ">>>> Stop Test Client: " << __FILE__ << endl; } --- 149,161 ---- error += undeploy_TestHome("TestHome"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; return error; } ! // Clean up HomeFinder singleton Components::HomeFinder::destroy(); ! cout << ">>>> Stop Test Client: " << __FILE__ << endl; } |
From: Robert L. <rle...@us...> - 2007-03-23 11:04:23
|
Update of /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17271/src/templates/CppLocalTemplates Modified Files: MHomeDef Log Message: C++: the local home adapter has no longer a dependency to the home's implementation Index: MHomeDef =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MHomeDef,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** MHomeDef 19 Mar 2007 08:11:34 -0000 1.25 --- MHomeDef 23 Mar 2007 11:03:43 -0000 1.26 *************** *** 71,76 **** typedef wamas::platform::utils::SmartPtr<%(Identifier)s> SmartPtr; ! %(Identifier)s(); ! %(Identifier)s(::Components::AssemblyFactory::SmartPtr assembly_factory); virtual ~%(Identifier)s(); --- 71,77 ---- typedef wamas::platform::utils::SmartPtr<%(Identifier)s> SmartPtr; ! %(Identifier)s(%(LocalNamespace)sCCM_%(Identifier)s* lh); ! %(Identifier)s(%(LocalNamespace)sCCM_%(Identifier)s* lh, ! ::Components::AssemblyFactory::SmartPtr assembly_factory); virtual ~%(Identifier)s(); *************** *** 103,122 **** %(CloseNamespace)s - //============================================================================== - // entry point - //============================================================================== - - ::Components::CCMHome::SmartPtr - create_%(AbsoluteLocalHomeName)sAdapter(); - - int - deploy_%(AbsoluteLocalHomeName)s(char* name); - - int - deploy_with_assembly_%(AbsoluteLocalHomeName)s(char* name, - ::Components::AssemblyFactory::SmartPtr assembly_factory); - - int undeploy_%(AbsoluteLocalHomeName)s(char* name); - #endif --- 104,107 ---- *************** *** 137,141 **** #include "%(Identifier)s_gen.h" - #include <%(AbsoluteLocalHomeName)s_entry.h> %(OpenNamespace)s --- 122,125 ---- *************** *** 147,162 **** //============================================================================== ! %(Identifier)s::%(Identifier)s() { - local_home = dynamic_cast< %(LocalNamespace)sCCM_%(Identifier)s*>( - create_%(AbsoluteLocalHomeName)s()); - assembly_factory = ::Components::AssemblyFactory::SmartPtr(); } ! %(Identifier)s::%(Identifier)s(::Components::AssemblyFactory::SmartPtr f) ! : assembly_factory(f) { - local_home = dynamic_cast< %(LocalNamespace)sCCM_%(Identifier)s*>( - create_%(AbsoluteLocalHomeName)s()); } --- 131,144 ---- //============================================================================== ! %(Identifier)s::%(Identifier)s(%(LocalNamespace)sCCM_%(Identifier)s* lh) ! : local_home(lh) { } ! %(Identifier)s::%(Identifier)s(%(LocalNamespace)sCCM_%(Identifier)s* lh, ! ::Components::AssemblyFactory::SmartPtr f) ! : local_home(lh) ! , assembly_factory(f) { } *************** *** 229,283 **** - //============================================================================== - // entry point - //============================================================================== - - ::Components::CCMHome::SmartPtr - create_%(AbsoluteLocalHomeName)sAdapter() - { - ::Components::CCMHome::SmartPtr - ret(new %(LocalNamespace)s%(Identifier)s()); - return ret; - } - - int - deploy_%(AbsoluteLocalHomeName)s(char* name) - { - return deploy_with_assembly_%(AbsoluteLocalHomeName)s( - name, ::Components::AssemblyFactory::SmartPtr()); - } - - int - deploy_with_assembly_%(AbsoluteLocalHomeName)s(char* name, - ::Components::AssemblyFactory::SmartPtr assembly_factory) - { - try - { - ::Components::CCMHome::SmartPtr - ret(new %(LocalNamespace)s%(Identifier)s(assembly_factory)); - ::Components::HomeFinder::Instance()->register_home(ret, name); - } - catch(...) - { - return -1; - } - return 0; - } - - int - undeploy_%(AbsoluteLocalHomeName)s(char* name) - { - try - { - ::Components::HomeFinder::Instance()->unregister_home(name); - } - catch(...) - { - return -1; - } - return 0; - } - - <<<<<<<SPLIT>>>>>>> --- 211,214 ---- *************** *** 354,367 **** */ ! //============================================================================== ! // %(Identifier)s - entry point ! //============================================================================== #ifndef __HOME_%(PreprocIdentifier)s_ENTRY__H__ #define __HOME_%(PreprocIdentifier)s_ENTRY__H__ ::Components::HomeExecutorBase* create_%(AbsoluteLocalHomeName)s(); #endif // __HOME_%(PreprocIdentifier)s_ENTRY__H__ --- 285,314 ---- */ ! /***************************************************************************** ! * ! * %(Identifier)s - entry point ! * ! \****************************************************************************/ #ifndef __HOME_%(PreprocIdentifier)s_ENTRY__H__ #define __HOME_%(PreprocIdentifier)s_ENTRY__H__ + #include <Components/ccmtools.h> + ::Components::HomeExecutorBase* create_%(AbsoluteLocalHomeName)s(); + ::Components::CCMHome::SmartPtr + create_%(AbsoluteLocalHomeName)sAdapter(); + + int + deploy_with_assembly_%(AbsoluteLocalHomeName)s(char* name, + ::Components::AssemblyFactory::SmartPtr assembly_factory); + + /// deploy the implementation of %(Identifier)s + int deploy_%(AbsoluteLocalHomeName)s(char* name); + + int undeploy_%(AbsoluteLocalHomeName)s(char* name); + #endif // __HOME_%(PreprocIdentifier)s_ENTRY__H__ *************** *** 430,433 **** --- 377,381 ---- #include <iostream> + #include <%(HomeInclude)s_gen.h> #include "%(ComponentType)s_impl.h" #include "%(Identifier)s_impl.h" *************** *** 476,477 **** --- 424,476 ---- } + + + ::Components::CCMHome::SmartPtr + create_%(AbsoluteLocalHomeName)sAdapter() + { + ::Components::CCMHome::SmartPtr + ret(new %(LocalNamespace)s%(Identifier)s( + new %(LocalNamespace)s%(Identifier)s_impl())); + return ret; + } + + int + deploy_%(AbsoluteLocalHomeName)s(char* name) + { + return deploy_with_assembly_%(AbsoluteLocalHomeName)s( + name, ::Components::AssemblyFactory::SmartPtr()); + } + + int + deploy_with_assembly_%(AbsoluteLocalHomeName)s(char* name, + ::Components::AssemblyFactory::SmartPtr assembly_factory) + { + try + { + ::Components::CCMHome::SmartPtr + ret(new %(LocalNamespace)s%(Identifier)s( + new %(LocalNamespace)s%(Identifier)s_impl(), + assembly_factory)); + ::Components::HomeFinder::Instance()->register_home(ret, name); + } + catch(...) + { + return -1; + } + return 0; + } + + int + undeploy_%(AbsoluteLocalHomeName)s(char* name) + { + try + { + ::Components::HomeFinder::Instance()->unregister_home(name); + } + catch(...) + { + return -1; + } + return 0; + } + |
From: Robert L. <rle...@us...> - 2007-03-23 11:04:23
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/receptacle_object/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17271/test/CppGenerator/receptacle_object/impl Modified Files: _check_Test.cc Log Message: C++: the local home adapter has no longer a dependency to the home's implementation Index: _check_Test.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/receptacle_object/impl/_check_Test.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** _check_Test.cc 5 Jan 2007 14:17:28 -0000 1.3 --- _check_Test.cc 23 Mar 2007 11:03:43 -0000 1.4 *************** *** 1,4 **** /*** ! * CCM Tools Test Client * * This file was automatically generated by the CCM Tools. --- 1,4 ---- /*** ! * CCM Tools Test Client * * This file was automatically generated by the CCM Tools. *************** *** 6,11 **** * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. --- 6,11 ---- * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. *************** *** 17,20 **** --- 17,21 ---- #include <Components/ccmtools.h> + #include <TestHome_entry.h> #include <TestHome_gen.h> *************** *** 33,37 **** Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); error = deploy_TestHome("TestHome"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; --- 34,38 ---- Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); error = deploy_TestHome("TestHome"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; *************** *** 39,43 **** } ! try { TestHome::SmartPtr myTestHome(dynamic_cast<TestHome*>( --- 40,44 ---- } ! try { TestHome::SmartPtr myTestHome(dynamic_cast<TestHome*>( *************** *** 48,78 **** myTest->connect_iface(iface); myTest->configuration_complete(); ! myTest->disconnect_iface(); myTest->remove(); ! } ! catch ( Components::HomeNotFound ) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } ! catch ( Components::NotImplemented& e ) { ! cout << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; return -1; ! } ! catch ( Components::InvalidName& e ) ! { ! cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what ( ) << endl; return -1; } ! catch ( ... ) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; error = -1; } ! if (error < 0) { return error; --- 49,79 ---- myTest->connect_iface(iface); myTest->configuration_complete(); ! myTest->disconnect_iface(); myTest->remove(); ! } ! catch ( Components::HomeNotFound ) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } ! catch ( Components::NotImplemented& e ) { ! cout << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; return -1; ! } ! catch ( Components::InvalidName& e ) ! { ! cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what ( ) << endl; return -1; } ! catch ( ... ) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; error = -1; } ! if (error < 0) { return error; *************** *** 80,84 **** error += undeploy_TestHome("TestHome"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; --- 81,85 ---- error += undeploy_TestHome("TestHome"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; |
From: Robert L. <rle...@us...> - 2007-03-23 11:04:23
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/supports_attribute/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17271/test/CppGenerator/supports_attribute/impl Modified Files: _check_Test.cc Log Message: C++: the local home adapter has no longer a dependency to the home's implementation Index: _check_Test.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/supports_attribute/impl/_check_Test.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** _check_Test.cc 5 Jan 2007 14:17:28 -0000 1.3 --- _check_Test.cc 23 Mar 2007 11:03:44 -0000 1.4 *************** *** 1,4 **** /*** ! * CCM Tools Test Client * * This file was automatically generated by the CCM Tools. --- 1,4 ---- /*** ! * CCM Tools Test Client * * This file was automatically generated by the CCM Tools. *************** *** 6,11 **** * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. --- 6,11 ---- * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. *************** *** 17,20 **** --- 17,21 ---- #include <Components/ccmtools.h> + #include <TestHome_entry.h> #include <TestHome_gen.h> *************** *** 30,34 **** Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); error = deploy_TestHome("TestHome"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; --- 31,35 ---- Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); error = deploy_TestHome("TestHome"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; *************** *** 36,47 **** } ! try { TestHome::SmartPtr myTestHome(dynamic_cast<TestHome*>( homeFinder->find_home_by_name("TestHome").ptr())); ! myTest = myTestHome->create(); myTest->configuration_complete(); ! { const long maxSize = 10; --- 37,48 ---- } ! try { TestHome::SmartPtr myTestHome(dynamic_cast<TestHome*>( homeFinder->find_home_by_name("TestHome").ptr())); ! myTest = myTestHome->create(); myTest->configuration_complete(); ! { const long maxSize = 10; *************** *** 49,78 **** assert(myTest->max_size() == maxSize); } ! myTest->remove(); ! } ! catch ( Components::HomeNotFound ) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } ! catch ( Components::NotImplemented& e ) { ! cout << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; return -1; ! } ! catch ( Components::InvalidName& e ) { ! cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what ( ) << endl; return -1; } ! catch ( ... ) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; return -1; } ! if (error < 0) { return error; --- 50,79 ---- assert(myTest->max_size() == maxSize); } ! myTest->remove(); ! } ! catch ( Components::HomeNotFound ) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } ! catch ( Components::NotImplemented& e ) { ! cout << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; return -1; ! } ! catch ( Components::InvalidName& e ) { ! cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what ( ) << endl; return -1; } ! catch ( ... ) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; return -1; } ! if (error < 0) { return error; *************** *** 80,89 **** error += undeploy_TestHome("TestHome"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; return error; } ! cout << ">>>> Stop Test Client: " << __FILE__ << endl; } --- 81,90 ---- error += undeploy_TestHome("TestHome"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; return error; } ! cout << ">>>> Stop Test Client: " << __FILE__ << endl; } |
From: Robert L. <rle...@us...> - 2007-03-23 11:04:23
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/assembly_nested/impl/test In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17271/test/CppGenerator/assembly_nested/impl/test Modified Files: _check_SuperTest.cc Log Message: C++: the local home adapter has no longer a dependency to the home's implementation Index: _check_SuperTest.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/assembly_nested/impl/test/_check_SuperTest.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** _check_SuperTest.cc 5 Jan 2007 14:17:27 -0000 1.3 --- _check_SuperTest.cc 23 Mar 2007 11:03:43 -0000 1.4 *************** *** 1,4 **** /*** ! * CCM Tools Test Client * * This file was automatically generated by . --- 1,4 ---- /*** ! * CCM Tools Test Client * * This file was automatically generated by . *************** *** 6,11 **** * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. --- 6,11 ---- * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. *************** *** 17,20 **** --- 17,25 ---- #include <Components/ccmtools.h> + #include <SuperTestHomeMirror_entry.h> + #include <SuperTestHome_entry.h> + #include <BasicTestHome_entry.h> + #include <UserTestHome_entry.h> + #include <SuperTestHomeMirror_gen.h> #include <SuperTestHome_gen.h> *************** *** 45,49 **** int error = 0; ! error += deploy_BasicTestHome("BasicTestHome"); --- 50,54 ---- int error = 0; ! error += deploy_BasicTestHome("BasicTestHome"); *************** *** 52,60 **** Components::AssemblyFactory::SmartPtr assembly_factory( new Components::AssemblyFactoryTemplate<Assembly>()); ! error += deploy_with_assembly_SuperTestHome("SuperTestHome", assembly_factory); ! error += deploy_SuperTestHomeMirror("SuperTestHomeMirror"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; --- 57,65 ---- Components::AssemblyFactory::SmartPtr assembly_factory( new Components::AssemblyFactoryTemplate<Assembly>()); ! error += deploy_with_assembly_SuperTestHome("SuperTestHome", assembly_factory); ! error += deploy_SuperTestHomeMirror("SuperTestHomeMirror"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; *************** *** 62,73 **** } ! try { Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); ! SuperTestHome::SmartPtr mySuperTestHome(dynamic_cast<SuperTestHome*>( homeFinder->find_home_by_name("SuperTestHome").ptr())); ! SuperTestHomeMirror::SmartPtr mySuperTestHomeMirror(dynamic_cast<SuperTestHomeMirror*>( homeFinder->find_home_by_name("SuperTestHomeMirror").ptr())); --- 67,78 ---- } ! try { Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); ! SuperTestHome::SmartPtr mySuperTestHome(dynamic_cast<SuperTestHome*>( homeFinder->find_home_by_name("SuperTestHome").ptr())); ! SuperTestHomeMirror::SmartPtr mySuperTestHomeMirror(dynamic_cast<SuperTestHomeMirror*>( homeFinder->find_home_by_name("SuperTestHomeMirror").ptr())); *************** *** 91,113 **** mySuperTest->remove(); mySuperTestMirror->remove(); ! } ! catch (Components::HomeNotFound& e) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } ! catch (Components::NotImplemented& e) { ! cout << "DEPLOYMENT ERROR: function not implemented: " << e.what() << endl; return -1; ! } ! catch (Components::InvalidName& e) { ! cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what() << endl; return -1; } ! catch (...) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; --- 96,118 ---- mySuperTest->remove(); mySuperTestMirror->remove(); ! } ! catch (Components::HomeNotFound& e) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } ! catch (Components::NotImplemented& e) { ! cout << "DEPLOYMENT ERROR: function not implemented: " << e.what() << endl; return -1; ! } ! catch (Components::InvalidName& e) { ! cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what() << endl; return -1; } ! catch (...) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; *************** *** 119,123 **** error += undeploy_SuperTestHome("SuperTestHome"); error += undeploy_SuperTestHomeMirror("SuperTestHomeMirror"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; --- 124,128 ---- error += undeploy_SuperTestHome("SuperTestHome"); error += undeploy_SuperTestHomeMirror("SuperTestHomeMirror"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; |
From: Robert L. <rle...@us...> - 2007-03-23 11:04:23
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17271/test/CppGenerator Modified Files: Makefile Log Message: C++: the local home adapter has no longer a dependency to the home's implementation Index: Makefile =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile 9 Mar 2007 13:14:57 -0000 1.4 --- Makefile 23 Mar 2007 11:03:40 -0000 1.5 *************** *** 4,8 **** rm -f stamp.* ! full: stamp.attribute\ stamp.supports\ stamp.facet\ --- 4,12 ---- rm -f stamp.* ! clean-xxx: ! find . -name xxx | xargs rm -rf ! ! full: clean-xxx\ ! stamp.attribute\ stamp.supports\ stamp.facet\ |
From: Robert L. <rle...@us...> - 2007-03-23 11:04:22
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/supports_inheritance/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17271/test/CppGenerator/supports_inheritance/impl Modified Files: _check_Test.cc Log Message: C++: the local home adapter has no longer a dependency to the home's implementation Index: _check_Test.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/supports_inheritance/impl/_check_Test.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** _check_Test.cc 5 Jan 2007 14:17:28 -0000 1.3 --- _check_Test.cc 23 Mar 2007 11:03:43 -0000 1.4 *************** *** 1,4 **** /*** ! * CCM Tools Test Client * * This file was automatically generated by the CCM Tools. --- 1,4 ---- /*** ! * CCM Tools Test Client * * This file was automatically generated by the CCM Tools. *************** *** 6,11 **** * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. --- 6,11 ---- * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. *************** *** 17,20 **** --- 17,21 ---- #include <Components/ccmtools.h> + #include <TestHome_entry.h> #include <TestHome_gen.h> *************** *** 24,31 **** { cout << ">>>> Start Test Client: " << __FILE__ << endl; ! int error = 0; error = deploy_TestHome("TestHome"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; --- 25,32 ---- { cout << ">>>> Start Test Client: " << __FILE__ << endl; ! int error = 0; error = deploy_TestHome("TestHome"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; *************** *** 33,41 **** } ! try { Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); ! Test::SmartPtr myTest; ! TestHome::SmartPtr myTestHome(dynamic_cast<TestHome*>( homeFinder->find_home_by_name("TestHome").ptr())); --- 34,42 ---- } ! try { Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); ! Test::SmartPtr myTest; ! TestHome::SmartPtr myTestHome(dynamic_cast<TestHome*>( homeFinder->find_home_by_name("TestHome").ptr())); *************** *** 43,84 **** myTest = myTestHome->create(); myTest->configuration_complete(); ! string str1 = "Hallo to first op()"; long size1 = myTest->op1(str1); assert(size1 == str1.length()); ! string str2 = "Hallo to second op()"; long size2 = myTest->op2(str2); assert(size2 == str2.length()); ! string str3 = "Hallo to third op()"; long size3 = myTest->op3(str3); assert(size3 == str3.length()); ! myTest->remove(); ! } ! catch ( Components::HomeNotFound ) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } ! catch ( Components::NotImplemented& e ) { ! cout << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; return -1; ! } ! catch ( Components::InvalidName& e ) { ! cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what ( ) << endl; return -1; } ! catch ( ... ) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; error = -1; } ! if (error < 0) { return error; --- 44,85 ---- myTest = myTestHome->create(); myTest->configuration_complete(); ! string str1 = "Hallo to first op()"; long size1 = myTest->op1(str1); assert(size1 == str1.length()); ! string str2 = "Hallo to second op()"; long size2 = myTest->op2(str2); assert(size2 == str2.length()); ! string str3 = "Hallo to third op()"; long size3 = myTest->op3(str3); assert(size3 == str3.length()); ! myTest->remove(); ! } ! catch ( Components::HomeNotFound ) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } ! catch ( Components::NotImplemented& e ) { ! cout << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; return -1; ! } ! catch ( Components::InvalidName& e ) { ! cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what ( ) << endl; return -1; } ! catch ( ... ) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; error = -1; } ! if (error < 0) { return error; *************** *** 86,90 **** error = undeploy_TestHome("TestHome"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; --- 87,91 ---- error = undeploy_TestHome("TestHome"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; |
From: Robert L. <rle...@us...> - 2007-03-23 11:03:54
|
Update of /cvsroot/ccmtools/ccmtools/test/CppAssembly/sample_logger In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17271/test/CppAssembly/sample_logger Modified Files: _check_main.cc Log Message: C++: the local home adapter has no longer a dependency to the home's implementation Index: _check_main.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppAssembly/sample_logger/_check_main.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** _check_main.cc 28 Feb 2007 08:02:16 -0000 1.2 --- _check_main.cc 23 Mar 2007 11:03:45 -0000 1.3 *************** *** 1,4 **** --- 1,5 ---- #include <iostream> #include <wamas/helpers/StdErrLoggerHome_gen.h> + #include <wamas_helpers_StdErrLoggerHome_entry.h> using namespace wamas::helpers; *************** *** 14,20 **** { std::cout << "# creating home" << std::endl; ! StdErrLoggerHome home; std::cout << "# creating component" << std::endl; ! comp = home.create(); std::cout << "# provide logger" << std::endl; logger = comp->provide_logger(); --- 15,22 ---- { std::cout << "# creating home" << std::endl; ! ::Components::CCMHome::SmartPtr sp = create_wamas_helpers_StdErrLoggerHomeAdapter(); ! StdErrLoggerHome* home = dynamic_cast<StdErrLoggerHome*>(sp.ptr());; std::cout << "# creating component" << std::endl; ! comp = home->create(); std::cout << "# provide logger" << std::endl; logger = comp->provide_logger(); |
From: Robert L. <rle...@us...> - 2007-03-23 11:03:50
|
Update of /cvsroot/ccmtools/ccmtools/test/CppAssembly/deploy_logger In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17271/test/CppAssembly/deploy_logger Modified Files: _check_main.cc Log Message: C++: the local home adapter has no longer a dependency to the home's implementation Index: _check_main.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppAssembly/deploy_logger/_check_main.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** _check_main.cc 28 Feb 2007 10:58:51 -0000 1.1 --- _check_main.cc 23 Mar 2007 11:03:44 -0000 1.2 *************** *** 1,5 **** #include <iostream> #include <wamas/helpers/StdErrLoggerHome_gen.h> - #include <wamas/system/ConsoleHome_gen.h> using namespace wamas::helpers; --- 1,6 ---- #include <iostream> + #include <wamas_system_ConsoleHome_entry.h> + #include <wamas_helpers_StdErrLoggerHome_entry.h> #include <wamas/helpers/StdErrLoggerHome_gen.h> using namespace wamas::helpers; *************** *** 16,27 **** { std::cout << "# register Console" << std::endl; ! ::Components::CCMHome::SmartPtr sp(new ::wamas::system::ConsoleHome); ! ::Components::HomeFinder::Instance()->register_home(sp, "Console"); } { std::cout << "# creating home" << std::endl; ! StdErrLoggerHome home; std::cout << "# creating component" << std::endl; ! comp = home.create(); } std::cout << "# provide logger" << std::endl; --- 17,32 ---- { std::cout << "# register Console" << std::endl; ! if(::deploy_wamas_system_ConsoleHome("Console")!=0) ! { ! std::cerr << "registration failed\n"; ! return 1; ! } } { std::cout << "# creating home" << std::endl; ! ::Components::CCMHome::SmartPtr sp = create_wamas_helpers_StdErrLoggerHomeAdapter(); ! StdErrLoggerHome* home = dynamic_cast<StdErrLoggerHome*>(sp.ptr());; std::cout << "# creating component" << std::endl; ! comp = home->create(); } std::cout << "# provide logger" << std::endl; |
From: Robert L. <rle...@us...> - 2007-03-23 11:03:50
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/facet_types/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17271/test/CppGenerator/facet_types/impl Modified Files: _check_witout_mirror.cc Log Message: C++: the local home adapter has no longer a dependency to the home's implementation Index: _check_witout_mirror.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/facet_types/impl/_check_witout_mirror.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** _check_witout_mirror.cc 5 Jan 2007 14:17:28 -0000 1.8 --- _check_witout_mirror.cc 23 Mar 2007 11:03:45 -0000 1.9 *************** *** 1,4 **** /*** ! * CCM Tools Test Client * * This file was automatically generated by the CCM Tools. --- 1,4 ---- /*** ! * CCM Tools Test Client * * This file was automatically generated by the CCM Tools. *************** *** 6,11 **** * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. --- 6,11 ---- * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. *************** *** 17,20 **** --- 17,21 ---- #include <Components/ccmtools.h> + #include <TestHome_entry.h> #include <TestHome_gen.h> *************** *** 34,48 **** } ! try { TestHome::SmartPtr myTestHome(dynamic_cast<TestHome*>( homeFinder->find_home_by_name("TestHome").ptr())); ! Test::SmartPtr myTest; myTest = myTestHome->create(); ! myTest->configuration_complete(); ! { TypeTest::SmartPtr type_test; type_test = myTest->provide_type_test(); --- 35,49 ---- } ! try { TestHome::SmartPtr myTestHome(dynamic_cast<TestHome*>( homeFinder->find_home_by_name("TestHome").ptr())); ! Test::SmartPtr myTest; myTest = myTestHome->create(); ! myTest->configuration_complete(); ! { TypeTest::SmartPtr type_test; type_test = myTest->provide_type_test(); *************** *** 53,57 **** assert(long_r == 3+7); } ! { TypeTest::SmartPtr type_test; type_test = myTest->provide_type_test(); --- 54,58 ---- assert(long_r == 3+7); } ! { TypeTest::SmartPtr type_test; type_test = myTest->provide_type_test(); *************** *** 62,66 **** assert(long_r == 3+7); } ! { TypeTest::SmartPtr type_test; type_test = myTest->provide_type_test(); --- 63,67 ---- assert(long_r == 3+7); } ! { TypeTest::SmartPtr type_test; type_test = myTest->provide_type_test(); *************** *** 73,95 **** myTest->remove(); ! } ! catch ( Components::HomeNotFound ) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } ! catch ( Components::NotImplemented& e ) { ! cout << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; return -1; ! } ! catch ( Components::InvalidName& e ) { ! cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what ( ) << endl; return -1; } ! catch ( ... ) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; --- 74,96 ---- myTest->remove(); ! } ! catch ( Components::HomeNotFound ) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } ! catch ( Components::NotImplemented& e ) { ! cout << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; return -1; ! } ! catch ( Components::InvalidName& e ) { ! cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what ( ) << endl; return -1; } ! catch ( ... ) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; *************** *** 98,102 **** error = undeploy_TestHome("TestHome"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; --- 99,103 ---- error = undeploy_TestHome("TestHome"); ! if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; |
From: Robert L. <rle...@us...> - 2007-03-23 11:03:49
|
Update of /cvsroot/ccmtools/ccmtools/test/CppGenerator/receptacle_not_connected/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17271/test/CppGenerator/receptacle_not_connected/impl Modified Files: _check_Test.cc Log Message: C++: the local home adapter has no longer a dependency to the home's implementation Index: _check_Test.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppGenerator/receptacle_not_connected/impl/_check_Test.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** _check_Test.cc 5 Jan 2007 14:17:26 -0000 1.3 --- _check_Test.cc 23 Mar 2007 11:03:44 -0000 1.4 *************** *** 1,11 **** /*** ! * CCM Tools Test Client * ! * This file was automatically generated by CCM Tools * <http://ccmtools.sourceforge.net/> * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. --- 1,11 ---- /*** ! * CCM Tools Test Client * ! * This file was automatically generated by CCM Tools * <http://ccmtools.sourceforge.net/> * * This test client is part of the mirror component test concept. For each ! * component a corresponding mirror component will be instantiated. ! * All component ports will be connected to the mirror component's ports. * Additionally, developers can add some testing code to validate supported * interfaces as well as component attribute access. *************** *** 17,20 **** --- 17,23 ---- #include <Components/ccmtools.h> + #include <TestHomeMirror_entry.h> + #include <TestHome_entry.h> + #include <TestHomeMirror_gen.h> #include <TestHome_gen.h> *************** *** 33,38 **** int error = 0; error = deploy_TestHome("TestHome"); ! error += deploy_TestHomeMirror("TestHomeMirror"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; --- 36,41 ---- int error = 0; error = deploy_TestHome("TestHome"); ! error += deploy_TestHomeMirror("TestHomeMirror"); ! if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; *************** *** 40,44 **** } ! try { Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); --- 43,47 ---- } ! try { Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); *************** *** 54,58 **** /* ! * Don't connect the receptacle to activate a Components::NoConnection * exception. * Test_ck_console = myTest->connect("console", Test_uses_console); --- 57,61 ---- /* ! * Don't connect the receptacle to activate a Components::NoConnection * exception. * Test_ck_console = myTest->connect("console", Test_uses_console); *************** *** 69,98 **** myTestMirror->remove(); ! } catch(Components::HomeNotFound ) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } catch(Components::NotImplemented& e ) { ! cout << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; return -1; ! } ! catch(Components::InvalidName& e ) { ! cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what ( ) << endl; return -1; } ! catch ( ... ) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; error = -1; } ! if (error < 0) { return error; } ! error += undeploy_TestHome("TestHome"); error += undeploy_TestHomeMirror("TestHomeMirror"); --- 72,101 ---- myTestMirror->remove(); ! } catch(Components::HomeNotFound ) { cout << "DEPLOYMENT ERROR: can't find a home!" << endl; return -1; ! } catch(Components::NotImplemented& e ) { ! cout << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; return -1; ! } ! catch(Components::InvalidName& e ) { ! cout << "DEPLOYMENT ERROR: invalid name during connection: " << e.what ( ) << endl; return -1; } ! catch ( ... ) { cout << "DEPLOYMENT ERROR: there is something wrong!" << endl; error = -1; } ! if (error < 0) { return error; } ! error += undeploy_TestHome("TestHome"); error += undeploy_TestHomeMirror("TestHomeMirror"); |
From: Robert L. <rle...@us...> - 2007-03-23 11:03:49
|
Update of /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTestTemplates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17271/src/templates/CppLocalTestTemplates Modified Files: MComponentDef Log Message: C++: the local home adapter has no longer a dependency to the home's implementation Index: MComponentDef =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTestTemplates/MComponentDef,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** MComponentDef 5 Jan 2007 14:17:26 -0000 1.16 --- MComponentDef 23 Mar 2007 11:03:45 -0000 1.17 *************** *** 17,20 **** --- 17,25 ---- #include <Components/ccmtools.h> + // entry points for '%(AbsoluteLocalHomeName)s' + #include <%(AbsoluteLocalHomeName)s_entry.h> + #include <%(AbsoluteLocalHomeName)sMirror_entry.h> + + // local adapters #include <%(HomeInclude)s_gen.h> #include <%(HomeInclude)sMirror_gen.h> |
From: Robert L. <rle...@us...> - 2007-03-23 11:03:48
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/CppGenerator In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17271/src/ccmtools/CppGenerator Modified Files: CppAssemblyGenerator.java Log Message: C++: the local home adapter has no longer a dependency to the home's implementation Index: CppAssemblyGenerator.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/CppGenerator/CppAssemblyGenerator.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CppAssemblyGenerator.java 22 Mar 2007 13:28:47 -0000 1.12 --- CppAssemblyGenerator.java 23 Mar 2007 11:03:44 -0000 1.13 *************** *** 19,23 **** import java.util.logging.Logger; import ccmtools.CcmtoolsException; - import ccmtools.CodeGenerator.Template; import ccmtools.parser.assembly.metamodel.Assembly; import ccmtools.parser.assembly.metamodel.AssemblyElement; --- 19,22 ---- *************** *** 65,69 **** */ protected Model assemblies; ! public void startGraph() { --- 64,68 ---- */ protected Model assemblies; ! public void startGraph() { *************** *** 249,252 **** --- 248,255 ---- { MComponentDef comp_def = map.get(key); + final String home_type = "::Components::CCMHome::SmartPtr"; + String home_var = createLocalVar(local_var_map, home_type, code_homes); + final String keyless_type = "::Components::KeylessCCMHome*"; + String keyless_var = createLocalVar(local_var_map, keyless_type, code_homes); String comp_alias = currentAssembly.getComponents().get(key).getAlias(); if (comp_alias != null) *************** *** 263,281 **** have_finder = true; } - final String home_type = "::Components::CCMHome::SmartPtr"; - String home_var = createLocalVar(local_var_map, home_type, code_homes); code_creation.append(TAB).append(home_var); code_creation.append(" = ").append(finder_var); code_creation.append("->find_home_by_name(\""); code_creation.append(comp_alias).append("\");\n"); - final String keyless_type = "::Components::KeylessCCMHome*"; - String keyless_var = createLocalVar(local_var_map, keyless_type, code_homes); - code_creation.append(TAB).append(keyless_var); - code_creation.append(" = dynamic_cast< ").append(keyless_type); - code_creation.append(">(").append(home_var).append(".ptr());\n"); - code_creation.append(TAB).append("assert("); - code_creation.append(keyless_var).append(");\n"); - code_creation.append(TAB).append(key).append("_ = "); - code_creation.append(keyless_var).append("->create_component();\n"); } else --- 266,273 ---- *************** *** 283,294 **** // using first home MHomeDef home = getHome(comp_def); ! String home_type = getLocalCxxName(home, "::"); ! String home_var = createLocalVar(local_var_map, home_type, code_homes); ! code_creation.append(TAB); ! code_creation.append(key); ! code_creation.append("_ = "); ! code_creation.append(home_var); ! code_creation.append(".create();\n"); } code_creation.append(TAB).append("assert("); code_creation.append(key).append("_);\n"); --- 275,290 ---- // using first home MHomeDef home = getHome(comp_def); ! String absoluteLocalHomeName = getLocalCxxIncludeName(home, Text.MANGLING_SEPARATOR); ! String func = "::create_" + absoluteLocalHomeName + "Adapter()"; ! code_creation.append(TAB).append(home_var); ! code_creation.append(" = ").append(func).append(";\n"); } + code_creation.append(TAB).append(keyless_var); + code_creation.append(" = dynamic_cast< ").append(keyless_type); + code_creation.append(">(").append(home_var).append(".ptr());\n"); + code_creation.append(TAB).append("assert("); + code_creation.append(keyless_var).append(");\n"); + code_creation.append(TAB).append(key).append("_ = "); + code_creation.append(keyless_var).append("->create_component();\n"); code_creation.append(TAB).append("assert("); code_creation.append(key).append("_);\n"); *************** *** 371,378 **** MComponentDef comp_def = map.get(key); MHomeDef home = getHome(comp_def); ! String inc_name = getLocalCxxIncludeName(home); if (!include_set.contains(inc_name)) { ! code.append("#include <" + inc_name + "_gen.h>\n"); include_set.add(inc_name); } --- 367,375 ---- MComponentDef comp_def = map.get(key); MHomeDef home = getHome(comp_def); ! String absoluteLocalHomeName = getLocalCxxIncludeName(home, Text.MANGLING_SEPARATOR); ! String inc_name = absoluteLocalHomeName + "_entry.h"; if (!include_set.contains(inc_name)) { ! code.append("#include <" + inc_name + ">\n"); include_set.add(inc_name); } |
From: Robert L. <rle...@us...> - 2007-03-22 13:28:52
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/CppGenerator In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv18117/src/ccmtools/CppGenerator Modified Files: CppAssemblyGenerator.java Log Message: bug fix: generator may now be reused Index: CppAssemblyGenerator.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/CppGenerator/CppAssemblyGenerator.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** CppAssemblyGenerator.java 22 Mar 2007 12:14:38 -0000 1.11 --- CppAssemblyGenerator.java 22 Mar 2007 13:28:47 -0000 1.12 *************** *** 65,68 **** --- 65,75 ---- */ protected Model assemblies; + + public void startGraph() + { + currentAssembly = null; + assembly_local_components_ = new HashMap<String, Map<String, MComponentDef>>(); + super.startGraph(); + } /** *************** *** 107,116 **** } - protected void writeOutput( Template template ) - { - super.writeOutput(template); - currentAssembly = null; - } - protected static void keep_only_impls( List files ) { --- 114,117 ---- *************** *** 656,660 **** } ! private Map<String, Map<String, MComponentDef>> assembly_local_components_ = new HashMap<String, Map<String, MComponentDef>>(); protected Map<String, MComponentDef> getAssemblyLocalComponents() --- 657,661 ---- } ! private Map<String, Map<String, MComponentDef>> assembly_local_components_; protected Map<String, MComponentDef> getAssemblyLocalComponents() |
From: Robert L. <rle...@us...> - 2007-03-22 12:14:41
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/CppGenerator In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21918/src/ccmtools/CppGenerator Modified Files: CppAssemblyGenerator.java Log Message: bug fix: reset reference to last assembly Index: CppAssemblyGenerator.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/CppGenerator/CppAssemblyGenerator.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** CppAssemblyGenerator.java 8 Mar 2007 14:44:33 -0000 1.10 --- CppAssemblyGenerator.java 22 Mar 2007 12:14:38 -0000 1.11 *************** *** 19,22 **** --- 19,23 ---- import java.util.logging.Logger; import ccmtools.CcmtoolsException; + import ccmtools.CodeGenerator.Template; import ccmtools.parser.assembly.metamodel.Assembly; import ccmtools.parser.assembly.metamodel.AssemblyElement; *************** *** 106,109 **** --- 107,116 ---- } + protected void writeOutput( Template template ) + { + super.writeOutput(template); + currentAssembly = null; + } + protected static void keep_only_impls( List files ) { *************** *** 449,453 **** if (!outer_facets.contains(name)) { ! throw new RuntimeException("facet " + name + " is not connected to an inner component"); } --- 456,460 ---- if (!outer_facets.contains(name)) { ! throw new RuntimeException("facet " + getQualifiedCcmName(comp_def) + "." + name + " is not connected to an inner component"); } |
From: Robert L. <rle...@us...> - 2007-03-22 12:11:47
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/parser/assembly/metamodel In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20730/src/ccmtools/parser/assembly/metamodel Modified Files: ModelElement.java Log Message: show global name as default string Index: ModelElement.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/parser/assembly/metamodel/ModelElement.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ModelElement.java 15 Feb 2007 16:46:41 -0000 1.6 --- ModelElement.java 22 Mar 2007 12:11:26 -0000 1.7 *************** *** 55,58 **** --- 55,63 ---- } } + + public String toString() + { + return getGlobalName(); + } /** |
From: Robert L. <rle...@us...> - 2007-03-21 12:31:49
|
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype3 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv13836/test/JavaAssembly/prototype3 Added Files: prototype3.assembly Makefile .cvsignore prototype3.idl Log Message: Java Assemblies: new design --- NEW FILE: .cvsignore --- xxx --- NEW FILE: Makefile --- all: ccmjava -o xxx -app -iface -local *.idl ccmjava -o xxx -assembly *.assembly *.idl cd xxx && javac `find . -name '*.java'` rm `find xxx -name '*.class'` doc: cd xxx && javadoc -d doc `find . -name '*.java'` clean: rm -rf xxx test: clean all rm -rf xxx --- NEW FILE: prototype3.idl --- module World { interface Data { long work(in string text); }; component Worker { provides Data p1; provides Data p2; uses Data r2; uses Data r3; uses multiple Data r4; provides Data p5a; provides Data p5b; uses multiple Data r5; uses multiple Data r6; uses multiple Data r7; }; home WorkerHome manages Worker {}; }; // /module World module Space { component Alien { provides World::Data Ap1; uses World::Data Ar3; uses multiple World::Data Ar4; provides World::Data Ap10; uses World::Data Ar10; uses World::Data Ar6a; uses World::Data Ar6b; uses multiple World::Data Ar7a; uses multiple World::Data Ar7b; }; home AlienHome manages Alien {}; }; // /module Space --- NEW FILE: prototype3.assembly --- module Space { assembly implements Alien { component World::Worker alias "Worker" inner; connect inner.p1 to Ap1; connect inner.p2 to inner.r2; connect Ar3 to inner.r3; connect Ar4 to inner.r4; connect inner.p5a to inner.r5; connect inner.p5b to inner.r5; connect Ar10 to Ap10; connect Ar6a to inner.r6; connect Ar6b to inner.r6; connect Ar7a to inner.r7; connect Ar7b to inner.r7; }; }; // /module Space |
From: Robert L. <rle...@us...> - 2007-03-21 12:31:44
|
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype3 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv13823/test/JavaAssembly/prototype3 Log Message: Directory /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype3 added to the repository |
From: Robert L. <rle...@us...> - 2007-03-21 12:29:59
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/metamodel In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12972/src/ccmtools/generator/java/metamodel Modified Files: ComponentDef.java Log Message: Java Assemblies: new design Index: ComponentDef.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/metamodel/ComponentDef.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ComponentDef.java 27 Feb 2007 12:36:15 -0000 1.28 --- ComponentDef.java 21 Mar 2007 12:29:52 -0000 1.29 *************** *** 30,33 **** --- 30,34 ---- import ccmtools.parser.idl.metamodel.ComponentIDL.MComponentDef; import ccmtools.parser.idl.metamodel.ComponentIDL.MHomeDef; + import ccmtools.parser.idl.metamodel.ComponentIDL.MUsesDef; import ccmtools.utils.SourceFile; import ccmtools.utils.Text; *************** *** 303,309 **** --- 304,371 ---- } } + for (AssemblyElement e : assembly_.getElements()) + { + if (e instanceof Connection) + { + Connection c = (Connection) e; + Port source = c.getFacet(); + if (source.getComponent() == null) + { + // connect from an outer receptacle + Port target = c.getReceptacle(); + String target_comp = target.getComponent(); + if (target_comp != null) + { + // connect to an inner receptacle + MComponentDef target_def = getAssemblyLocalComponents().get(target_comp); + MUsesDef inner = getReceptacle(target_def, target.getConnector()); + UsesDef outer = getReceptacle(this, source.getConnector()); + if (outer.isMultiple()) + { + if (!inner.isMultiple()) + { + StringBuilder msg = new StringBuilder(); + msg.append("cannot connect outer multiple receptacle \""); + msg.append(source.getConnector()); + msg.append("\" to inner single receptacle \""); + msg.append(target.getConnector()); + msg.append("\""); + throw new RuntimeException(msg.toString()); + } + } + else if (inner.isMultiple()) + { + String code = TAB + "private Components.Cookie " + + source.getConnector() + "_;"; + list.add(code); + } + } + } + } + } return list.iterator(); } + private static UsesDef getReceptacle( ComponentDef comp_def, String name ) + { + for (UsesDef u : comp_def.getReceptacle()) + { + if (u.getIdentifier().equals(name)) + return u; + } + throw new RuntimeException("cannot find receptacle: " + name); + } + + private static MUsesDef getReceptacle( MComponentDef comp_def, String name ) + { + for (Object o : comp_def.getReceptacles()) + { + MUsesDef u = (MUsesDef) o; + if (u.getIdentifier().equals(name)) + return u; + } + throw new RuntimeException("cannot find receptacle: " + name); + } + public Iterator getAssemblyAttributeInitialisation() { *************** *** 319,324 **** String cn = CcmModelHelper.getAbsoluteName(comp_def, "."); StringBuilder code = new StringBuilder(); ! code.append(TAB3).append(key).append("_ = (").append(cn).append("Adapter)"); ! code.append("((Components.KeylessCCMHome)"); code.append("Components.HomeFinder.instance().find_home_by_name(\""); code.append(comp_alias).append("\")).create_component();"); --- 381,386 ---- String cn = CcmModelHelper.getAbsoluteName(comp_def, "."); StringBuilder code = new StringBuilder(); ! code.append(TAB3).append(key).append("_ = (").append(cn); ! code.append(")((Components.KeylessCCMHome)"); code.append("Components.HomeFinder.instance().find_home_by_name(\""); code.append(comp_alias).append("\")).create_component();"); *************** *** 368,374 **** } ! public Iterator getAssemblyAttributeSetup() { - HashSet<String> outer_facets = new HashSet<String>(); ArrayList<String> list = new ArrayList<String>(); for (AssemblyElement e : assembly_.getElements()) --- 430,435 ---- } ! public Iterator getAssemblyActivate() { ArrayList<String> list = new ArrayList<String>(); for (AssemblyElement e : assembly_.getElements()) *************** *** 377,409 **** { Connection c = (Connection) e; - StringBuffer code = new StringBuffer(); - String code_tail; Port target = c.getReceptacle(); ! String target_name = target.getConnector(); ! if (target.getComponent() == null) ! { ! // connect to an outer facet ! String check = TAB3 + "if(" + target_name + "_!=null)"; ! list.add(check); ! code.append(TAB4); ! code.append(target_name); ! code.append("_.target = "); ! code_tail = ";"; ! outer_facets.add(target_name); ! } ! else { // connect to the receptacle of an inner component ! code.append(TAB3); ! code.append(target.getComponent()); ! code.append("_.connect_"); ! code.append(target_name); ! code.append("("); ! code_tail = ");"; } - Port source = c.getFacet(); - code.append(getFacetValue(source)); - code.append(code_tail); - list.add(code.toString()); } else if (e instanceof Attribute) --- 438,456 ---- { Connection c = (Connection) e; Port target = c.getReceptacle(); ! String target_comp = target.getComponent(); ! if (target_comp != null) { // connect to the receptacle of an inner component ! Port source = c.getFacet(); ! String source_comp = source.getComponent(); ! if (source_comp != null) ! { ! // connect from the facet of an inner component ! list.add(TAB3 + target_comp + "_.connect(\"" + target.getConnector() ! + "\", " + source_comp + "_.provide_facet(\"" ! + source.getConnector() + "\"));"); ! } } } else if (e instanceof Attribute) *************** *** 423,426 **** --- 470,510 ---- } } + return list.iterator(); + } + + public Iterator getAssemblyDynamicProvide() + { + ArrayList<String> list = new ArrayList<String>(); + HashSet<String> outer_facets = new HashSet<String>(); + for (AssemblyElement e : assembly_.getElements()) + { + if (e instanceof Connection) + { + Connection c = (Connection) e; + Port target = c.getReceptacle(); + if (target.getComponent() == null) + { + // connect to an outer facet + String target_name = target.getConnector(); + outer_facets.add(target_name); + list.add(TAB2 + "if(name.equals(\"" + target_name + "\"))"); + list.add(TAB2 + "{"); + Port source = c.getFacet(); + String source_comp = source.getComponent(); + if (source_comp != null) + { + // connect from the facet of an inner component + list.add(TAB3 + "return " + source_comp + "_.provide_facet(\"" + + source.getConnector() + "\");"); + } + else + { + // connect from an outer receptacle + list.add(TAB3 + "return null;"); + } + list.add(TAB2 + "}"); + } + } + } for (ProvidesDef p : getFacet()) { *************** *** 428,433 **** if (!outer_facets.contains(name)) { ! throw new RuntimeException("facet " + name ! + " is not connected to an inner component"); } } --- 512,620 ---- if (!outer_facets.contains(name)) { ! throw new RuntimeException("facet \"" + name ! + "\" is not connected to an inner component"); ! } ! } ! return list.iterator(); ! } ! ! public Iterator getAssemblyDynamicConnect() ! { ! ArrayList<String> list = new ArrayList<String>(); ! for (AssemblyElement e : assembly_.getElements()) ! { ! if (e instanceof Connection) ! { ! Connection c = (Connection) e; ! Port source = c.getFacet(); ! if (source.getComponent() == null) ! { ! // connect from an outer receptacle ! String src_conn = source.getConnector(); ! UsesDef outer = getReceptacle(this, src_conn); ! list.add(TAB2 + "if(name.equals(\"" + src_conn + "\"))"); ! list.add(TAB2 + "{"); ! Port target = c.getReceptacle(); ! String target_comp = target.getComponent(); ! if (target_comp != null) ! { ! // connect to an inner receptacle ! MComponentDef target_def = getAssemblyLocalComponents().get(target_comp); ! MUsesDef inner = getReceptacle(target_def, target.getConnector()); ! if (inner.isMultiple() && !outer.isMultiple()) ! { ! list.add(TAB3 + src_conn + "_ = " + target_comp + "_.connect(\"" ! + target.getConnector() + "\", connection);"); ! list.add(TAB3 + "return " + src_conn + "_;"); ! } ! else ! { ! list.add(TAB3 + "return " + target_comp + "_.connect(\"" ! + target.getConnector() + "\", connection);"); ! } ! } ! else ! { ! // connect to an outer facet ! String tgt_conn = target.getConnector(); ! String facet = outer.getInterface().generateAbsoluteJavaName(); ! list.add(TAB3 + "if(" + tgt_conn + "_==null) get_" + tgt_conn + "();"); ! list.add(TAB3 + tgt_conn + "_.target = (" + facet + ")connection;"); ! list.add(TAB3 + "return new Components.CookieImpl();"); ! } ! list.add(TAB2 + "}"); ! } ! } ! } ! return list.iterator(); ! } ! ! public Iterator getAssemblyDynamicDisconnect() ! { ! ArrayList<String> list = new ArrayList<String>(); ! for (AssemblyElement e : assembly_.getElements()) ! { ! if (e instanceof Connection) ! { ! Connection c = (Connection) e; ! Port source = c.getFacet(); ! if (source.getComponent() == null) ! { ! // connect from an outer receptacle ! String src_conn = source.getConnector(); ! list.add(TAB2 + "if(name.equals(\"" + src_conn + "\"))"); ! list.add(TAB2 + "{"); ! Port target = c.getReceptacle(); ! String target_comp = target.getComponent(); ! if (target_comp != null) ! { ! // connect to an inner receptacle ! MComponentDef target_def = getAssemblyLocalComponents().get(target_comp); ! MUsesDef inner = getReceptacle(target_def, target.getConnector()); ! UsesDef outer = getReceptacle(this, src_conn); ! StringBuilder code = new StringBuilder(); ! code.append(TAB3).append(target_comp); ! code.append("_.disconnect(\""); ! code.append(target.getConnector()).append("\", "); ! if (inner.isMultiple() && !outer.isMultiple()) ! { ! code.append(src_conn).append("_"); ! } ! else ! { ! code.append("ck"); ! } ! code.append(");"); ! list.add(code.toString()); ! } ! else ! { ! // connect to an outer facet ! String tgt_conn = target.getConnector(); ! list.add(TAB3 + tgt_conn + "_.target = null;"); ! } ! list.add(TAB3 + "return;"); ! list.add(TAB2 + "}"); ! } } } *************** *** 469,510 **** } - private static String getFacetValue( Port source ) - { - StringBuilder code = new StringBuilder(); - if (source.getComponent() == null) - { - // connect from an outer receptacle - code.append("ctx.get_connection_"); - } - else - { - // connect from the facet of an inner component - code.append(source.getComponent()); - code.append("_.provide_"); - } - code.append(source.getConnector()); - code.append("()"); - return code.toString(); - } - - public String getAssemblyInitFacetTargetValue( ProvidesDef provides ) - { - String name = provides.getIdentifier(); - for (AssemblyElement e : assembly_.getElements()) - { - if (e instanceof Connection) - { - Connection c = (Connection) e; - Port target = c.getReceptacle(); - if (target.getComponent() == null && target.getConnector().equals(name)) - { - Port source = c.getFacet(); - return getFacetValue(source); - } - } - } - throw new RuntimeException("facet " + name + " is not connected to an inner component"); - } - /*********************************************************************************************** * Client Library Generator Methods --- 656,659 ---- |
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12972/src/ccmtools/generator/java/templates Modified Files: ProvidesDefGetMethodAssemblyImplementationTemplate.java ComponentDefAssemblyClassTemplate.java ProvidesDefEquivalentMethodAdapterLocalTemplate.java Log Message: Java Assemblies: new design Index: ComponentDefAssemblyClassTemplate.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/ComponentDefAssemblyClassTemplate.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ComponentDefAssemblyClassTemplate.java 20 Mar 2007 10:56:00 -0000 1.10 --- ComponentDefAssemblyClassTemplate.java 21 Mar 2007 12:29:52 -0000 1.11 *************** *** 23,27 **** protected final String TEXT_6 = " " + NL + " " + NL + "/**" + NL + " * This class implements component equivalent and supported interfaces" + NL + " * as well as component attributes." + NL + " */ " + NL + "public class "; protected final String TEXT_7 = "Impl " + NL + " implements "; ! protected final String TEXT_8 = NL + "{" + NL + " /** Supported interface attribute variables */" + NL; protected final String TEXT_9 = NL; protected final String TEXT_10 = " " + NL + " " + NL + "" + NL + " /** Component attribute variables */" + NL + " "; --- 23,27 ---- protected final String TEXT_6 = " " + NL + " " + NL + "/**" + NL + " * This class implements component equivalent and supported interfaces" + NL + " * as well as component attributes." + NL + " */ " + NL + "public class "; protected final String TEXT_7 = "Impl " + NL + " implements "; ! protected final String TEXT_8 = ", Components.ComponentDelegator" + NL + "{" + NL + " /** Supported interface attribute variables */" + NL; protected final String TEXT_9 = NL; protected final String TEXT_10 = " " + NL + " " + NL + "" + NL + " /** Component attribute variables */" + NL + " "; *************** *** 33,55 **** protected final String TEXT_16 = "Impl()" + NL + " throws Components.CCMException" + NL + " {" + NL + " \ttry {"; protected final String TEXT_17 = NL; ! protected final String TEXT_18 = " " + NL + " \t} catch(Exception e) {" + NL + " \t\tthrow new Components.CCMException(e.getMessage(), Components.CCMExceptionReason.CREATE_ERROR);" + NL + " \t}" + NL + " }" + NL + "" + NL + "" + NL + " /* " + NL + " * Supported interface methods " + NL + " */" + NL + "" + NL + " /** Supported interface attributes */" + NL; protected final String TEXT_19 = NL; ! protected final String TEXT_20 = " " + NL + " " + NL + " " + NL + " /** Supported interface methods */" + NL + " "; protected final String TEXT_21 = NL; ! protected final String TEXT_22 = " " + NL + "" + NL + "" + NL + " /** Component attribute accessor methods */" + NL; protected final String TEXT_23 = NL; ! protected final String TEXT_24 = " " + NL + "" + NL + "" + NL + " /** Facet implementation factory methods */" + NL + " "; protected final String TEXT_25 = NL; ! protected final String TEXT_26 = " " + NL + "" + NL + " /** Component callback methods */" + NL + " " + NL + " public void set_session_context(Components.SessionContext ctx) " + NL + " throws Components.CCMException" + NL + " {" + NL + " this.ctx = ("; ! protected final String TEXT_27 = "_Context)ctx; " + NL + " }" + NL + "" + NL + " public void ccm_activate() " + NL + " throws Components.CCMException" + NL + " {" + NL + " \ttry {" + NL + "\t\t\t// setup inner components \t"; ! protected final String TEXT_28 = NL; ! protected final String TEXT_29 = " " + NL + "" + NL + "\t\t\t// finish configuration \t"; ! protected final String TEXT_30 = NL + "\t\t\t"; ! protected final String TEXT_31 = "_.configuration_complete();"; ! protected final String TEXT_32 = NL + NL + "\t\t\tccm_activate_ok = true; " + NL + " \t} catch(Exception e) {" + NL + " \t\tthrow new Components.CCMException(e.getMessage(), Components.CCMExceptionReason.CREATE_ERROR);" + NL + " \t}" + NL + " }" + NL + "" + NL + " public void ccm_passivate() " + NL + " throws Components.CCMException" + NL + " {" + NL + " // Who calls this method?" + NL + " }" + NL + "" + NL + " public void ccm_remove() " + NL + " throws Components.CCMException" + NL + " {" + NL + " \ttry {"; ! protected final String TEXT_33 = NL + "\t\t\t"; ! protected final String TEXT_34 = "_.remove();"; ! protected final String TEXT_35 = NL + "\t\t} catch(Exception e) {" + NL + " \t\tthrow new Components.CCMException(e.getMessage(), Components.CCMExceptionReason.REMOVE_ERROR);" + NL + "\t\t} " + NL + " }" + NL + "}"; ! protected final String TEXT_36 = NL; public String generate(Object argument) --- 33,61 ---- protected final String TEXT_16 = "Impl()" + NL + " throws Components.CCMException" + NL + " {" + NL + " \ttry {"; protected final String TEXT_17 = NL; ! protected final String TEXT_18 = " " + NL + " \t} catch(Exception e) {" + NL + " \t\tthrow new Components.CCMException(e.getMessage(), Components.CCMExceptionReason.CREATE_ERROR);" + NL + " \t}" + NL + " }" + NL + " " + NL + " " + NL + " /*" + NL + " * Components.ComponentDelegator implementation" + NL + " */" + NL + "\t" + NL + "\tpublic Object provide( String name ) throws Components.InvalidName" + NL + "\t{"; protected final String TEXT_19 = NL; ! protected final String TEXT_20 = " " + NL + "\t\tthrow new Components.InvalidName(\"unknown facet: \"+name);" + NL + "\t}" + NL + "" + NL + " public Components.Cookie connect( String name, Object connection )" + NL + "\t\tthrows Components.InvalidName, Components.InvalidConnection," + NL + " Components.AlreadyConnected, Components.ExceededConnectionLimit" + NL + " {"; protected final String TEXT_21 = NL; ! protected final String TEXT_22 = " " + NL + "\t\tthrow new Components.InvalidName(\"unknown receptacle: \"+name);" + NL + " }" + NL + " " + NL + " public void disconnect( String name, Components.Cookie ck )" + NL + " \tthrows Components.InvalidName, Components.InvalidConnection," + NL + " Components.CookieRequired, Components.NoConnection" + NL + " {"; protected final String TEXT_23 = NL; ! protected final String TEXT_24 = " " + NL + "\t\tthrow new Components.InvalidName(\"unknown receptacle: \"+name);" + NL + " }" + NL + "" + NL + "" + NL + " /* " + NL + " * Supported interface methods " + NL + " */" + NL + "" + NL + " /** Supported interface attributes */" + NL; protected final String TEXT_25 = NL; ! protected final String TEXT_26 = " " + NL + " " + NL + " " + NL + " /** Supported interface methods */" + NL + " "; ! protected final String TEXT_27 = NL; ! protected final String TEXT_28 = " " + NL + "" + NL + "" + NL + " /** Component attribute accessor methods */" + NL; ! protected final String TEXT_29 = NL; ! protected final String TEXT_30 = " " + NL + "" + NL + "" + NL + " /** Facet implementation factory methods */" + NL + " "; ! protected final String TEXT_31 = NL; ! protected final String TEXT_32 = " " + NL + "" + NL + " /** Component callback methods */" + NL + " " + NL + " public void set_session_context(Components.SessionContext ctx) " + NL + " throws Components.CCMException" + NL + " {" + NL + " this.ctx = ("; ! protected final String TEXT_33 = "_Context)ctx; " + NL + " }" + NL + "" + NL + " public void ccm_activate() " + NL + " throws Components.CCMException" + NL + " {" + NL + " \ttry {" + NL + "\t\t\t// setup inner components \t"; ! protected final String TEXT_34 = NL; ! protected final String TEXT_35 = " " + NL + "" + NL + "\t\t\t// finish configuration \t"; ! protected final String TEXT_36 = NL + "\t\t\t"; ! protected final String TEXT_37 = "_.configuration_complete();"; ! protected final String TEXT_38 = NL + NL + "\t\t\tccm_activate_ok = true; " + NL + " \t} catch(Exception e) {" + NL + " \t\tthrow new Components.CCMException(e.getMessage()," + NL + " \t\t\tComponents.CCMExceptionReason.CREATE_ERROR);" + NL + " \t}" + NL + " }" + NL + "" + NL + " public void ccm_passivate() " + NL + " throws Components.CCMException" + NL + " {" + NL + " // Who calls this method?" + NL + " }" + NL + "" + NL + " public void ccm_remove() " + NL + " throws Components.CCMException" + NL + " {" + NL + " \ttry {"; ! protected final String TEXT_39 = NL + "\t\t\t"; ! protected final String TEXT_40 = "_.remove();"; ! protected final String TEXT_41 = NL + "\t\t} catch(Exception e) {" + NL + " \t\tthrow new Components.CCMException(e.getMessage()," + NL + " \t\t\tComponents.CCMExceptionReason.REMOVE_ERROR);" + NL + "\t\t} " + NL + " }" + NL + "}"; ! protected final String TEXT_42 = NL; public String generate(Object argument) *************** *** 122,125 **** --- 128,161 ---- stringBuffer.append(TEXT_18); + for(Iterator i=component.getAssemblyDynamicProvide(); i.hasNext();) + { + + stringBuffer.append(TEXT_19); + stringBuffer.append(i.next().toString()); + + } + + stringBuffer.append(TEXT_20); + + for(Iterator i=component.getAssemblyDynamicConnect(); i.hasNext();) + { + + stringBuffer.append(TEXT_21); + stringBuffer.append(i.next().toString()); + + } + + stringBuffer.append(TEXT_22); + + for(Iterator i=component.getAssemblyDynamicDisconnect(); i.hasNext();) + { + + stringBuffer.append(TEXT_23); + stringBuffer.append(i.next().toString()); + + } + + stringBuffer.append(TEXT_24); + for(Iterator i = component.getSupports().iterator(); i.hasNext();) { *************** *** 129,133 **** AttributeDef attr = (AttributeDef)j.next(); ! stringBuffer.append(TEXT_19); stringBuffer.append(attr.generateApplicationImplementation()); --- 165,169 ---- AttributeDef attr = (AttributeDef)j.next(); ! stringBuffer.append(TEXT_25); stringBuffer.append(attr.generateApplicationImplementation()); *************** *** 135,139 **** } ! stringBuffer.append(TEXT_20); for(Iterator i = component.getSupports().iterator(); i.hasNext();) --- 171,175 ---- } ! stringBuffer.append(TEXT_26); for(Iterator i = component.getSupports().iterator(); i.hasNext();) *************** *** 144,148 **** OperationDef op = (OperationDef)j.next(); ! stringBuffer.append(TEXT_21); stringBuffer.append(op.generateApplicationImplementation()); --- 180,184 ---- OperationDef op = (OperationDef)j.next(); ! stringBuffer.append(TEXT_27); stringBuffer.append(op.generateApplicationImplementation()); *************** *** 150,154 **** } ! stringBuffer.append(TEXT_22); for(Iterator i = component.getAttributes().iterator(); i.hasNext();) --- 186,190 ---- } ! stringBuffer.append(TEXT_28); for(Iterator i = component.getAttributes().iterator(); i.hasNext();) *************** *** 156,165 **** AttributeDef attr = (AttributeDef)i.next(); ! stringBuffer.append(TEXT_23); stringBuffer.append(attr.generateAssemblyImplementation(component.getAssemblyAttributeTarget(attr.getIdentifier()))); } ! stringBuffer.append(TEXT_24); for(Iterator i = component.getFacet().iterator(); i.hasNext();) --- 192,201 ---- AttributeDef attr = (AttributeDef)i.next(); ! stringBuffer.append(TEXT_29); stringBuffer.append(attr.generateAssemblyImplementation(component.getAssemblyAttributeTarget(attr.getIdentifier()))); } ! stringBuffer.append(TEXT_30); for(Iterator i = component.getFacet().iterator(); i.hasNext();) *************** *** 167,211 **** ProvidesDef provides = (ProvidesDef)i.next(); ! stringBuffer.append(TEXT_25); stringBuffer.append(provides.generateGetMethodAssemblyImplementation()); } ! stringBuffer.append(TEXT_26); stringBuffer.append(component.generateCcmIdentifier()); ! stringBuffer.append(TEXT_27); ! for(Iterator i=component.getAssemblyAttributeSetup(); i.hasNext();) { ! stringBuffer.append(TEXT_28); stringBuffer.append(i.next().toString()); } ! stringBuffer.append(TEXT_29); for (String key : component.getAssemblyLocalComponents().keySet()) { ! stringBuffer.append(TEXT_30); stringBuffer.append(key); ! stringBuffer.append(TEXT_31); } ! stringBuffer.append(TEXT_32); for (String key : component.getAssemblyLocalComponents().keySet()) { ! stringBuffer.append(TEXT_33); stringBuffer.append(key); ! stringBuffer.append(TEXT_34); } ! stringBuffer.append(TEXT_35); ! stringBuffer.append(TEXT_36); return stringBuffer.toString(); } --- 203,247 ---- ProvidesDef provides = (ProvidesDef)i.next(); ! stringBuffer.append(TEXT_31); stringBuffer.append(provides.generateGetMethodAssemblyImplementation()); } ! stringBuffer.append(TEXT_32); stringBuffer.append(component.generateCcmIdentifier()); ! stringBuffer.append(TEXT_33); ! for(Iterator i=component.getAssemblyActivate(); i.hasNext();) { ! stringBuffer.append(TEXT_34); stringBuffer.append(i.next().toString()); } ! stringBuffer.append(TEXT_35); for (String key : component.getAssemblyLocalComponents().keySet()) { ! stringBuffer.append(TEXT_36); stringBuffer.append(key); ! stringBuffer.append(TEXT_37); } ! stringBuffer.append(TEXT_38); for (String key : component.getAssemblyLocalComponents().keySet()) { ! stringBuffer.append(TEXT_39); stringBuffer.append(key); ! stringBuffer.append(TEXT_40); } ! stringBuffer.append(TEXT_41); ! stringBuffer.append(TEXT_42); return stringBuffer.toString(); } Index: ProvidesDefGetMethodAssemblyImplementationTemplate.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/ProvidesDefGetMethodAssemblyImplementationTemplate.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ProvidesDefGetMethodAssemblyImplementationTemplate.java 27 Feb 2007 08:28:15 -0000 1.4 --- ProvidesDefGetMethodAssemblyImplementationTemplate.java 21 Mar 2007 12:29:51 -0000 1.5 *************** *** 20,31 **** protected final String TEXT_4 = "_;" + NL + "" + NL + " public "; protected final String TEXT_5 = " get_"; ! protected final String TEXT_6 = "()" + NL + " {" + NL + " \t"; ! protected final String TEXT_7 = "_ = new "; ! protected final String TEXT_8 = "."; ! protected final String TEXT_9 = "Impl(this);" + NL + " \tif(ccm_activate_ok) {" + NL + " \t\t"; ! protected final String TEXT_10 = "_.target = "; ! protected final String TEXT_11 = ";" + NL + " \t}" + NL + " \treturn "; ! protected final String TEXT_12 = "_;" + NL + " }"; ! protected final String TEXT_13 = NL; public String generate(Object argument) --- 20,30 ---- protected final String TEXT_4 = "_;" + NL + "" + NL + " public "; protected final String TEXT_5 = " get_"; ! protected final String TEXT_6 = "()" + NL + " {" + NL + " \tif("; ! protected final String TEXT_7 = "_ == null)" + NL + " \t\t"; ! protected final String TEXT_8 = "_ = new "; ! protected final String TEXT_9 = "."; ! protected final String TEXT_10 = "Impl(this);" + NL + " \treturn "; ! protected final String TEXT_11 = "_;" + NL + " }"; ! protected final String TEXT_12 = NL; public String generate(Object argument) *************** *** 49,64 **** stringBuffer.append(provides.getIdentifier()); stringBuffer.append(TEXT_7); - stringBuffer.append(provides.generateJavaNamespace()); - stringBuffer.append(TEXT_8); - stringBuffer.append(provides.getComponent().getIdentifier()); stringBuffer.append(provides.getIdentifier()); stringBuffer.append(TEXT_9); stringBuffer.append(provides.getIdentifier()); stringBuffer.append(TEXT_10); - stringBuffer.append(provides.getComponent().getAssemblyInitFacetTargetValue(provides)); - stringBuffer.append(TEXT_11); stringBuffer.append(provides.getIdentifier()); stringBuffer.append(TEXT_12); - stringBuffer.append(TEXT_13); return stringBuffer.toString(); } --- 48,61 ---- stringBuffer.append(provides.getIdentifier()); stringBuffer.append(TEXT_7); stringBuffer.append(provides.getIdentifier()); + stringBuffer.append(TEXT_8); + stringBuffer.append(provides.generateJavaNamespace()); stringBuffer.append(TEXT_9); + stringBuffer.append(provides.getComponent().getIdentifier()); stringBuffer.append(provides.getIdentifier()); stringBuffer.append(TEXT_10); stringBuffer.append(provides.getIdentifier()); + stringBuffer.append(TEXT_11); stringBuffer.append(TEXT_12); return stringBuffer.toString(); } Index: ProvidesDefEquivalentMethodAdapterLocalTemplate.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/ProvidesDefEquivalentMethodAdapterLocalTemplate.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ProvidesDefEquivalentMethodAdapterLocalTemplate.java 20 Mar 2007 14:05:21 -0000 1.4 --- ProvidesDefEquivalentMethodAdapterLocalTemplate.java 21 Mar 2007 12:29:52 -0000 1.5 *************** *** 18,23 **** protected final String TEXT_2 = " provide_"; protected final String TEXT_3 = "()" + NL + " {" + NL + " logger.fine(\"\");" + NL + " if("; ! protected final String TEXT_4 = "FacetAdapter == null)" + NL + " {" + NL + " \tif(delegator!=null)" + NL + " \t{" + NL + " \t\tObject o = delegator.provide(\""; ! protected final String TEXT_5 = "\");" + NL + " \t\tif(o!=null)" + NL + " \t\t{" + NL + " \t\t\t"; protected final String TEXT_6 = "FacetAdapter =" + NL + " \t\t\t\t("; protected final String TEXT_7 = ")o;" + NL + " \t\t\treturn "; --- 18,23 ---- protected final String TEXT_2 = " provide_"; protected final String TEXT_3 = "()" + NL + " {" + NL + " logger.fine(\"\");" + NL + " if("; ! protected final String TEXT_4 = "FacetAdapter == null)" + NL + " {" + NL + " \tif(delegator!=null)" + NL + " \t{" + NL + " \t\tObject o;" + NL + " \t\ttry {" + NL + " \t\t\to = delegator.provide(\""; ! protected final String TEXT_5 = "\");" + NL + " \t\t} catch(Components.InvalidName e) {" + NL + " \t\t\tthrow new RuntimeException(\"internal error: \"+e.getMessage());" + NL + " \t\t}" + NL + " \t\tif(o!=null)" + NL + " \t\t{" + NL + " \t\t\t"; protected final String TEXT_6 = "FacetAdapter =" + NL + " \t\t\t\t("; protected final String TEXT_7 = ")o;" + NL + " \t\t\treturn "; |
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/jet In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12972/src/ccmtools/generator/java/templates/jet Modified Files: ProvidesDefEquivalentMethodAdapterLocal.jet ComponentDefAssemblyClass.jet ProvidesDefGetMethodAssemplyImplementation.jet Log Message: Java Assemblies: new design Index: ComponentDefAssemblyClass.jet =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/jet/ComponentDefAssemblyClass.jet,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ComponentDefAssemblyClass.jet 20 Mar 2007 10:55:59 -0000 1.10 --- ComponentDefAssemblyClass.jet 21 Mar 2007 12:29:51 -0000 1.11 *************** *** 21,25 **** */ public class <%=component.getIdentifier()%>Impl ! implements <%=component.generateCcmIdentifier()%> { /** Supported interface attribute variables */ --- 21,25 ---- */ public class <%=component.getIdentifier()%>Impl ! implements <%=component.generateCcmIdentifier()%>, Components.ComponentDelegator { /** Supported interface attribute variables */ *************** *** 82,85 **** --- 82,133 ---- } } + + + /* + * Components.ComponentDelegator implementation + */ + + public Object provide( String name ) throws Components.InvalidName + { + <% + for(Iterator i=component.getAssemblyDynamicProvide(); i.hasNext();) + { + %> + <%=i.next().toString()%> + <% + } + %> + throw new Components.InvalidName("unknown facet: "+name); + } + + public Components.Cookie connect( String name, Object connection ) + throws Components.InvalidName, Components.InvalidConnection, + Components.AlreadyConnected, Components.ExceededConnectionLimit + { + <% + for(Iterator i=component.getAssemblyDynamicConnect(); i.hasNext();) + { + %> + <%=i.next().toString()%> + <% + } + %> + throw new Components.InvalidName("unknown receptacle: "+name); + } + + public void disconnect( String name, Components.Cookie ck ) + throws Components.InvalidName, Components.InvalidConnection, + Components.CookieRequired, Components.NoConnection + { + <% + for(Iterator i=component.getAssemblyDynamicDisconnect(); i.hasNext();) + { + %> + <%=i.next().toString()%> + <% + } + %> + throw new Components.InvalidName("unknown receptacle: "+name); + } *************** *** 161,165 **** // setup inner components <% ! for(Iterator i=component.getAssemblyAttributeSetup(); i.hasNext();) { %> --- 209,213 ---- // setup inner components <% ! for(Iterator i=component.getAssemblyActivate(); i.hasNext();) { %> *************** *** 181,185 **** ccm_activate_ok = true; } catch(Exception e) { ! throw new Components.CCMException(e.getMessage(), Components.CCMExceptionReason.CREATE_ERROR); } } --- 229,234 ---- ccm_activate_ok = true; } catch(Exception e) { ! throw new Components.CCMException(e.getMessage(), ! Components.CCMExceptionReason.CREATE_ERROR); } } *************** *** 204,208 **** %> } catch(Exception e) { ! throw new Components.CCMException(e.getMessage(), Components.CCMExceptionReason.REMOVE_ERROR); } } --- 253,258 ---- %> } catch(Exception e) { ! throw new Components.CCMException(e.getMessage(), ! Components.CCMExceptionReason.REMOVE_ERROR); } } Index: ProvidesDefEquivalentMethodAdapterLocal.jet =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/jet/ProvidesDefEquivalentMethodAdapterLocal.jet,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ProvidesDefEquivalentMethodAdapterLocal.jet 20 Mar 2007 14:05:21 -0000 1.3 --- ProvidesDefEquivalentMethodAdapterLocal.jet 21 Mar 2007 12:29:51 -0000 1.4 *************** *** 12,16 **** if(delegator!=null) { ! Object o = delegator.provide("<%=provides.getIdentifier()%>"); if(o!=null) { --- 12,21 ---- if(delegator!=null) { ! Object o; ! try { ! o = delegator.provide("<%=provides.getIdentifier()%>"); ! } catch(Components.InvalidName e) { ! throw new RuntimeException("internal error: "+e.getMessage()); ! } if(o!=null) { Index: ProvidesDefGetMethodAssemplyImplementation.jet =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/jet/ProvidesDefGetMethodAssemplyImplementation.jet,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ProvidesDefGetMethodAssemplyImplementation.jet 27 Feb 2007 08:28:16 -0000 1.4 --- ProvidesDefGetMethodAssemplyImplementation.jet 21 Mar 2007 12:29:51 -0000 1.5 *************** *** 11,18 **** public <%=provides.getInterface().generateAbsoluteJavaCcmName()%> get_<%=provides.getIdentifier()%>() { ! <%=provides.getIdentifier()%>_ = new <%=provides.generateJavaNamespace()%>.<%=provides.getComponent().getIdentifier()%><%=provides.getIdentifier()%>Impl(this); ! if(ccm_activate_ok) { ! <%=provides.getIdentifier()%>_.target = <%=provides.getComponent().getAssemblyInitFacetTargetValue(provides)%>; ! } return <%=provides.getIdentifier()%>_; } --- 11,16 ---- public <%=provides.getInterface().generateAbsoluteJavaCcmName()%> get_<%=provides.getIdentifier()%>() { ! if(<%=provides.getIdentifier()%>_ == null) ! <%=provides.getIdentifier()%>_ = new <%=provides.generateJavaNamespace()%>.<%=provides.getComponent().getIdentifier()%><%=provides.getIdentifier()%>Impl(this); return <%=provides.getIdentifier()%>_; } |
From: Robert L. <rle...@us...> - 2007-03-21 12:28:59
|
Update of /cvsroot/ccmtools/java-environment/src/Components In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12535/src/Components Modified Files: ComponentDelegator.java Log Message: Java Assemblies: new design Index: ComponentDelegator.java =================================================================== RCS file: /cvsroot/ccmtools/java-environment/src/Components/ComponentDelegator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ComponentDelegator.java 20 Mar 2007 14:06:13 -0000 1.1 --- ComponentDelegator.java 21 Mar 2007 12:28:55 -0000 1.2 *************** *** 20,26 **** * * @param name name of the facet ! * @return facet adapter (or null if the facet is unknown) */ ! Object provide( String name ); /** --- 20,27 ---- * * @param name name of the facet ! * @return facet adapter (or null if the facet is not supported) ! * @throws InvalidName if a facet of that name is not known */ ! Object provide( String name ) throws InvalidName; /** *************** *** 29,33 **** * @param name name of the receptacle * @param connection the facet ! * @return cookie for multiple receptacles; null for single receptacles */ Cookie connect( String name, Object connection ) throws InvalidName, InvalidConnection, --- 30,34 ---- * @param name name of the receptacle * @param connection the facet ! * @return cookie for multiple receptacles */ Cookie connect( String name, Object connection ) throws InvalidName, InvalidConnection, |
From: Robert L. <rle...@us...> - 2007-03-21 12:21:09
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv9451/src/ccmtools/generator/java/templates Modified Files: UsesDefReceptacleConnectMethodAdapterLocalTemplate.java Log Message: bug fix: wrong return value with multiple receptacles Index: UsesDefReceptacleConnectMethodAdapterLocalTemplate.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/UsesDefReceptacleConnectMethodAdapterLocalTemplate.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** UsesDefReceptacleConnectMethodAdapterLocalTemplate.java 20 Mar 2007 10:56:02 -0000 1.5 --- UsesDefReceptacleConnectMethodAdapterLocalTemplate.java 21 Mar 2007 12:21:05 -0000 1.6 *************** *** 16,23 **** protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; protected final String TEXT_1 = " else if(name.equals(\""; ! protected final String TEXT_2 = "\"))" + NL + " {" + NL + " connect_"; ! protected final String TEXT_3 = "(("; ! protected final String TEXT_4 = ") obj);" + NL + " return new Components.CookieImpl();" + NL + " }"; ! protected final String TEXT_5 = NL; public String generate(Object argument) --- 16,28 ---- protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; protected final String TEXT_1 = " else if(name.equals(\""; ! protected final String TEXT_2 = "\"))" + NL + " {"; ! protected final String TEXT_3 = NL + " return connect_"; ! protected final String TEXT_4 = "(("; ! protected final String TEXT_5 = ") obj);"; ! protected final String TEXT_6 = NL + " connect_"; ! protected final String TEXT_7 = "(("; ! protected final String TEXT_8 = ") obj);" + NL + " return new Components.CookieImpl();"; ! protected final String TEXT_9 = NL + " }"; ! protected final String TEXT_10 = NL; public String generate(Object argument) *************** *** 28,36 **** stringBuffer.append(uses.getIdentifier()); stringBuffer.append(TEXT_2); ! stringBuffer.append(uses.getIdentifier()); stringBuffer.append(TEXT_3); ! stringBuffer.append(uses.getInterface().generateAbsoluteJavaName()); stringBuffer.append(TEXT_4); stringBuffer.append(TEXT_5); return stringBuffer.toString(); } --- 33,51 ---- stringBuffer.append(uses.getIdentifier()); stringBuffer.append(TEXT_2); ! if(uses.isMultiple()) { stringBuffer.append(TEXT_3); ! stringBuffer.append(uses.getIdentifier()); stringBuffer.append(TEXT_4); + stringBuffer.append(uses.getInterface().generateAbsoluteJavaName()); stringBuffer.append(TEXT_5); + } else { + stringBuffer.append(TEXT_6); + stringBuffer.append(uses.getIdentifier()); + stringBuffer.append(TEXT_7); + stringBuffer.append(uses.getInterface().generateAbsoluteJavaName()); + stringBuffer.append(TEXT_8); + } + stringBuffer.append(TEXT_9); + stringBuffer.append(TEXT_10); return stringBuffer.toString(); } |
From: Robert L. <rle...@us...> - 2007-03-21 12:19:06
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/jet In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8707/src/ccmtools/generator/java/templates/jet Modified Files: UsesDefReceptacleConnectMethodAdapterLocal.jet Log Message: bug fix: wrong return value with multiple receptacles Index: UsesDefReceptacleConnectMethodAdapterLocal.jet =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/jet/UsesDefReceptacleConnectMethodAdapterLocal.jet,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** UsesDefReceptacleConnectMethodAdapterLocal.jet 20 Mar 2007 10:55:59 -0000 1.4 --- UsesDefReceptacleConnectMethodAdapterLocal.jet 21 Mar 2007 12:19:00 -0000 1.5 *************** *** 6,10 **** --- 6,14 ---- else if(name.equals("<%=uses.getIdentifier()%>")) { + <% if(uses.isMultiple()) { %> + return connect_<%=uses.getIdentifier()%>((<%=uses.getInterface().generateAbsoluteJavaName()%>) obj); + <% } else { %> connect_<%=uses.getIdentifier()%>((<%=uses.getInterface().generateAbsoluteJavaName()%>) obj); return new Components.CookieImpl(); + <% } %> } |