Kaydet (Commit) a2016848 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Remove comment noise

Change-Id: I7794e40e07520c1e504b1167aa64cf24819271f2
üst 4ac13fb7
......@@ -25,59 +25,26 @@
namespace framework{
/*-************************************************************************************************************
@short implement a guard to support non breakable transactions
@descr If you wish to support non breakable method calls without locking any mutex, rw-lock or
something like that - you should use this guard implementation.
Initialize it at first in your method and don't release it till end of your function!
Your "transaction" is registered in ctor and automatically released in dtor.
Use set/get of working mode to enable/disable further transactions.
It's possible too, to enable automatically throwing of some exceptions for illegal
transaction requests ... e.g. interface call for already disposed objects.
@attention To prevent us against wrong using, the default ctor, copy ctor and the =operator are marked private!
@devstatus draft
*//*-*************************************************************************************************************/
class TransactionGuard : private boost::noncopyable
{
// public methods
public:
/*-****************************************************************************************************
@short ctors
@descr Use these ctor methods to initialize the guard right.
Given reference must be valid - otherwise crashes could occur!
@attention It's not necessary to lock any mutex here! Because a ctor should not be called
from different threads at the same time ... this class use no refcount mechanism!
@param "rManager" reference to transaction manager for using to register a request
@param "eMode" enable/disable throwing of exceptions for rejected calls
*//*-*****************************************************************************************************/
inline TransactionGuard( TransactionManager& rManager, EExceptionMode eMode )
: m_pManager( &rManager )
{
m_pManager->registerTransaction( eMode );
}
/*-************************************************************************************************************
@short dtor
@descr We must release the transaction manager and can forget his pointer.
*//*-*************************************************************************************************************/
inline ~TransactionGuard()
{
m_pManager->unregisterTransaction();
}
private:
TransactionManager* m_pManager;
};
TransactionManager* m_pManager; /// pointer to safed transaction manager
}; // class TransactionGuard
} // namespace framework
}
#endif // INCLUDED_FRAMEWORK_INC_THREADHELP_TRANSACTIONGUARD_HXX
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment