ircproxy  The Ultimate Cyborg

debug_ostream_operators.h File Reference


Detailed Description

This file contains the declaration of debug related ostream inserters.

Definition in file debug_ostream_operators.h.

#include <sys/time.h>
#include <regex.h>
#include <iosfwd>
#include <utility>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, Application const &application)
 Print debug info for Application instance application.
std::ostream & operator<< (std::ostream &os, Server const &server)
 Print debug info for Server instance server.
std::ostream & operator<< (std::ostream &os, Network const &network)
 Print debug info for Network instance network.
std::ostream & operator<< (std::ostream &os, MessageIn const &msg)
 Print debug info for MessageIn instance msg.
std::ostream & operator<< (std::ostream &os, ClientMessageIn const &msg)
 Print debug info for ClientMessageIn instance msg.
std::ostream & operator<< (std::ostream &os, ServerMessageIn const &msg)
 Print debug info for ServerMessageIn instance msg.
std::ostream & operator<< (std::ostream &os, UserAnswerRequestData const &request_data)
 Print debug info for UserAnswerRequestData instance request_data.
std::ostream & operator<< (std::ostream &os, UserAnswer const &answer)
 Print debug info for UserAnswer instance answer.
std::ostream & operator<< (std::ostream &os, UserAnswerEventRequestBase const &request)
 Print debug info for UserAnswerEventRequestBase instance request.
std::ostream & operator<< (std::ostream &os, Identity const &identity)
 Print debug info for Identity instance identity.
std::ostream & operator<< (std::ostream &os, IdentityReference const &identity_reference)
 Print debug info for IdentityReference instance identity_reference.
std::ostream & operator<< (std::ostream &os, Authentication const &authentication)
 Print debug info for Authentication instance authentication.
std::ostream & operator<< (std::ostream &os, Channel const &channel)
 Print debug info for Channel instance channel.
std::ostream & operator<< (std::ostream &os, Nick const &nick)
 Print debug info for Nick instance nick.
std::ostream & operator<< (std::ostream &os, ClientSession const &client_session)
 Print debug info for ClientSession instance client_session.
std::ostream & operator<< (std::ostream &os, QuestionTarget const &question_target)
 Print debug info for QuestionTarget instance question_target.
std::ostream & operator<< (std::ostream &os, NoticeTarget const &notice_target)
 Print debug info for NoticeTarget instance notice_target.
std::ostream & operator<< (std::ostream &os, ServerSession const &server_session)
 Print debug info for ServerSession instance server_session.
std::ostream & operator<< (std::ostream &os, Target const &target)
 Print debug info for Target instance target.
std::ostream & operator<< (std::ostream &os, DestructEventRequestData const &request_data)
 Print debug info for DestructEventRequestData instance request_data.
std::ostream & operator<< (std::ostream &os, ServerConnection const &server_connection)
 Print debug info for ServerConnection instance server_connection.
std::ostream & operator<< (std::ostream &os, MessageOutData const &data)
 Print debug info for MessageOutData instance data.
std::ostream & operator<< (std::ostream &os, MessageOut const &message)
 Print debug info for MessageOut instance message.
std::ostream & operator<< (std::ostream &os, Priority const &priority)
 Print debug info for Priority instance priority.
std::ostream & operator<< (std::ostream &os, timeval const &time)
 Print debug info for timeval instance time.
std::ostream & operator<< (std::ostream &os, regex_t const &regex)
 Print debug info for regex_t instance regex.
std::ostream & operator<< (std::ostream &os, Matcher const &matcher)
 Print debug info for Matcher instance matcher.
std::ostream & operator<< (std::ostream &os, MatchRequestList const &match_request_list)
 Print debug info for MatchRequestList instance match_request_list.
std::ostream & operator<< (std::ostream &os, MatchRequest const &match_request)
 Print debug info for MatchRequest instance match_request.
std::ostream & operator<< (std::ostream &os, MatcherEventType const &event_type)
 Print debug info for MatcherEventType instance event_type.
std::ostream & operator<< (std::ostream &os, Prefix const &prefix)
 Print debug info for Prefix instance prefix.
