Ceylan::TextDisplayable Class Reference

Interface that every Displayable able to show a textual representation of itself should implement. More...

#include <CeylanTextDisplayable.h>

Inheritance diagram for Ceylan::TextDisplayable:

Inheritance graph
[legend]
Collaboration diagram for Ceylan::TextDisplayable:

Collaboration graph
[legend]

List of all members.

Public Types

enum  TextOutputFormat { rawText, html }
 Defines what text output formats for TextDisplayable instances are available. More...

Public Member Functions

 TextDisplayable ()
 Do-nothing constructor.
virtual ~TextDisplayable () throw ()
 Do-nothing virtual destructor.
virtual const std::string toString (Ceylan::VerbosityLevels level=Ceylan::high) const =0
 Returns an user-friendly description of the state of this object.

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.

Static Protected Attributes

static TextOutputFormat _OutputFormat = rawText
 The text format to be used currently by TextDisplayable instances.


Detailed Description

Interface that every Displayable able to show a textual representation of itself should implement.

Note:
Copy constructor and assignment operator cannot be private, because some TextDisplayableinstances need to rely on their copy constructor, for example for operators returning them by value.

The output format (raw text or HTML format) is retrieved from overall settings, so that it can be easily chosen at runtime, for example thanks to the LogPlug.

See also:
Displayable.

Definition at line 59 of file CeylanTextDisplayable.h.


Member Enumeration Documentation

Defines what text output formats for TextDisplayable instances are available.

Enumerator:
rawText 
html 

Definition at line 124 of file CeylanTextDisplayable.h.


Constructor & Destructor Documentation

Ceylan::TextDisplayable::TextDisplayable (  )  [inline]

Do-nothing constructor.

Definition at line 68 of file CeylanTextDisplayable.h.

virtual Ceylan::TextDisplayable::~TextDisplayable (  )  throw () [inline, virtual]

Do-nothing virtual destructor.

Definition at line 75 of file CeylanTextDisplayable.h.


Member Function Documentation

TextDisplayable::TextOutputFormat TextDisplayable::GetOutputFormat (  )  [static]

void TextDisplayable::SetOutputFormat ( TextOutputFormat  newOutputFormat  )  [static]

Sets the current overall text format to be used by TextDisplayable instances.

Parameters:
newOutputFormat the new output format.

Definition at line 72 of file CeylanTextDisplayable.cc.

References _OutputFormat.

Referenced by Ceylan::Log::LogHolder::LogHolder().

const std::string TextDisplayable::ToString ( std::list< TextDisplayable * >  displayables,
Ceylan::VerbosityLevels  level = Ceylan::high 
) [static]

Returns a user-friendly description of this list of pointers to text displayable instances.

Parameters:
displayables a list of pointers to TextDisplayable instances/
level the requested verbosity level.
Note:
Text output format is determined from overall settings.
See also:
toString, Ceylan::VerbosityLevels

Definition at line 45 of file CeylanTextDisplayable.cc.

References Ceylan::formatStringList().

virtual const std::string Ceylan::TextDisplayable::toString ( Ceylan::VerbosityLevels  level = Ceylan::high  )  const [pure virtual]

Returns an user-friendly description of the state of this object.

Parameters:
level the requested verbosity level.
Note:
Text output format is determined from overall settings.
See also:
TextDisplayable

Implemented in Ceylan::BasicResourceManager< Key >, Ceylan::CountedPointer< T >, Ceylan::Exception, Ceylan::Functor, Ceylan::LibtoolVersion, Ceylan::LocalizationSettings, Ceylan::Resource, Ceylan::ResourceManager< Key >, Ceylan::SmartResource, Ceylan::SmartResourceManager< Key >, Ceylan::TextBuffer, Ceylan::Timestamp, Ceylan::UnicodeString, Ceylan::Version, Ceylan::CallableEventSource, Ceylan::CallerEventListener, Ceylan::Controller, Ceylan::Event, Ceylan::EventListener, Ceylan::EventSource, Ceylan::MVC::BaseController, Ceylan::MVC::BaseModel, Ceylan::MVC::NoViewModel, Ceylan::MVC::SingleViewGenericModel< ActualView >, Ceylan::MVC::SingleViewModel, Ceylan::MVC::MultipleViewGenericModel< ActualView >, Ceylan::MVC::MultipleViewModel, Ceylan::MVC::SingleControllerNoViewGenericModel< ActualController >, Ceylan::MVC::BaseView, Ceylan::MVC::SingleModelGenericView< ActualModel >, Ceylan::Hashable, Ceylan::Identifier, Ceylan::IdentifierOwner, Ceylan::InputDevice, Ceylan::Locatable, Ceylan::Locatable2D, Ceylan::Lockable, Ceylan::Measurable, Ceylan::Model, Ceylan::Object, Ceylan::Log::ObjectChannel, Ceylan::Log::ObjectIdentifier, Ceylan::TextIdentifier, Ceylan::View, Ceylan::Visitor, Ceylan::Log::LogAggregator, Ceylan::Log::LogAggregatorConsole, Ceylan::Log::LogAggregatorHTML, Ceylan::Log::LogAggregatorRaw, Ceylan::Log::LogChannel, Ceylan::Log::LogHolder, Ceylan::Log::LogListener, Ceylan::Log::LogMessage, Ceylan::Log::LogSource, Ceylan::Log::LogTransport, Ceylan::Log::LogTransportListenerRaw, Ceylan::Log::MuteLogSource, Ceylan::Maths::Linear::Bipoint, Ceylan::Maths::Linear::Endomorphism2DFunctor, Ceylan::Maths::Linear::Rotation2DFunctor, Ceylan::Maths::Linear::Endomorphism3DFunctor, Ceylan::Maths::Linear::LineProjection3DFunctor, Ceylan::Maths::Linear::Rotation3DFunctor, Ceylan::Maths::Linear::HomogeneousMatrix3, Ceylan::Maths::IntToIntFunctor, Ceylan::Maths::Linear::Matrix, Ceylan::Maths::Linear::Matrix2, Ceylan::Maths::Linear::Matrix3, Ceylan::Maths::Random::NormalProbabilityFunction, Ceylan::Maths::Linear::Point, Ceylan::Maths::Random::ProbabilityFunction, Ceylan::Maths::Random::RandomGenerator, Ceylan::Maths::Random::RandomGeneratorFromPDF, Ceylan::Maths::Linear::Tripoint, Ceylan::Maths::Linear::Vector, Ceylan::Maths::Linear::Vector2, Ceylan::Maths::Linear::Vector3, Ceylan::Maths::Random::WhiteNoiseGenerator, Ceylan::Middleware::LightWeightMarshaller, Ceylan::Middleware::Marshaller, Ceylan::Middleware::ProtocolEndpoint, Ceylan::Middleware::ProtocolServer, Ceylan::Module, Ceylan::Plugin, Ceylan::XML::XMLMarkup, Ceylan::XML::XMLText, Ceylan::XML::XMLParser, Ceylan::XML::XMLVisitor, Ceylan::XML::XMLSavingVisitor, Ceylan::XML::XMLSearchingVisitor, Ceylan::Network::AnonymousProtocolAwareStreamSocket, Ceylan::Network::AnonymousStreamSocket, Ceylan::Network::ClientStreamSocket, Ceylan::Network::IPAddress, Ceylan::Network::IPAddressvFour, Ceylan::Network::MultiplexedProtocolBasedStreamServer, Ceylan::Network::MultiplexedServerStreamSocket, Ceylan::Network::HostDNSEntry, Ceylan::Network::SequentialServerStreamSocket, Ceylan::Network::ServerStreamSocket, Ceylan::Network::Socket, Ceylan::Network::StreamSocket, Ceylan::System::AnonymousInputOutputStream, Ceylan::System::AnonymousInputStream, Ceylan::System::Console, Ceylan::System::Directory, Ceylan::System::FIFO, Ceylan::System::File, Ceylan::System::FileLocator, Ceylan::System::FileSystemManager, Ceylan::System::InputOutputStream, Ceylan::System::InputStream, Ceylan::System::LibfatDirectory, Ceylan::System::LibfatFile, Ceylan::System::LibfatFileSystemManager, Ceylan::System::MemoryStream, Ceylan::System::Mutex, Ceylan::System::OutputStream, Ceylan::System::Process, Ceylan::System::Runnable, Ceylan::System::StandardDirectory, Ceylan::System::StandardFile, Ceylan::System::StandardFileSystemManager, Ceylan::System::Stream, Ceylan::System::Thread, and Ceylan::ResourceManager< Key >.

Referenced by operator<<().


Member Data Documentation

The text format to be used currently by TextDisplayable instances.

Note:
Defaults to raw text.

Definition at line 158 of file CeylanTextDisplayable.h.

Referenced by GetOutputFormat(), and SetOutputFormat().


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

Generated on Thu Jun 4 20:40:20 2009 for Ceylan by  doxygen 1.5.8