00001 00002 module Sct { 00003 00004 // CORBA interface to methods of Sct::RefCountServantBase. 00005 00006 // In your servant implementation you need to do three things: 00007 00008 // (1) make the servant derive from Sct::RefCountServantBase 00009 // and from IPCObject<POA_blah, ipc::single_thread> 00010 00011 // (2) make addRef() call Sct::RefCountServantBase::_sct_add_ref() 00012 // via the "this" ptr. 00013 00014 // (3) make removeRef() call Sct::RefCountServantBase::_sct_remove_ref() 00015 // via the "this" ptr. 00016 00017 // The Sct::RefCountServantBase object is created with a "count" of 1. 00018 // The count is incremented and decremented by calls to the methods below. 00019 // When the count reaches zero, Sct::RefCountServantBase::_sct_remove_ref() 00020 // calls Sct::RefCountServantBase::performCountEqualsZeroAction() which 00021 // you probably want to call this->_destroy() which is a method of IPCObject. 00022 00023 00024 module Corba { 00025 00026 interface RefCountServant { 00027 void addRef(); 00028 void removeRef(); 00029 }; 00030 00031 }; 00032 00033 };