std::ostream & operator<< (std::ostream &os, PseudoMessageEventRequestData const &request_data)
 Print debug info for PseudoMessageEventRequestData instance request_data.
std::ostream & operator<< (std::ostream &os, Member const &member)
 Print debug info for Member instance member.
std::ostream & operator<< (std::ostream &os, WhoOptions const &who_options)
 Print debug info for WhoOptions instance who_options.
std::ostream & operator<< (std::ostream &os, WhoRequest const &who_request)
 Print debug info for WhoRequest instance who_request.
std::ostream & operator<< (std::ostream &os, SignalType const &signal)
 Print debug info for SignalType instance signal.
std::ostream & operator<< (std::ostream &os, ServerVersion const &server_version)
 Print debug info for ServerVersion instance server_version.
std::ostream & operator<< (std::ostream &os, AuthState const &auth_state)
 Print debug info for AuthState instance auth_state.
template<typename T>
std::ostream & operator<< (std::ostream &os, boost::shared_ptr< T > const &data)
 Print debug info for boost::shared_ptr<T>.
template<typename T>
std::ostream & operator<< (std::ostream &os, boost::weak_ptr< T > const &data)
 Print debug info for boost::weak_ptr<T>.
template<typename T1, typename T2>
std::ostream & operator<< (std::ostream &os, std::pair< T1, T2 > const &data)
 Print debug info for std::pair<> instance data.
template<typename T1, typename T2, typename T3>
std::ostream & operator<< (std::ostream &os, std::map< T1, T2, T3 > const &data)
 Print a whole map.


Function Documentation

std::ostream& operator<< ( std::ostream &  os,
Application const &   
)

Print debug info for Application instance application.

Definition at line 193 of file debug_ostream_operators.cc.

00194 {
00195   return os << "(application)";
00196 }

std::ostream& operator<< ( std::ostream &  os,
Server const &  server 
)

Print debug info for Server instance server.

Definition at line 216 of file debug_ostream_operators.cc.

References Server::get_irc_name(), Server::hostname(), Server::last_connection_event(), and Server::ports().

00217 {
00218   os << "{hostname:" << server.hostname() <<
00219         ", irc_name:" << server.get_irc_name() <<
00220         ", ports:{";
00221   Server::ports_type::const_iterator iter = server.ports().begin();
00222   if (iter != server.ports().end())
00223   {
00224     os << *iter;
00225     while (++iter != server.ports().end())
00226       os << ", " << *iter;
00227   }
00228   os << "}, last_connection_event:" << server.last_connection_event();
00229   return os << '}';
00230 }

std::ostream& operator<< ( std::ostream &  os,
Network const &  network 
)

Print debug info for Network instance network.

Definition at line 199 of file debug_ostream_operators.cc.

References Network::domain(), Network::has_domain(), Network::name(), and Network::servers().

00200 {
00201   os << "{name:" << network.name();
00202   if (network.has_domain())
00203     os << ", domain:" << network.domain();
00204   os << ", servers:{";
00205   Network::servers_type::const_iterator iter = network.servers().begin();
00206   if (iter != network.servers().end())
00207   {
00208     os << *iter;
00209     while (++iter != network.servers().end())
00210       os << ", " << *iter;
00211   }
00212   return os << "}}";
00213 }

std::ostream& operator<< ( std::ostream &  os,
MessageIn const &  msg 
)

Print debug info for MessageIn instance msg.

Definition at line 233 of file debug_ostream_operators.cc.

References MessageIn::command_part(), MessageIn::has_prefix(), MessageIn::key(), MessageIn::params(), MessageIn::prefix_part(), and MessageIn::uninitialized().

00234 {
00235   os << '{';
00236   if (msg.uninitialized())
00237     return os << "<uninitialized>}";
00238   if (msg.has_prefix())
00239     os << "prefix:\"" << libcwd::buf2str(msg.prefix_part().start(), msg.prefix_part().len()) << "\", ";
00240   if (msg.command_part().start())
00241     os << "command:\"" <<
00242         libcwd::buf2str(msg.command_part().start(), msg.command_part().len()) << "\" [key:" << msg.key() << "]";
00243   os << ", params:{";
00244   MessageIn::params_type::const_iterator iter = msg.params().begin();
00245   if (iter != msg.params().end())
00246   {
00247     os << *iter;
00248     while(++iter != msg.params().end())
00249       os << ", " << *iter;
00250   }
00251   return os << "}}";
00252 }

