From: Robert L. <rle...@us...> - 2007-02-28 08:03:32
|
Update of /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23248/src/templates/CppLocalTemplates Modified Files: MUsesDefGetConnectionCtxImplDefinition MUsesDefAdapterDefinition MInterfaceDef MUsesDefGetCtxConnectionPrototype MUsesDefGetConnectionPrototypeVV MUsesDefAdapterVariable Log Message: bug fix: wrong use of local impl. interfaces Index: MUsesDefGetConnectionPrototypeVV =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MUsesDefGetConnectionPrototypeVV,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MUsesDefGetConnectionPrototypeVV 5 Jan 2007 14:17:25 -0000 1.6 --- MUsesDefGetConnectionPrototypeVV 28 Feb 2007 08:03:28 -0000 1.7 *************** *** 1,2 **** ! virtual %(CCMUsesType)s::SmartPtr get_connection_%(Identifier)s() = 0; --- 1,2 ---- ! virtual %(UsesType)s::SmartPtr get_connection_%(Identifier)s() = 0; Index: MUsesDefAdapterVariable =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MUsesDefAdapterVariable,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MUsesDefAdapterVariable 5 Jan 2007 14:17:25 -0000 1.7 --- MUsesDefAdapterVariable 28 Feb 2007 08:03:28 -0000 1.8 *************** *** 1,3 **** ! %(CCMUsesType)s::SmartPtr %(Identifier)s_receptacle; --- 1,3 ---- ! %(UsesType)s::SmartPtr %(Identifier)s_receptacle; Index: MUsesDefGetCtxConnectionPrototype =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MUsesDefGetCtxConnectionPrototype,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** MUsesDefGetCtxConnectionPrototype 5 Jan 2007 14:17:24 -0000 1.10 --- MUsesDefGetCtxConnectionPrototype 28 Feb 2007 08:03:28 -0000 1.11 *************** *** 1,3 **** ! %(CCMUsesType)s::SmartPtr get_connection_%(Identifier)s() throw(::Components::NoConnection); --- 1,3 ---- ! %(UsesType)s::SmartPtr get_connection_%(Identifier)s() throw(::Components::NoConnection); Index: MInterfaceDef =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MInterfaceDef,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** MInterfaceDef 26 Feb 2007 15:30:15 -0000 1.26 --- MInterfaceDef 28 Feb 2007 08:03:28 -0000 1.27 *************** *** 135,147 **** %(Identifier)sAdapter::%(Identifier)sAdapter() { - validConnection_ = false; - facet_ = NULL; } %(Identifier)sAdapter::%(Identifier)sAdapter(%(InterfaceCCMName)s* f) ! : facet_(f) { - validConnection_ = true; } --- 135,147 ---- %(Identifier)sAdapter::%(Identifier)sAdapter() + : facet_(NULL) + , validConnection_(false) { } %(Identifier)sAdapter::%(Identifier)sAdapter(%(InterfaceCCMName)s* f) ! : facet_(f) ! , validConnection_(f!=NULL) { } Index: MUsesDefAdapterDefinition =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MUsesDefAdapterDefinition,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MUsesDefAdapterDefinition 5 Jan 2007 14:17:25 -0000 1.11 --- MUsesDefAdapterDefinition 28 Feb 2007 08:03:28 -0000 1.12 *************** *** 11,16 **** throw ::Components::AlreadyConnected(); } ! %(Identifier)s_receptacle = %(CCMUsesType)s::SmartPtr( ! dynamic_cast< %(CCMUsesType)s* >(f.ptr())); } --- 11,15 ---- throw ::Components::AlreadyConnected(); } ! %(Identifier)s_receptacle = f; } *************** *** 28,32 **** } %(UsesType)s::SmartPtr f = %(Identifier)s_receptacle; ! %(Identifier)s_receptacle = %(CCMUsesType)s::SmartPtr(); return f; } --- 27,31 ---- } %(UsesType)s::SmartPtr f = %(Identifier)s_receptacle; ! %(Identifier)s_receptacle.forget(); return f; } *************** *** 40,44 **** throw ::Components::InvalidConnection(); } ! if(%(Identifier)s_receptacle == %(CCMUsesType)s::SmartPtr()) throw ::Components::NoConnection(); return %(Identifier)s_receptacle; --- 39,43 ---- throw ::Components::InvalidConnection(); } ! if(!%(Identifier)s_receptacle) throw ::Components::NoConnection(); return %(Identifier)s_receptacle; Index: MUsesDefGetConnectionCtxImplDefinition =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MUsesDefGetConnectionCtxImplDefinition,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MUsesDefGetConnectionCtxImplDefinition 5 Jan 2007 14:17:25 -0000 1.11 --- MUsesDefGetConnectionCtxImplDefinition 28 Feb 2007 08:03:28 -0000 1.12 *************** *** 1,9 **** ! %(CCMUsesType)s::SmartPtr CCM_%(ComponentType)s_Context_impl::get_connection_%(Identifier)s() throw(::Components::NoConnection) { ! %(UsesType)s::SmartPtr r = ! component_local_adapter->get_connection_%(Identifier)s(); ! return %(CCMUsesType)s::SmartPtr(dynamic_cast< %(CCMUsesType)s*>(r.ptr())); } --- 1,7 ---- ! %(UsesType)s::SmartPtr CCM_%(ComponentType)s_Context_impl::get_connection_%(Identifier)s() throw(::Components::NoConnection) { ! return component_local_adapter->get_connection_%(Identifier)s(); } |