# 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

Inheritance graph
[legend]
Collaboration diagram for NLNET::CNetDisplayer:

Collaboration graph
[legend]
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
CCallbackClient_Server2
uint32 _ServerNumber

Detailed Description

Net Displayer.

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

Bugs and limitations:
When nlerror is called in a catch block, a connected NetDisplayer becomes an IDisplayer => pure virtual call
Author(s):
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 54 of file net_displayer.cpp.

NLNET::CNetDisplayer::~CNetDisplayer ( ) [virtual]
 

Destructor.

Definition at line 105 of file net_displayer.cpp.


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.

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.

Definition at line 117 of file net_displayer.cpp.

void NLNET::CNetDisplayer::findAndConnect ( ) [protected]
 

Find the server (using the NS) and connect.

Definition at line 64 of file net_displayer.cpp.

void NLNET::CNetDisplayer::setLogServer ( CCallbackClient * server )
 

Sets logging server with an already connected server.

Definition at line 93 of file net_displayer.cpp.

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 76 of file net_displayer.cpp.


Member Data Documentation

CCallbackClient NLNET::CNetDisplayer::_Server [private]
 

Definition at line 83 of file net_displayer.h.

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

Definition at line 84 of file net_displayer.h.

CInetAddress NLNET::CNetDisplayer::_ServerAddr [private]
 

Definition at line 82 of file net_displayer.h.

uint32 NLNET::CNetDisplayer::_ServerNumber [private]
 

Definition at line 85 of file net_displayer.h.


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