std::ostream& operator<< ( std::ostream &  os,
ClientMessageIn const &  msg 
)

Print debug info for ClientMessageIn instance msg.

Definition at line 255 of file debug_ostream_operators.cc.

References ClientMessageIn::client_session().

00256 {
00257   return os << "{client_session:" << msg.client_session() <<
00258      "; MessageIn:" << *static_cast<MessageIn const*>(&msg) << '}';
00259 }

std::ostream& operator<< ( std::ostream &  os,
ServerMessageIn const &  msg 
)

Print debug info for ServerMessageIn instance msg.

Definition at line 262 of file debug_ostream_operators.cc.

References ServerMessageIn::server_session().

00263 {
00264   return os << "{server_session:" << msg.server_session() <<
00265      "; MessageIn:" << *static_cast<MessageIn const*>(&msg) << '}';
00266 }

std::ostream& operator<< ( std::ostream &  os,
UserAnswerRequestData const &  request_data 
)

Print debug info for UserAnswerRequestData instance request_data.

Definition at line 269 of file debug_ostream_operators.cc.

References UserAnswerRequestData::client_session(), and UserAnswerRequestData::question().

00270 {
00271   return os << '{' << "question:\"" << request_data.question() << "\" [client_session:" << request_data.client_session() << "]}";
00272 }

std::ostream& operator<< ( std::ostream &  os,
UserAnswer const &  answer 
)

Print debug info for UserAnswer instance answer.

Write UserAnswer answer to os.

Print debug info for UserAnswer instance answer.

Write UserAnswer answer to os.

Definition at line 275 of file debug_ostream_operators.cc.

References UserAnswer::M_answer, UserAnswer::M_client_session, and UserAnswer::M_target_name.

00276 {
00277   os << '{' << "answer:\"" << answer.M_answer;
00278   os << "\", client_session:" << answer.M_client_session;
00279   os << ", target:\"" << answer.M_target_name;
00280   os << "\"}";
00281   return os;
00282 }

std::ostream& operator<< ( std::ostream &  os,
UserAnswerEventRequestBase const &  request 
)

Print debug info for UserAnswerEventRequestBase instance request.

Write UserAnswerEventRequestBase request to os.

Print debug info for UserAnswerEventRequestBase instance request.

Write UserAnswerEventRequestBase request to os.

Definition at line 285 of file debug_ostream_operators.cc.

References UserAnswerEventRequestBase::M_request_data, and UserAnswerEventRequestBase::M_target.

00286 {
00287   os << "{request_data:" << request.M_request_data;
00288   if (request.M_target.get())
00289     os << ", target:" << *request.M_target.get();
00290   return os << '}';
00291 }

std::ostream& operator<< ( std::ostream &  os,
Identity const &  identity 
)

Print debug info for Identity instance identity.

For debugging purposes. Write a Identity to os.

Definition at line 294 of file debug_ostream_operators.cc.

References Identity::M_authentication, Identity::M_authpass, Identity::M_client_session, Identity::M_hostname, Identity::M_ident, Identity::M_key, Identity::M_network_name, Identity::M_private_network, and Identity::M_real_name.

00295 {
00296   os << "{key:" << identity.M_key;
00297 #ifdef VERBOSE_IDENTITY
00298 #ifdef PRINT_AUTHENTICATION
00299   if (identity.M_authentication.get())
00300     os << ", authentication:" << *identity.M_authentication.get();
00301   os << ", server_connection:" << identity.M_server_connection;
00302   if (!identity.M_authpass.empty())
00303     os << ", authpass:" << identity.M_authpass;
00304 #endif
00305   os << ", private_network:" << identity.M_private_network;
00306   if (identity.M_client_session)
00307     os << ", client_session:" << *identity.M_client_session;
00308   os << ", ident:\"" << identity.M_ident <<
00309         "\", hostname:\"" << identity.M_hostname <<
00310         "\", real_name:\"" << identity.M_real_name <<
00311         "\", network_name:\"" << identity.M_network_name << '"';
00312 #endif
00313   os << '}';
00314   return os;
00315 }

