|
From: Teiniker E. <tei...@us...> - 2007-01-17 17:44:22
|
Update of /cvsroot/ccmtools/ccmtools/test/tutorial/HelloWorld/impl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17273/test/tutorial/HelloWorld/impl Modified Files: Server_hello_impl.cc Added Files: _check_world_Server.cc Removed Files: _check_world_ccm_local_Server.cc Log Message: Changed manual examples to support the new namespaces. --- NEW FILE: _check_world_Server.cc --- /*** * 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. ***/ #include <cassert> #include <iostream> #include <Components/ccmtools.h> #include <world/ServerHome_gen.h> using namespace std; using namespace world; int main(int argc, char *argv[]) { cout << ">>>> Start Test Client: " << __FILE__ << endl; int error = 0; error = deploy_world_ServerHome("ServerHome"); if(error) { cerr << "BOOTSTRAP ERROR: Can't deploy component homes!" << endl; return(error); } try { Components::HomeFinder* homeFinder = Components::HomeFinder::Instance(); ServerHome::SmartPtr home(dynamic_cast<ServerHome*>( homeFinder->find_home_by_name("ServerHome").ptr())); Server::SmartPtr component; Hello::SmartPtr hello; component = home->create(); hello = component->provide_hello(); component->configuration_complete(); string s = hello->sayHello(); cout << "sayHello(): " << s << endl; assert(s == "Hello from Server component!"); component->remove(); } catch(Components::HomeNotFound& e) { cerr << "DEPLOYMENT ERROR: can't find a home!" << endl; error = -1; } catch(Components::NotImplemented& e) { cerr << "DEPLOYMENT ERROR: function not implemented: " << e.what ( ) << endl; error = -1; } catch(Components::InvalidName& e) { cerr << "DEPLOYMENT ERROR: invalid name during connection: " << e.what ( ) << endl; error = -1; } catch ( ... ) { cerr << "DEPLOYMENT ERROR: there is something wrong!" << endl; error = -1; } error += undeploy_world_ServerHome("ServerHome"); if(error) { cerr << "TEARDOWN ERROR: Can't undeploy component homes!" << endl; return error; } Components::HomeFinder::destroy(); cout << ">>>> Stop Test Client: " << __FILE__ << endl; } Index: Server_hello_impl.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/tutorial/HelloWorld/impl/Server_hello_impl.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Server_hello_impl.cc 27 Nov 2006 21:13:19 -0000 1.3 --- Server_hello_impl.cc 17 Jan 2007 17:44:14 -0000 1.4 *************** *** 1,8 **** /** ! * This file was automatically generated by CCM Tools version 0.8.0 * <http://ccmtools.sourceforge.net/> * ! * world::ccm::local::CCM_Hello facet class implementation. * * // TODO: WRITE YOUR DESCRIPTION HERE! --- 1,8 ---- /** ! * This file was automatically generated by CCM Tools * <http://ccmtools.sourceforge.net/> * ! * world::Hello facet class implementation. * * // TODO: WRITE YOUR DESCRIPTION HERE! *************** *** 14,27 **** #include <cassert> #include <iostream> - #include <wx/utils/debug.h> #include "Server_hello_impl.h" - using namespace std; - using namespace wx::utils; namespace world { - namespace ccm { - namespace local { Server_hello_impl::Server_hello_impl(Server_impl* component_impl) --- 14,22 ---- *************** *** 38,47 **** std::string Server_hello_impl::sayHello() ! throw(::Components::ccm::local::CCMException) { return "Hello from Server component!"; } - } // /namespace local - } // /namespace ccm } // /namespace world --- 33,40 ---- std::string Server_hello_impl::sayHello() ! throw(Components::CCMException) { return "Hello from Server component!"; } } // /namespace world --- _check_world_ccm_local_Server.cc DELETED --- |