#include <DQM/TrackerCommon/interface/MessageDispatcher.h>
Public Member Functions | |
void | add (Message *new_message) |
void | add (Message *new_message) |
void | dispatchMessages (xgi::Output *out) |
void | dispatchMessages (xgi::Output *out) |
bool | hasAnyMessages () |
bool | hasAnyMessages () |
MessageDispatcher () | |
MessageDispatcher () | |
Private Attributes | |
std::vector< Message * > | undispatched |
std::vector< Message * > | undispatched |
Definition at line 38 of file MessageDispatcher.h.
MessageDispatcher::MessageDispatcher | ( | ) | [inline] |
MessageDispatcher::MessageDispatcher | ( | ) | [inline] |
Definition at line 51 of file MessageDispatcher.h.
References undispatched.
00052 { 00053 undispatched.push_back(new_message); 00054 }
Definition at line 51 of file MessageDispatcher.h.
References undispatched.
Referenced by WebInterface::sendMessage().
00052 { 00053 undispatched.push_back(new_message); 00054 }
void MessageDispatcher::dispatchMessages | ( | xgi::Output * | out | ) |
void MessageDispatcher::dispatchMessages | ( | xgi::Output * | out | ) |
Definition at line 11 of file MessageDispatcher.cc.
References lat::endl(), i, it, and undispatched.
Referenced by WebInterface::handleRequest().
00012 { 00013 out->getHTTPResponseHeader().addHeader("Content-Type", "text/xml"); 00014 00015 *out << "<?xml version=\"1.0\" ?>" << std::endl; 00016 00017 *out << "<Messages>" << std::endl; 00018 00019 int i = 1; 00020 std::vector<Message *>::iterator it; 00021 for (it = undispatched.begin(); it != undispatched.end(); it++) 00022 { 00023 *out << "<Message" << i << ">" << std::endl; 00024 00025 *out << "<Type>" << (*it)->getType() << "</Type>" << std::endl; 00026 *out << "<Title>" << (*it)->getTitle() << "</Title>" << std::endl; 00027 *out << "<Text>" << (*it)->getText() << "</Text>" << std::endl; 00028 00029 *out << "</Message" << i << ">" << std::endl; 00030 00031 i++; 00032 } 00033 00034 *out << "</Messages>" << std::endl; 00035 00036 undispatched.clear(); 00037 }
bool MessageDispatcher::hasAnyMessages | ( | ) | [inline] |
Definition at line 56 of file MessageDispatcher.h.
References undispatched.
00057 { 00058 return (!undispatched.empty()); 00059 }
bool MessageDispatcher::hasAnyMessages | ( | ) | [inline] |
Definition at line 56 of file MessageDispatcher.h.
References undispatched.
Referenced by WebInterface::handleRequest().
00057 { 00058 return (!undispatched.empty()); 00059 }
std::vector<Message *> MessageDispatcher::undispatched [private] |
Definition at line 43 of file MessageDispatcher.h.
std::vector<Message *> MessageDispatcher::undispatched [private] |
Definition at line 43 of file MessageDispatcher.h.
Referenced by add(), dispatchMessages(), and hasAnyMessages().