Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TAO_Debug_Msg_Emitter_Guard Class Reference

List of all members.

Public Methods

 TAO_Debug_Msg_Emitter_Guard (unsigned int debug_level, const char *msg)
 ~TAO_Debug_Msg_Emitter_Guard ()

Private Attributes

unsigned int which_level_
char * msg_

Static Private Attributes

const int MAGIC_LENGTH = 8

Constructor & Destructor Documentation

TAO_Debug_Msg_Emitter_Guard::TAO_Debug_Msg_Emitter_Guard unsigned int    debug_level,
const char *    msg
[inline]
 

Definition at line 19 of file GIOP_Message_State.cpp.

References ACE_DEBUG, LM_DEBUG, MAGIC_LENGTH, msg_, ACE_OS_String::strcat, ACE_OS_String::strcpy, ACE_OS_String::strlen, and which_level_.

00020     : which_level_(debug_level)
00021     {
00022       if (TAO_debug_level < this->which_level_)
00023         {
00024           msg_ = 0;
00025           return;
00026         }
00027       this->msg_ = new char[ACE_OS::strlen (msg) + MAGIC_LENGTH ];
00028       ACE_OS::strcpy (this->msg_, msg);
00029       ACE_OS::strcat (this->msg_, " begin\n");
00030       if (TAO_debug_level >= this->which_level_)
00031         ACE_DEBUG ((LM_DEBUG, this->msg_ ));
00032     }

TAO_Debug_Msg_Emitter_Guard::~TAO_Debug_Msg_Emitter_Guard   [inline]
 

Definition at line 34 of file GIOP_Message_State.cpp.

References ACE_DEBUG, LM_DEBUG, MAGIC_LENGTH, msg_, ACE_OS_String::strcpy, ACE_OS_String::strlen, and which_level_.

00035     {
00036       if (this->msg_)
00037         {
00038           if (TAO_debug_level >= this->which_level_)
00039             {
00040               char* begin_start =
00041                 this->msg_ + ACE_OS::strlen(this->msg_) - MAGIC_LENGTH + 1;
00042               ACE_OS::strcpy (begin_start, " end\n");
00043               ACE_DEBUG ((LM_DEBUG, this->msg_));
00044             }
00045           delete[] this->msg_;
00046         }
00047     }


Member Data Documentation

const int TAO_Debug_Msg_Emitter_Guard::MAGIC_LENGTH = 8 [static, private]
 

Definition at line 55 of file GIOP_Message_State.cpp.

Referenced by TAO_Debug_Msg_Emitter_Guard, and ~TAO_Debug_Msg_Emitter_Guard.

char* TAO_Debug_Msg_Emitter_Guard::msg_ [private]
 

Definition at line 52 of file GIOP_Message_State.cpp.

Referenced by TAO_Debug_Msg_Emitter_Guard, and ~TAO_Debug_Msg_Emitter_Guard.

unsigned int TAO_Debug_Msg_Emitter_Guard::which_level_ [private]
 

Definition at line 51 of file GIOP_Message_State.cpp.

Referenced by TAO_Debug_Msg_Emitter_Guard, and ~TAO_Debug_Msg_Emitter_Guard.


The documentation for this class was generated from the following file:
Generated on Mon Jun 16 15:13:39 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002