Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

/home/pauldt/projects/IDEA/IDEA-ALL/IDEA-DEV/Core/Utilities/Includes/LockTrace.hh

Go to the documentation of this file.
00001 // -*- Mode: C++ -*-
00002 //      CVS: $Id: LockTrace.hh,v 1.5 2005/12/30 22:06:06 rijsman Exp $
00003 //      Tag: $name$
00004 //     Info: $CVSROOT/Copyright.txt
00005 #ifndef UTILITIES_TRACE_LOCKING_MECHANISM
00006 #define UTILITIES_TRACE_LOCKING_MECHANISM
00007 
00008 // only if TRACE_LOCKS has been defined
00009 #ifdef TRACE_LOCKS
00010 
00011 #include "Singleton.hh"
00012 
00013 #include <ace/OS.h>
00014 #include <ace/Synch.h>
00015 #include <ace/Process_Mutex.h>
00016 #include <ace/Process_Semaphore.h>
00017 #include <ace/Thread_Manager.h>
00018 #include <ace/Singleton.h>
00019 
00020 #include <iostream>
00021 #include <fstream>
00022 
00023 namespace IDEA
00024 {
00042   class LockTrace:
00043     public Singleton<LockTrace>
00044   {
00045     friend class Singleton< LockTrace >;
00046   public:
00050     ~LockTrace();
00056     void lockInvoked( const std::string& locator, long lock );
00062     void lockAcquired( const std::string& locator, long lock );
00068     void unLockInvoked( const std::string& locator, long lock );
00074     void unLockReleased( const std::string& locator, long lock );
00075   private:
00079     LockTrace();
00084     void printTabs();
00088     static int m_Counter;
00092     std::fstream*  m_Stream;
00096     ACE_Thread_Mutex m_Mutex;
00097   };
00098 }
00099 
00100 #endif //TRACE_LOCKS
00101 
00102 #endif // UTILITIES_TRACE_LOCKING_MECHANISM
00103  

Contact information
© IDEA
Generated on Fri Feb 3 17:09:41 2006 for IDEA.