std::ostream& operator<< ( std::ostream &  os,
IdentityReference const &  identity_reference 
)

Print debug info for IdentityReference instance identity_reference.

Definition at line 353 of file debug_ostream_operators.cc.

References IdentityReference::identity(), and Identity::key().

00354 {
00355   os << "[identity:" << identity_reference.identity().key() << ']';
00356   return os;
00357 }

std::ostream& operator<< ( std::ostream &  os,
Authentication const &  authentication 
)

Print debug info for Authentication instance authentication.

For debugging purposes. Write a Authentication to os.

Definition at line 360 of file debug_ostream_operators.cc.

References Authentication::M_ident, Authentication::M_realname, Authentication::M_received_nick, Authentication::M_received_user, Authentication::M_server_pass, and Authentication::M_service_pass.

00361 {
00362   os << "{server_pass:" <<
00363 #ifdef PRINT_AUTHENTICATION
00364       authentication.M_server_pass
00365 #else
00366       "***"
00367 #endif
00368       ;
00369   os << ", service_pass:" <<
00370 #ifdef PRINT_AUTHENTICATION
00371       authentication.M_service_pass
00372 #else
00373       "***"
00374 #endif
00375       ;
00376   os << ", ident:" << authentication.M_ident;
00377   os << ", realname:" << authentication.M_realname;
00378   os << ", received_nick:" << authentication.M_received_nick;
00379   os << ", received_user:" << authentication.M_received_user;
00380   return os << ' ' << static_cast<IdentityReference const&>(authentication) << '}';
00381 }

std::ostream& operator<< ( std::ostream &  os,
Channel const &  channel 
)

Print debug info for Channel instance channel.

Definition at line 384 of file debug_ostream_operators.cc.

00385 {
00386   os << "{Channel " << static_cast<Target const&>(channel);
00387   return os << '}';
00388 }

std::ostream& operator<< ( std::ostream &  os,
Nick const &  nick 
)

Print debug info for Nick instance nick.

Definition at line 391 of file debug_ostream_operators.cc.

00392 {
00393   os << "{Nick " << static_cast<Target const&>(nick);
00394   return os;
00395 }

std::ostream& operator<< ( std::ostream &  os,
ClientSession const &  client_session 
)

Print debug info for ClientSession instance client_session.

Definition at line 398 of file debug_ostream_operators.cc.

References IdentityReference::has_identity().

00399 {
00400   os << "{ClientSession ";
00401   if (client_session.has_identity())
00402     os << static_cast<IdentityReference const&>(client_session);
00403   else
00404     os << "with no Identity";
00405   return os << '}';
00406 }

std::ostream& operator<< ( std::ostream &  os,
QuestionTarget const &  question_target 
)

Print debug info for QuestionTarget instance question_target.

Definition at line 409 of file debug_ostream_operators.cc.

00410 {
00411   os << "{QuestionTarget " << static_cast<Target const&>(question_target) << '}'; 
00412   return os;
00413 }

std::ostream& operator<< ( std::ostream &  os,
NoticeTarget const &  notice_target 
)

Print debug info for NoticeTarget instance notice_target.

Definition at line 415 of file debug_ostream_operators.cc.

00416 {
00417   os << "{NoticeTarget " << static_cast<Target const&>(notice_target) << '}'; 
00418   return os;
00419 }

std::ostream& operator<< ( std::ostream &  os,
ServerSession const &  server_session 
)

Print debug info for ServerSession instance server_session.

Definition at line 422 of file debug_ostream_operators.cc.

00423 {
00424   os << "{ServerSession ";
00425   os << static_cast<IdentityReference const&>(server_session);
00426   return os << '}';
00427 }

std::ostream& operator<< ( std::ostream &  os,
Target const &  target 
)

Print debug info for Target instance target.

