# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLNET::CNetDisplayer Class Reference

Net Displayer. More...

#include <net_displayer.h>

Inheritance diagram for NLNET::CNetDisplayer:

NLMISC::IDisplayer List of all members.

Public Methods

 CNetDisplayer (bool autoConnect=true)
 Constructor. More...

void setLogServer (const CInetAddress &logServerAddr)
 Sets logging server address. More...

void setLogServer (CCallbackClient *server)
 Sets logging server with an already connected server. More...

bool connected ()
 Returns true if the displayer is connected to a Logging Service. More...

virtual ~CNetDisplayer ()
 Destructor. More...


Protected Methods

virtual void doDisplay (const NLMISC::TDisplayInfo &args, const char *message)
 Sends the string to the logging server. More...

void findAndConnect ()
 Find the server (using the NS) and connect. More...


Private Attributes

CInetAddress _ServerAddr
CCallbackClient_Server
bool _ServerAllocated

Detailed Description

Net Displayer.

Sends the strings to a logger server (LOGS). How to log information (for debugging purpose) ?

Bug:
When nlerror is called in a catch block, a connected NetDisplayer becomes an IDisplayer => pure virtual call
Author:
Olivier Cado , Nevrax France
Date:
2000

Definition at line 45 of file net_displayer.h.


Constructor & Destructor Documentation

NLNET::CNetDisplayer::CNetDisplayer bool    autoConnect = true
 

Constructor.

Definition at line 48 of file net_displayer.cpp.

References findAndConnect.

NLNET::CNetDisplayer::~CNetDisplayer   [virtual]
 

Destructor.

Definition at line 108 of file net_displayer.cpp.

References _Server.


Member Function Documentation

bool NLNET::CNetDisplayer::connected   [inline]
 

Returns true if the displayer is connected to a Logging Service.

Definition at line 62 of file net_displayer.h.

References _Server.

virtual void NLNET::CNetDisplayer::doDisplay const NLMISC::TDisplayInfo   args,
const char *    message
[protected, virtual]
 

Sends the string to the logging server.

Warning:
If not connected, tries to connect to the logging server each call. It can slow down your program a lot.

void NLNET::CNetDisplayer::findAndConnect   [protected]
 

Find the server (using the NS) and connect.

Definition at line 58 of file net_displayer.cpp.

References _Server, _ServerAllocated, and nldebug.

Referenced by CNetDisplayer.

void NLNET::CNetDisplayer::setLogServer CCallbackClient   server
 

Sets logging server with an already connected server.

Definition at line 97 of file net_displayer.cpp.

References _Server.

void NLNET::CNetDisplayer::setLogServer const CInetAddress   logServerAddr
 

Sets logging server address.

Call this method from outside only if you want to use a LOGS not registered within the NS. It does nothing if the displayer is already connected to a server.

Definition at line 75 of file net_displayer.cpp.

References _Server, _ServerAddr, and _ServerAllocated.


Member Data Documentation

CCallbackClient* NLNET::CNetDisplayer::_Server [private]
 

Definition at line 81 of file net_displayer.h.

Referenced by connected, findAndConnect, setLogServer, and ~CNetDisplayer.

CInetAddress NLNET::CNetDisplayer::_ServerAddr [private]
 

Definition at line 79 of file net_displayer.h.

Referenced by setLogServer.

bool NLNET::CNetDisplayer::_ServerAllocated [private]
 

Definition at line 82 of file net_displayer.h.

Referenced by findAndConnect, and setLogServer.


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