Template functor adapter for lock strategies used with ACE_Malloc_T. More...
#include <Malloc_T.h>
Public Member Functions | |
ACE_LOCK * | operator() (const ACE_TCHAR *myname) |
Template functor adapter for lock strategies used with ACE_Malloc_T.
This class acts as a factory for lock strategies that have various ctor signatures. If the lock strategy's ctor takes an ACE_TCHAR* as the first and only required parameter, it will just work. Otherwise use template specialization to create a version that matches the lock strategy's ctor signature. See ACE_Process_Semaphore and ACE_Thread_Semaphore for examples.
Definition at line 910 of file Malloc_T.h.
ACE_LOCK * ACE_Malloc_Lock_Adapter_T< ACE_LOCK >::operator() | ( | const ACE_TCHAR * | myname | ) |
Definition at line 1035 of file Malloc_T.cpp.
{ ACE_LOCK *p = 0; if (name == 0) ACE_NEW_RETURN (p, ACE_LOCK (name), 0); else ACE_NEW_RETURN (p, ACE_LOCK (ACE::basename (name, ACE_DIRECTORY_SEPARATOR_CHAR)), 0); return p; }