Definition at line 430 of file debug_ostream_operators.cc.

00431 {
00432   //os << "{serverside_name:\"" << target.serverside_name() << "\", clientside_name:\"" << target.clientside_name() << "\", network:" << target.network().name();
00433   os << "{FIXME";
00434   return os << '}';
00435 }

std::ostream& operator<< ( std::ostream &  os,
DestructEventRequestData const &  request_data 
)

Print debug info for DestructEventRequestData instance request_data.

std::ostream& operator<< ( std::ostream &  os,
ServerConnection const &  server_connection 
)

Print debug info for ServerConnection instance server_connection.

For debugging purposes. Write a ServerConnection to os.

Definition at line 318 of file debug_ostream_operators.cc.

References ServerConnection::connect_delay(), ServerConnection::has_server_session(), ServerConnection::is_connected(), ServerConnection::M_server, ServerConnection::reconnect(), ServerConnection::secondary_connection(), ServerConnection::server_session(), ServerConnection::state(), ServerConnection::timed_out(), and ServerConnection::timed_out_count().

00319 {
00320   os << "{server:";
00321   if (server_connection.M_server.get())
00322     os << *server_connection.M_server.get();
00323   else
00324     os << "<none>";
00325   os << "; server_session:";
00326   if (server_connection.has_server_session())
00327     os << server_connection.server_session();
00328   else
00329     os << "<NULL>";
00330   os << "; reconnect:";
00331   if (server_connection.reconnect())
00332     os << "true";
00333   else
00334     os << "false";
00335   os << "; connected:";
00336   if (server_connection.is_connected())
00337     os << "true";
00338   else
00339     os << "false";
00340   os << "; state:" << server_connection.state();
00341   os << "; connect_delay:" << server_connection.connect_delay();
00342   os << "; timed_out:";
00343   if (server_connection.timed_out())
00344     os << "true";
00345   else
00346     os << "false";
00347   os << "; timed_out_count:" << server_connection.timed_out_count();
00348   os << "; secondary_connection:" << server_connection.secondary_connection();
00349   return os << '}';
00350 }

std::ostream& operator<< ( std::ostream &  os,
MessageOutData const &  data 
)

Print debug info for MessageOutData instance data.

Definition at line 445 of file debug_ostream_operators.cc.

References MessageOutData::M_priority, and MessageOutData::M_tokens.

00446 {
00447   os << "{message:";
00448 #if 0
00449   for (std::vector<boost::shared_ptr<JustInTimeToken> >::const_iterator iter = data.M_tokens.begin(); iter != data.M_tokens.end(); ++iter)
00450   {
00451     std::string str1((*iter)->value(serverside));
00452     std::string str2((*iter)->value(clientside));
00453     if (str1 == str2)
00454       os << '{' << libcwd::buf2str(str1.data(), str1.length()) << '}';     
00455     else
00456       os << "{serverside:" << libcwd::buf2str(str1.data(), str1.length()) << ", clientside:" << libcwd::buf2str(str2.data(), str2.length()) << '}';
00457   }
00458 #else
00459   os << "FIXME";
00460 #endif
00461   os << "}, priority:" << data.M_priority;
00462   return os << '}';
00463 }

std::ostream& operator<< ( std::ostream &  os,
MessageOut const &  message 
)

Print debug info for MessageOut instance message.

For debugging purposes. Write a MessageOut to os.

Definition at line 466 of file debug_ostream_operators.cc.

References MessageOut::M_data.

00467 {
00468   os << "{data:" << *message.M_data;
00469   return os << '}';
00470 }

std::ostream& operator<< ( std::ostream &  os,
Priority const &  priority 
)

Print debug info for Priority instance priority.

Definition at line 473 of file debug_ostream_operators.cc.

00474 {
00475   // FIXME
00476   os << "{<priority>";
00477   return os << '}';
00478 }

std::ostream& operator<< ( std::ostream &  os,
timeval const &  time 
)

Print debug info for timeval instance time.

Definition at line 481 of file debug_ostream_operators.cc.

00482 {
00483   return os << "{tv_sec:" << time.tv_sec << ", tv_usec:" << time.tv_usec << '}';
00484 }

std::ostream& operator<< ( std::ostream &  os,
regex_t const &   
)

Print debug info for regex_t instance regex.

Definition at line 487 of file debug_ostream_operators.cc.

00488 {
00489   os << "{<compiled>";
00490   return os << '}';
00491 }

std::ostream& operator<< ( std::ostream &  os,
Matcher const &  matcher 
)

Print debug info for Matcher instance matcher.

Definition at line 519 of file debug_ostream_operators.cc.

References Matcher::print_on(), and Matcher::print_type_on().

00520 {
00521   os << '{';
00522   matcher.print_type_on(os);
00523   os << ' ';
00524   matcher.Matcher::print_on(os);
00525   os << ", ";
00526   matcher.print_on(os);
00527   return os << '}';
00528 }

std::ostream& operator<< ( std::ostream &  os,
MatchRequestList const &  match_request_list 
)

Print debug info for MatchRequestList instance match_request_list.

Definition at line 531 of file debug_ostream_operators.cc.

References debug::command_name(), MatchRequestList::M_command, and MatchRequestList::M_conditions.

00532 {
00533   os << "{command: ";
00534   if (match_request_list.M_command < 0)
00535     os << debug::command_name(match_request_list.M_command);
00536   else
00537     os << match_request_list.M_command;
00538   os << ", conditions:{";
00539   std::multiset<boost::shared_ptr<Matcher> >::const_iterator iter = match_request_list.M_conditions.begin();
00540   if (iter != match_request_list.M_conditions.end())
00541   {
00542     os << **iter;
00543     while(++iter != match_request_list.M_conditions.end())
00544       os << ", " << **iter;
00545   }
00546   return os << "}}";
00547 }

std::ostream& operator<< ( std::ostream &  os,
MatchRequest const &  match_request 
)

Print debug info for MatchRequest instance match_request.

Definition at line 550 of file debug_ostream_operators.cc.

References MatchRequest::match_request_list().

00551 {
00552   os << "{match_request_list:" << match_request.match_request_list();
00553   return os << '}';
00554 }

std::ostream& operator<< ( std::ostream &  os,
MatcherEventType const &  event_type 
)

Print debug info for MatcherEventType instance event_type.

Definition at line 557 of file debug_ostream_operators.cc.

References MatcherEventType::message().

00558 {
00559   os << "{message:" << event_type.message();
00560   return os << '}';
00561 }

std::ostream& operator<< ( std::ostream &  os,
Prefix const &  prefix 
)

Print debug info for Prefix instance prefix.

Definition at line 571 of file debug_ostream_operators.cc.

References Nick::data(), Prefix::empty(), NickData::hostname(), hostname_bit, NickData::initialized(), Prefix::nick(), Prefix::server_name(), NickData::username(), and username_bit.

00572 {
00573   os << '{';
00574   if (prefix.empty())
00575     os << "Empty Prefix";
00576   else if (!prefix.server_name().empty())
00577     os << prefix.server_name();
00578   else
00579   {
00580 #if 0
00581     if (prefix.nick()->serverside_name() == prefix.nick()->clientside_name())
00582       os << prefix.nick()->serverside_name();
00583     else
00584       os << "{serverside:" << prefix.nick()->serverside_name() << "; clientside:" << prefix.nick()->clientside_name() << '}';
00585 #else
00586     os << "FIXME";
00587 #endif
00588     os << '!';
00589     if ((prefix.nick()->data().initialized() & username_bit))
00590       os << prefix.nick()->data().username();
00591     else
00592       os << "<uninitialized>";
00593     os << '@';
00594     if ((prefix.nick()->data().initialized() & hostname_bit))
00595       os << prefix.nick()->data().hostname();
00596     else
00597       os << "<uninitialized>";
00598   }
00599   return os << '}';
00600 }

std::ostream& operator<< ( std::ostream &  os,
PseudoMessageEventRequestData const &  request_data 
)

Print debug info for PseudoMessageEventRequestData instance request_data.

Definition at line 438 of file debug_ostream_operators.cc.

00439 {
00440   os << "{PseudoMessageEventRequestData FIXME";
00441   return os << '}';
00442 }

std::ostream& operator<< ( std::ostream &  os,
Member const &  member 
)

Print debug info for Member instance member.

Definition at line 602 of file debug_ostream_operators.cc.

References Member::get_nick().

00603 {
00604   os << '{';
00605   os << "nick:" << member.get_nick();
00606   return os << '}';
00607 }

std::ostream& operator<< ( std::ostream &  os,
WhoOptions const &  who_options 
)

Print debug info for WhoOptions instance who_options.

Definition at line 609 of file debug_ostream_operators.cc.

References WhoOptions::str().

00610 {
00611   return os << options.str();
00612 }

std::ostream& operator<< ( std::ostream &  os,
WhoRequest const &  who_request 
)

Print debug info for WhoRequest instance who_request.

Definition at line 614 of file debug_ostream_operators.cc.

References WhoRequest::mask(), and WhoRequest::options().

00615 {
00616   return os << "{mask:" << who_request.mask() << "; options:" << who_request.options() << '}';
00617 }

std::ostream& operator<< ( std::ostream &  os,
SignalType const &  signal 
)

Print debug info for SignalType instance signal.

Definition at line 619 of file debug_ostream_operators.cc.

00620 {
00621   return os << "{sig:" << signal.get_signal() << "; count:" << signal.get_count() << '}';
00622 }

std::ostream& operator<< ( std::ostream &  os,
ServerVersion const &  server_version 
)

Print debug info for ServerVersion instance server_version.

Definition at line 624 of file debug_ostream_operators.cc.

00625 {
00626   return os << libcwd::cwprint(server_version);
00627 }

std::ostream& operator<< ( std::ostream &  os,
AuthState const &  auth_state 
)

Print debug info for AuthState instance auth_state.

Definition at line 629 of file debug_ostream_operators.cc.

00630 {
00631   return os << libcwd::cwprint(auth_state);
00632 }

template<typename T>
std::ostream& operator<< ( std::ostream &  os,
boost::shared_ptr< T > const &  data 
) [inline]

Print debug info for boost::shared_ptr<T>.

Definition at line 109 of file debug_ostream_operators.h.

00110 {
00111   os << "(boost::shared_ptr<" << libcwd::type_info_of<T>().demangled_name() << ">)({";
00112   if (data.get())
00113     os << *data;
00114   else
00115     os << "<NULL>";
00116   return os << "})";
00117 }

template<typename T>
std::ostream& operator<< ( std::ostream &  os,
boost::weak_ptr< T > const &  data 
) [inline]

Print debug info for boost::weak_ptr<T>.

Definition at line 121 of file debug_ostream_operators.h.

00122 {
00123   return os << "(boost::weak_ptr<" << libcwd::type_info_of<T>().demangled_name() << ">)({ " << *boost::shared_ptr<T>(data) << "})";
00124 }

template<typename T1, typename T2>
std::ostream& operator<< ( std::ostream &  os,
std::pair< T1, T2 > const &  data 
) [inline]

Print debug info for std::pair<> instance data.

Definition at line 128 of file debug_ostream_operators.h.

00129 {
00130   return os << "{first:" << data.first << ", second:" << data.second << '}';
00131 }

template<typename T1, typename T2, typename T3>
std::ostream& operator<< ( std::ostream &  os,
std::map< T1, T2, T3 > const &  data 
) [inline]

Print a whole map.

Definition at line 135 of file debug_ostream_operators.h.

00136 {
00137   os << "{map<" << libcwd::type_info_of<T1>().demangled_name() <<
00138       ", " << libcwd::type_info_of<T2>().demangled_name() <<
00139       ", " << libcwd::type_info_of<T3>().demangled_name() <<">:";
00140   typedef std::map<T1, T2, T3> map_type;
00141   for (typename map_type::const_iterator iter = data.begin(); iter != data.end(); ++iter)
00142     os << '{' << *iter << '}';
00143   return os << '}';
00144 }


Copyright © 2005-2007 Carlo Wood.  All rights reserved.