From: Robert L. <rle...@us...> - 2007-03-05 10:26:26
|
Update of /cvsroot/ccmtools/ccmtools/test/CppAssembly/prototype1/impl/space In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23100/test/CppAssembly/prototype1/impl/space Modified Files: Alien_impl.cc Alien_impl.h Added Files: Alien_Ap10_impl.h Alien_Ap10_impl.cc Log Message: new prototype --- NEW FILE: Alien_Ap10_impl.cc --- /** * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net/> * * ::World::CCM_Data facet class implementation. * * // TODO: WRITE YOUR DESCRIPTION HERE! * * @author * @version **/ #include <cassert> #include <iostream> #include "Alien_Ap10_impl.h" using namespace std; namespace Space { Alien_Ap10_impl::Alien_Ap10_impl( Alien_impl* component_impl) : component(component_impl) { // OPTIONAL : IMPLEMENT ME HERE ! } Alien_Ap10_impl::~Alien_Ap10_impl() { // OPTIONAL : IMPLEMENT ME HERE ! } long Alien_Ap10_impl::work(const std::string& text) throw(::Components::CCMException) { ::World::Data* facet = dynamic_cast< ::World::Data*>(target.ptr()); if(!facet) throw ::Components::CCMException(::Components::SYSTEM_ERROR); return facet->work(text); } } // /namespace Space --- NEW FILE: Alien_Ap10_impl.h --- /* * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net/> * * ::World::CCM_Data facet class definition. */ #ifndef __FACET__Space_Ap10__H__ #define __FACET__Space_Ap10__H__ #include <World/Data.h> #include "Alien_impl.h" namespace Space { class Alien_Ap10_impl : virtual public ::World::CCM_Data { public: friend class Alien_impl; protected: Alien_impl* component; ::Components::Object::SmartPtr target; public: Alien_Ap10_impl( Alien_impl* component_impl); virtual ~Alien_Ap10_impl(); virtual long work(const std::string& text) throw(::Components::CCMException); }; } // /namespace Space #endif // __FACET__Space_Ap10__H__ Index: Alien_impl.h =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppAssembly/prototype1/impl/space/Alien_impl.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Alien_impl.h 5 Mar 2007 09:21:22 -0000 1.5 --- Alien_impl.h 5 Mar 2007 10:26:20 -0000 1.6 *************** *** 30,33 **** --- 30,36 ---- ::wamas::platform::utils::SmartPtr< ::Components::CCMObject> inner_; + ::Components::Cookie Ar6a_; + ::Components::Cookie Ar6b_; + bool ccm_activate_ok; Index: Alien_impl.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppAssembly/prototype1/impl/space/Alien_impl.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Alien_impl.cc 5 Mar 2007 09:21:22 -0000 1.3 --- Alien_impl.cc 5 Mar 2007 10:26:20 -0000 1.4 *************** *** 41,45 **** return inner_->provide_facet("p1"); } ! // TODO } --- 41,49 ---- return inner_->provide_facet("p1"); } ! if(facet=="Ap10") ! { ! return ::Components::Object::SmartPtr(); ! } ! throw ::Components::InvalidName(); } *************** *** 51,55 **** return inner_->connect("r3", facet); } ! // TODO } --- 55,86 ---- return inner_->connect("r3", facet); } ! if(receptacle=="Ar4") ! { ! return inner_->connect("r4", facet); ! } ! if(receptacle=="Ar10") ! { ! Alien_Ap10_impl* impl = dynamic_cast<Alien_Ap10_impl*>(get_Ap10()); ! impl->target = facet; ! } ! if(receptacle=="Ar6a") ! { ! Ar6a_ = inner_->connect("r6", facet); ! return Ar6a_; ! } ! if(receptacle=="Ar6b") ! { ! Ar6b_ = inner_->connect("r6", facet); ! return Ar6a_; ! } ! if(receptacle=="Ar7a") ! { ! return inner_->connect("r7", facet); ! } ! if(receptacle=="Ar7b") ! { ! return inner_->connect("r7", facet); ! } ! throw ::Components::InvalidName(); } *************** *** 62,66 **** return; } ! // TODO } --- 93,127 ---- return; } ! if(receptacle=="Ar4") ! { ! inner_->disconnect("r4", cookie); ! return; ! } ! if(receptacle=="Ar10") ! { ! Alien_Ap10_impl* impl = dynamic_cast<Alien_Ap10_impl*>(get_Ap10()); ! impl->target.forget(); ! } ! if(receptacle=="Ar6a") ! { ! inner_->disconnect("r6", Ar6a_); ! return; ! } ! if(receptacle=="Ar6b") ! { ! inner_->disconnect("r6", Ar6b_); ! return; ! } ! if(receptacle=="Ar7a") ! { ! inner_->disconnect("r7", cookie); ! return; ! } ! if(receptacle=="Ar7b") ! { ! inner_->disconnect("r7", cookie); ! return; ! } ! throw ::Components::InvalidName(); } *************** *** 79,82 **** --- 140,145 ---- try { + inner_->connect("r2", inner_->provide_facet("p2")); + } catch(...) { throw Components::CCMException(Components::CREATE_ERROR); *************** *** 110,117 **** Alien_impl::get_Ap1() { ! Alien_Ap1_impl* facet = ! new Alien_Ap1_impl(this); ! Ap1_ = dynamic_cast< ::World::CCM_Data* >(facet); return Ap1_; } --- 173,183 ---- Alien_impl::get_Ap1() { ! if(!Ap1_) ! { ! Alien_Ap1_impl* facet = ! new Alien_Ap1_impl(this); ! Ap1_ = dynamic_cast< ::World::CCM_Data* >(facet); ! } return Ap1_; } *************** *** 124,131 **** Alien_impl::get_Ap10() { ! Alien_Ap10_impl* facet = ! new Alien_Ap10_impl(this); ! Ap10_ = dynamic_cast< ::World::CCM_Data* >(facet); return Ap10_; } --- 190,200 ---- Alien_impl::get_Ap10() { ! if(!Ap10_) ! { ! Alien_Ap10_impl* facet = ! new Alien_Ap10_impl(this); ! Ap10_ = dynamic_cast< ::World::CCM_Data* >(facet); ! } return Ap10_; } |