|
From: Teiniker E. <tei...@us...> - 2007-01-18 09:31:58
|
Update of /cvsroot/ccmtools/ccmtools/doc/manual/HelloWorldExample In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv16354/doc/manual/HelloWorldExample Modified Files: HelloWorldExample.tex Added Files: .cvsignore Log Message: Changed manual to support new namespaces --- NEW FILE: .cvsignore --- HelloWorldExample.dvi Index: HelloWorldExample.tex =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/doc/manual/HelloWorldExample/HelloWorldExample.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HelloWorldExample.tex 30 Nov 2006 08:04:48 -0000 1.1 --- HelloWorldExample.tex 18 Jan 2007 09:31:55 -0000 1.2 *************** *** 88,92 **** CCM Tools generate the following file structure which represents a local component's implementation. ! Code contained in the {\tt CCM\_*} directories establishes the component's structure (= {\it component logic}), while code stored in the {\tt Server} directory represents the functional part of a component (= {\it business --- 88,92 ---- CCM Tools generate the following file structure which represents a local component's implementation. ! Code contained in the {\tt GEN\_*} directories establishes the component's structure (= {\it component logic}), while code stored in the {\tt Server} directory represents the functional part of a component (= {\it business *************** *** 99,104 **** |-- component | `-- Server ! | |-- CCM_world_ccm_local ! | |-- CCM_world_ccm_local_share | |-- ServerHome_impl.cc | |-- ServerHome_impl.h --- 99,104 ---- |-- component | `-- Server ! | |-- GEN_ccmtools_local_world ! | |-- GEN_ccmtools_local_world_share | |-- ServerHome_impl.cc | |-- ServerHome_impl.h *************** *** 107,114 **** | |-- Server_impl.cc | |-- Server_impl.h ! | `-- world_ccm_local_ServerHome_entry.h `-- interface ! |-- CCM_world_ccm_local ! `-- CCM_world_ccm_local_adapter \end{verbatim} \end{small} --- 107,114 ---- | |-- Server_impl.cc | |-- Server_impl.h ! | `-- world_ServerHome_entry.h `-- interface ! |-- GEN_ccmtools_local_world ! `-- GEN_world \end{verbatim} \end{small} *************** *** 124,128 **** std::string Server_hello_impl::sayHello() ! throw(Components::ccm::local::CCMException) { // TODO : IMPLEMENT ME HERE ! --- 124,128 ---- std::string Server_hello_impl::sayHello() ! throw(Components::CCMException) { // TODO : IMPLEMENT ME HERE ! *************** *** 142,146 **** server/component/server |-- test ! | `-- _check_world_ccm_local_Server.cc \end{verbatim} \end{small} --- 142,146 ---- server/component/server |-- test ! | `-- _check_world_Server.cc \end{verbatim} \end{small} *************** *** 148,152 **** \noindent The following client code snippets are stored in the ! {\tt \_check\_world\_ccm\_local\_Server.cc} file: \begin{small} \begin{verbatim} --- 148,152 ---- \noindent The following client code snippets are stored in the ! {\tt \_check\_world\_Server.cc} file: \begin{small} \begin{verbatim} *************** *** 154,176 **** #include <iostream> ! #include <wx/utils/debug.h> ! #include <wx/utils/smartptr.h> ! ! #include <Components/ccm/local/CCM.h> ! #include <ccm/local/HomeFinder.h> ! ! #include <world/ccm/local/Server_gen.h> ! #include <world/ccm/local/ServerHome_gen.h> using namespace std; ! using namespace wx::utils; ! using namespace world::ccm::local; int main(int argc, char *argv[]) { ! int error = 0; ! Components::ccm::local::HomeFinder* homeFinder = ! ccm::local::HomeFinder::Instance(); ! error = deploy_world_ccm_local_ServerHome("ServerHome"); if(error) { --- 154,166 ---- #include <iostream> ! #include <Components/ccmtools.h> ! #include <world/ServerHome_gen.h> using namespace std; ! using namespace world; int main(int argc, char *argv[]) { ! int error = deploy_world_ServerHome("ServerHome"); if(error) { *************** *** 181,190 **** try { ! SmartPtr<ServerHome> home( ! dynamic_cast<ServerHome*>( ! homeFinder->find_home_by_name("ServerHome").ptr())); ! SmartPtr<Server> component; ! SmartPtr<Hello> hello; component = home->create(); --- 171,182 ---- 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(); *************** *** 199,214 **** component->remove(); } ! catch(Components::ccm::local::Exception& e) { ! cout << "CCMTOOLS ERROR: " << e.what() << endl; return -1; } ! catch ( ... ) { ! cout << "UNKNOWN ERROR!" << endl; return -1; } ! error = undeploy_world_ccm_local_ServerHome("ServerHome"); if(error) { --- 191,206 ---- component->remove(); } ! catch(Components::Exception& e) { ! cerr << "CCMTOOLS ERROR: " << e.what() << endl; return -1; } ! catch(...) { ! cerr << "UNKNOWN ERROR!" << endl; return -1; } ! error = undeploy_world_ServerHome("ServerHome"); if(error) { *************** *** 217,221 **** } ! ccm::local::HomeFinder::destroy(); } \end{verbatim} --- 209,213 ---- } ! Components::HomeFinder::destroy(); } \end{verbatim} *************** *** 248,252 **** \begin{verbatim} sayHello(): Hello from Server component! ! PASS: hello_world_component_Server_test__check_world_ccm_local_Server ================== All 1 tests passed --- 240,244 ---- \begin{verbatim} sayHello(): Hello from Server component! ! PASS: hello_world_component_Server_test__check_world_Server ================== All 1 tests passed |