OpenDDS  Snapshot(2023/04/07-19:43)
Public Member Functions | Private Attributes | List of all members
EntryExit Class Reference

#include <EntryExit.h>

Public Member Functions

 EntryExit (const char *className, const char *methodName, const void *addr, unsigned recurse_level=0)
 
 ~EntryExit ()
 

Private Attributes

char class_ [26]
 
char method_ [26]
 
unsigned recurse_level_
 
const void * addr_
 
bool addr_set_
 

Detailed Description

Definition at line 75 of file EntryExit.h.

Constructor & Destructor Documentation

◆ EntryExit()

EntryExit::EntryExit ( const char *  className,
const char *  methodName,
const void *  addr,
unsigned  recurse_level = 0 
)
inline

Definition at line 77 of file EntryExit.h.

References ACE_DEBUG, addr_, addr_set_, class_, LM_DEBUG, method_, recurse_level_, ACE_OS::strncpy(), and OpenDDS::DCPS::Transport_debug_level.

79  : recurse_level_(recurse_level)
80  , addr_(addr)
81  , addr_set_(true) {
82 
83  ACE_UNUSED_ARG(addr_set_);
84 
85  // No processing unless debugging turned on.
87  class_[25] = method_[25] = 0;
88 
89  ACE_OS::strncpy(this->class_, className, 25);
90  ACE_OS::strncpy(this->method_, methodName, 25);
91 
92  if (this->recurse_level_ == 0) {
93  ACE_DEBUG((LM_DEBUG, "(%P|%t) DBG: ENTRY: [%s::%s() ::%@]\n"
94  , this->class_, this->method_, this->addr_));
95 
96  } else {
97  ACE_DEBUG((LM_DEBUG, "(%P|%t) DBG: ENTRY: [%s::%s() ::%@ :%d]\n"
98  , this->class_, this->method_, this->addr_
99  , this->recurse_level_));
100  }
101  }
102  };
#define ACE_DEBUG(X)
char method_[26]
Definition: EntryExit.h:121
OpenDDS_Dcps_Export unsigned int Transport_debug_level
Transport Logging verbosity level.
Definition: debug.cpp:25
char class_[26]
Definition: EntryExit.h:116
unsigned recurse_level_
Definition: EntryExit.h:122
bool addr_set_
Definition: EntryExit.h:124
const void * addr_
Definition: EntryExit.h:123
char * strncpy(char *s, const char *t, size_t len)

◆ ~EntryExit()

EntryExit::~EntryExit ( )
inline

Definition at line 104 of file EntryExit.h.

References ACE_DEBUG, addr_, class_, LM_DEBUG, method_, recurse_level_, and OpenDDS::DCPS::Transport_debug_level.

104  {
106  if (this->recurse_level_ == 0) {
107  ACE_DEBUG((LM_DEBUG, "(%P|%t) DBG: EXIT : [%s::%s() ::%@]\n"
108  , this->class_, this->method_, this->addr_));
109 
110  } else {
111  ACE_DEBUG((LM_DEBUG, "(%P|%t) DBG: EXIT : [%s::%s() ::%@:%d]\n"
112  , this->class_, this->method_, this->addr_
113  , this->recurse_level_));
114  }
115  }
116  };
#define ACE_DEBUG(X)
char method_[26]
Definition: EntryExit.h:121
OpenDDS_Dcps_Export unsigned int Transport_debug_level
Transport Logging verbosity level.
Definition: debug.cpp:25
char class_[26]
Definition: EntryExit.h:116
unsigned recurse_level_
Definition: EntryExit.h:122
const void * addr_
Definition: EntryExit.h:123

Member Data Documentation

◆ addr_

const void* EntryExit::addr_
private

Definition at line 123 of file EntryExit.h.

Referenced by EntryExit(), and ~EntryExit().

◆ addr_set_

bool EntryExit::addr_set_
private

Definition at line 124 of file EntryExit.h.

Referenced by EntryExit().

◆ class_

char EntryExit::class_[26]
private

Definition at line 116 of file EntryExit.h.

Referenced by EntryExit(), and ~EntryExit().

◆ method_

char EntryExit::method_[26]
private

Definition at line 121 of file EntryExit.h.

Referenced by EntryExit(), and ~EntryExit().

◆ recurse_level_

unsigned EntryExit::recurse_level_
private

Definition at line 122 of file EntryExit.h.

Referenced by EntryExit(), and ~EntryExit().


The documentation for this class was generated from the following file: