#include <CeylanObjectChannel.h>
Public Types | |
enum | TextOutputFormat { rawText, html } |
Defines what text output formats for TextDisplayable instances are available. More... | |
Public Member Functions | |
ObjectChannel (const std::string &channelName) | |
Creates a named Log channel. | |
virtual | ~ObjectChannel () throw () |
Basic virtual destructor. | |
virtual void | addMessage (LogMessage &message, bool check=true) |
Add a new Log message to this channel. | |
virtual ObjectIdentifier & | getObjectIdentifier () const |
Returns this ObjectChannel's Object identifier. | |
virtual const std::string | toString (Ceylan::VerbosityLevels level=Ceylan::high) const |
Returns a user-friendly description of the state of this object. | |
virtual const std::string | getName () const |
Returns this channel's name. | |
virtual MessageCount | getMessageCount () const |
Returns the number of messages this channel currently gathered. | |
Static Public Member Functions | |
static const std::string | ToString (std::list< TextDisplayable * > displayables, Ceylan::VerbosityLevels level=Ceylan::high) |
Returns a user-friendly description of this list of pointers to text displayable instances. | |
static TextOutputFormat | GetOutputFormat () |
Returns the current overall text format to be used by TextDisplayable instances. | |
static void | SetOutputFormat (TextOutputFormat newOutputFormat) |
Sets the current overall text format to be used by TextDisplayable instances. | |
Protected Attributes | |
ObjectIdentifier * | _linkedObjectID |
This is the identifier of the Ceylan object this ObjectChannel corresponds to. | |
std::string | _name |
This channel's name. | |
std::list< LogMessage * > | _messages |
Chronologically-ordered set of messages for this Log channel. | |
Static Protected Attributes | |
static TextOutputFormat | _OutputFormat = rawText |
The text format to be used currently by TextDisplayable instances. | |
Private Member Functions | |
ObjectChannel (const ObjectChannel &source) | |
Copy constructor made private to ensure that it will be never called. | |
ObjectChannel & | operator= (const ObjectChannel &source) |
Assignment operator made private to ensure that it will be never called. |
Each ObjectChannel owns an ObjectIdentifier that matches the one of its corresponding Ceylan object.
Definition at line 63 of file CeylanObjectChannel.h.
enum Ceylan::TextDisplayable::TextOutputFormat [inherited] |
Defines what text output formats for TextDisplayable instances are available.
Definition at line 124 of file CeylanTextDisplayable.h.
ObjectChannel::ObjectChannel | ( | const std::string & | channelName | ) | [explicit] |
Creates a named Log channel.
channelName | is the name of the channel carried by the log message from which this ObjectChannel is spawned. |
LogException | if the creation failed. |
Definition at line 50 of file CeylanObjectChannel.cc.
References _linkedObjectID, Ceylan::Log::LogChannel::_name, CEYLAN_LOG, dataUtils::e, Ceylan::Log::ObjectIdentifier::generateFromChannelName(), Ceylan::Log::ObjectIdentifier::toString(), Ceylan::Exception::toString(), and Ceylan::toString().
ObjectChannel::~ObjectChannel | ( | ) | throw () [virtual] |
Basic virtual destructor.
Definition at line 80 of file CeylanObjectChannel.cc.
References _linkedObjectID, Ceylan::Log::LogChannel::_messages, Ceylan::Log::LogChannel::_name, CEYLAN_LOG, and Ceylan::toString().
Ceylan::Log::ObjectChannel::ObjectChannel | ( | const ObjectChannel & | source | ) | [private] |
Copy constructor made private to ensure that it will be never called.
The compiler should complain whenever this undefined constructor is called, implicitly or not.
void ObjectChannel::addMessage | ( | LogMessage & | message, | |
bool | check = true | |||
) | [virtual] |
Add a new Log message to this channel.
message | the log message to record. | |
check | if true, raises a LogException if this added message's channel does not match this channel. |
this method overrides the LogChannel one, so that the protocol prefix is taken into account when matching the message's channel name and this channel name.
LogException | if the operation failed. |
Reimplemented from Ceylan::Log::LogChannel.
Definition at line 116 of file CeylanObjectChannel.cc.
References Ceylan::Log::LogChannel::_messages, Ceylan::Log::LogChannel::_name, Ceylan::Log::LogMessage::getChannelName(), and Ceylan::Log::Loggable::GetEmbeddedChannelName().
Referenced by Ceylan::Log::LogAggregator::createLoggableChannelFrom(), and Ceylan::Log::LogAggregator::storeObjectMessage().
LogChannel::MessageCount LogChannel::getMessageCount | ( | ) | const [virtual, inherited] |
Returns the number of messages this channel currently gathered.
Definition at line 129 of file CeylanLogChannel.cc.
References Ceylan::Log::LogChannel::_messages.
const string LogChannel::getName | ( | ) | const [virtual, inherited] |
Returns this channel's name.
Definition at line 120 of file CeylanLogChannel.cc.
References Ceylan::Log::LogChannel::_name.
Referenced by Ceylan::Log::LogAggregator::findObjectChannel(), Ceylan::Log::LogAggregator::removeChannel(), Ceylan::Log::LogAggregator::transferChannel(), Ceylan::Log::LogAggregatorHTML::write(), and Ceylan::Log::LogAggregatorHTML::WriteChannelHeader().
ObjectIdentifier & ObjectChannel::getObjectIdentifier | ( | ) | const [virtual] |
Returns this ObjectChannel's Object identifier.
LogException | if the operation failed. |
Definition at line 137 of file CeylanObjectChannel.cc.
References _linkedObjectID.
TextDisplayable::TextOutputFormat TextDisplayable::GetOutputFormat | ( | ) | [static, inherited] |
Returns the current overall text format to be used by TextDisplayable instances.
Definition at line 63 of file CeylanTextDisplayable.cc.
References Ceylan::TextDisplayable::_OutputFormat.
Referenced by Ceylan::formatStringList(), Ceylan::formatStringMap(), Ceylan::XML::XMLMarkup::toString(), Ceylan::Maths::Linear::Vector3::toString(), Ceylan::Maths::Linear::Vector2::toString(), Ceylan::Maths::Linear::Tripoint::toString(), Ceylan::Module::toString(), Ceylan::Maths::Linear::Matrix3::toString(), Ceylan::Maths::Linear::Matrix2::toString(), Ceylan::Maths::Linear::HomogeneousMatrix3::toString(), and Ceylan::Maths::Linear::Bipoint::toString().
ObjectChannel& Ceylan::Log::ObjectChannel::operator= | ( | const ObjectChannel & | source | ) | [private] |
Assignment operator made private to ensure that it will be never called.
The compiler should complain whenever this undefined operator is called, implicitly or not.
void TextDisplayable::SetOutputFormat | ( | TextOutputFormat | newOutputFormat | ) | [static, inherited] |
Sets the current overall text format to be used by TextDisplayable instances.
newOutputFormat | the new output format. |
Definition at line 72 of file CeylanTextDisplayable.cc.
References Ceylan::TextDisplayable::_OutputFormat.
Referenced by Ceylan::Log::LogHolder::LogHolder().
const std::string TextDisplayable::ToString | ( | std::list< TextDisplayable * > | displayables, | |
Ceylan::VerbosityLevels | level = Ceylan::high | |||
) | [static, inherited] |
Returns a user-friendly description of this list of pointers to text displayable instances.
displayables | a list of pointers to TextDisplayable instances/ | |
level | the requested verbosity level. |
Definition at line 45 of file CeylanTextDisplayable.cc.
References Ceylan::formatStringList().
const string ObjectChannel::toString | ( | Ceylan::VerbosityLevels | level = Ceylan::high |
) | const [virtual] |
Returns a user-friendly description of the state of this object.
level | the requested verbosity level. |
Reimplemented from Ceylan::Log::LogChannel.
Definition at line 150 of file CeylanObjectChannel.cc.
References Ceylan::Log::LogChannel::_messages, Ceylan::Log::LogChannel::_name, CEYLAN_LOG, Ceylan::formatStringList(), Ceylan::low, and Ceylan::toString().
This is the identifier of the Ceylan object this ObjectChannel corresponds to.
Definition at line 146 of file CeylanObjectChannel.h.
Referenced by getObjectIdentifier(), ObjectChannel(), and ~ObjectChannel().
std::list<LogMessage *> Ceylan::Log::LogChannel::_messages [protected, inherited] |
Chronologically-ordered set of messages for this Log channel.
Definition at line 183 of file CeylanLogChannel.h.
Referenced by addMessage(), Ceylan::Log::LogChannel::addMessage(), Ceylan::Log::LogChannel::getMessageCount(), toString(), Ceylan::Log::LogChannel::toString(), Ceylan::Log::LogAggregator::transferChannel(), Ceylan::Log::LogAggregatorHTML::write(), Ceylan::Log::LogChannel::~LogChannel(), and ~ObjectChannel().
std::string Ceylan::Log::LogChannel::_name [protected, inherited] |
This channel's name.
Definition at line 165 of file CeylanLogChannel.h.
Referenced by addMessage(), Ceylan::Log::LogChannel::addMessage(), Ceylan::Log::LogChannel::getName(), ObjectChannel(), toString(), Ceylan::Log::LogChannel::toString(), Ceylan::Log::LogChannel::~LogChannel(), and ~ObjectChannel().
TextDisplayable::TextOutputFormat TextDisplayable::_OutputFormat = rawText [static, protected, inherited] |
The text format to be used currently by TextDisplayable instances.
Definition at line 158 of file CeylanTextDisplayable.h.
Referenced by Ceylan::TextDisplayable::GetOutputFormat(), and Ceylan::TextDisplayable::SetOutputFormat().