Plugin encapsulation for Dynamic Shared Object (DSO) management. More...
#include <CeylanPlugin.h>
Public Types | |
enum | TextOutputFormat { rawText, html } |
Defines what text output formats for TextDisplayable instances are available. More... | |
enum | TextOutputFormat { rawText, html } |
Defines what text output formats for TextDisplayable instances are available. More... | |
Public Member Functions | |
Plugin (const std::string &filename="", bool autoPrefix=true) | |
Constructs a reference on a plugin (DSO) by trying to load an appropriate file. | |
virtual | ~Plugin () throw () |
Virtual destructor. | |
virtual std::string | getEmbeddedName () |
Returns the plugin-embedded name, as read in the library. | |
virtual std::string | getFilename () const |
Returns the actual filename of this plugin. | |
virtual ReferenceCount | getReferenceCount () const |
Returns the current reference count of this plugin. | |
bool | isOpen () const |
Tells whether the file has been loaded and opened as a shared object. | |
void * | getDataSymbol (const std::string &dataName) const |
Returns the reference on the data symbol dataName within the opened plugin (DSO). | |
BasicFunctionPointer | getFunctionSymbol (const std::string &functionName) const |
void | close () |
Closes previously opened shared object. | |
void | makeResident () |
Mark this plugin so that it cannot be closed dynamically. | |
bool | isResident () const |
Checks whether this plugin has been marked as resident. | |
const std::string & | getFileName () const |
Returns the filename corresponding to this plugin, from the loader point of view. | |
virtual const std::string | toString (VerbosityLevels level=high) const |
Returns a user-friendly description of the state of this object. | |
virtual std::string | getName () const |
Returns the name of this module. | |
virtual void | setName (const std::string &name) |
Sets the name of this module. | |
virtual std::string | getDescription () const |
Returns this module's description. | |
virtual void | setDescription (const std::string &description) |
Sets this module's description. | |
virtual std::string | getHomePage () const |
Returns this module's home page URL. | |
virtual void | setHomePage (const std::string &homePage) |
Sets this module's home page URL. | |
virtual std::string | getAuthor () const |
Returns this module's author. | |
virtual void | setAuthor (const std::string &author) |
Sets this module's author. | |
virtual std::string | getAuthorMail () const |
Returns this module's author e-mail address. | |
virtual void | setAuthorMail (const std::string &authorMail) |
Sets this module's author e-mail address. | |
virtual const Ceylan::Version & | getVersion () const |
Returns this module's full version. | |
virtual void | setVersion (const Ceylan::Version &version) |
Sets this module's version, which is copied internally. | |
virtual std::string | getLicence () const |
Returns this module's release licence. | |
virtual void | setLicence (const std::string &licence) |
Sets this module's release licence. | |
virtual const std::string | getClassName () const |
virtual bool | isOfSameType (const Object &other) const |
Returns whether other is an instance of the same type as this object. | |
virtual void | logState (Ceylan::VerbosityLevels level=Ceylan::high) |
Uses its dedicated log channel to display its state. | |
virtual void | send (const std::string &message, Log::LevelOfDetail levelOfDetail=Log::DefaultLevelOfDetailForMessage) |
Sends message to the internal channel. | |
virtual void | forgeIdentifier () |
Forges this object's identifier. | |
Identifier & | getIdentifier () const |
Returns this IdentifierOwner's identifier. | |
void | setIdentifier (Identifier &id) |
Sets this IdentifierOwner's identifier. | |
bool | hasIdentifier () const |
Returns whether this IdentifierOwner has a stored identifier. | |
void | deleteIdentifier () |
Deletes this IdentifierOwner's identifier. | |
void | setChannelName (const std::string &channelName) |
Sets this Logable channel name. | |
bool | hasChannelName () const |
Returns whether this Log source has a registered channel name. | |
std::string | getChannelName () const |
Returns this LogSource channel name. | |
void | setLevelOfDetail (LevelOfDetail newLevel) |
Sets this LogSource level of detail of interest. | |
LevelOfDetail | getLevelOfDetail () const |
Returns this LogSource channel name. | |
virtual void | sendToChannel (const std::string &channel, const std::string &message, LevelOfDetail levelOfDetail=DefaultLevelOfDetailForMessage) const |
Sends message to the specified channel, through known LogTransport. | |
virtual void | setTransport (LogTransport &newTransport) |
Sets a new Log transport for this LogSource. | |
virtual LogTransport * | getTransport () const |
Returns this LogSource's Log transport. | |
virtual bool | hasTransport () const |
Tells whether this LogSource has a registered Log transport. | |
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 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 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 void | SetOutputFormat (TextOutputFormat newOutputFormat) |
Sets the current overall text format to be used by TextDisplayable instances. | |
static bool | IsALoggableChannelName (const std::string &channelName) |
Returns whether the specified channel name is an object channel name, based on the possible presence of the protocol prefix and separators (typically, loggable://). | |
static const std::string | GetEmbeddedChannelName (const std::string &fullChannelName) |
Returns the real channel name used by a Loggable by removing the protocol prefix and separators (typically, 'loggable://'). | |
Static Public Attributes | |
static Ceylan::System::FileLocator | PluginLocator |
This locator keeps the plugin search paths available. | |
static const std::string | SymbolMarker = CEYLAN_SYMBOL_MARKER |
The characters that will be added automatically between the plugin name and the loaded symbols if auto-prefix is on. | |
static const std::string | ProtocolName = "loggable" |
static const LevelOfDetail | DefaultLevelOfDetailForSource = 10 |
The default level of detail of a Log source. | |
Protected Member Functions | |
virtual void | retrieveMetadata () |
Reads from plugin the usual module metadata, such as plugin description, author, version, licence, etc. | |
void | dropIdentifier () |
Removes this Object's identifier, in order to avoid class name mangling. | |
virtual void | directSend (const std::string &channel, const std::string &message, LevelOfDetail levelOfDetail=DefaultLevelOfDetailForMessage) const |
Internal method to send messages. | |
virtual void | unlinkTransport () |
Suppresses the link between this LogSource and its Log transport. | |
Protected Attributes | |
bool | _trackInstance |
Tells whether this instance's lifecycle should be advertised in log system. | |
std::string | _channelName |
Stores this LogSource channel name. | |
LevelOfDetail | _level |
The current level of detail of interest for this Log source. | |
LogTransport * | _transport |
The LogTransport to be used for sending messages. | |
Static Protected Attributes | |
static Ceylan::Uint16 | PluginSystemInitialized = 0 |
Tells whether the plugin system is currently initialized, by recording the current number of times the system was requested minus the number of times it was released. | |
static TextOutputFormat | _OutputFormat = rawText |
The text format to be used currently by TextDisplayable instances. | |
static TextOutputFormat | _OutputFormat = rawText |
The text format to be used currently by TextDisplayable instances. | |
Private Types | |
typedef Ceylan::Uint32 | ReferenceCount |
typedef void *(* | BasicFunctionPointer )(void) |
Pointer to function, used to distinguish pointer-to-function loaded symbols from pointer-to-object ones. | |
Private Member Functions | |
Plugin (const Plugin &source) | |
Copy constructor made private to ensure that it will never be called. | |
Plugin & | operator= (const Plugin &source) |
Assignment operator made private to ensure that it will never be called. | |
Private Attributes | |
SystemSpecificPluginHandle * | _pluginHandle |
The plugin handle returned by the loader. | |
std::string | _filename |
The user-specified filename of the plugin. | |
bool | _autoPrefix |
Tells whether the plugin loader expects symbols to be prefixed according to CEYLAN_PLUGIN_* macros. |
Plugin encapsulation for Dynamic Shared Object (DSO) management.
This class allows to load arbitrary, user-specified plugins at runtime.
Definition at line 128 of file CeylanPlugin.h.
typedef void*(* Ceylan::Plugin::BasicFunctionPointer)(void) [private] |
Pointer to function, used to distinguish pointer-to-function loaded symbols from pointer-to-object ones.
In ISO C++, those two kinds of pointers are especially risky to cast to each other.
No 'extern "C"' declaration seems needed.
Definition at line 158 of file CeylanPlugin.h.
typedef Ceylan::Uint32 Ceylan::Plugin::ReferenceCount [private] |
Definition at line 142 of file CeylanPlugin.h.
enum Ceylan::TextDisplayable::TextOutputFormat [inherited] |
Defines what text output formats for TextDisplayable instances are available.
Definition at line 124 of file CeylanTextDisplayable.h.
enum Ceylan::TextDisplayable::TextOutputFormat [inherited] |
Defines what text output formats for TextDisplayable instances are available.
Definition at line 124 of file CeylanTextDisplayable.h.
Plugin::Plugin | ( | const std::string & | filename = "" , |
|
bool | autoPrefix = true | |||
) | [explicit] |
Constructs a reference on a plugin (DSO) by trying to load an appropriate file.
Use isOpen() to see whether the plugin could be loaded succcessfully.
filename | the filename of the shared library that should be loaded. If the filename has no directory component, the plugin will be searched through: 1. user-defined search path, see PluginLocator 2. libltdl's search path, which is the value of the environment variable LTDL_LIBRARY_PATH 3. system-dependent library search path, for example on Linux it is LD_LIBRARY_PATH. Different file name extensions will be appended to the file name until the plugin is found: the libtool archive extension `.la', the extension used for native dynamic libraries on the host platform, e.g., `.so', `.sl', etc. This lookup strategy was designed to allow programs that do not have knowledge about native dynamic libraries naming conventions to be able to open dynamically such libraries as well as libtool modules transparently. If filename is an empty string, the binary loaded will be the main program itself. | |
autoPrefix | if true, then if a symbol 'foo' of a plugin named 'my-Plugin' is requested, then the actually loaded symbol will be 'my_Plugin_LTX_foo'. It allows all plugins to implement the same API while still being able to be able to be loaded simultaneously. Otherwise their name would clash and prevent from linking. |
PluginException | if the plugin feature is not available or if the plugin could not be loaded successfully. |
Definition at line 113 of file CeylanPlugin.cc.
References _pluginHandle, Ceylan::System::FileLocator::getPaths(), PluginLocator, PluginSystemInitialized, and retrieveMetadata().
Plugin::~Plugin | ( | ) | throw () [virtual] |
Virtual destructor.
Definition at line 196 of file CeylanPlugin.cc.
References close(), and PluginSystemInitialized.
Ceylan::Plugin::Plugin | ( | const Plugin & | source | ) | [private] |
Copy constructor made private to ensure that it will never be called.
The compiler should complain whenever this undefined constructor is called, implicitly or not.
void Plugin::close | ( | ) |
Closes previously opened shared object.
PluginException | if the plugin feature is not available or if the plugin could not be closed successfully. |
Definition at line 427 of file CeylanPlugin.cc.
References _pluginHandle.
Referenced by ~Plugin().
void IdentifierOwner::deleteIdentifier | ( | ) | [inherited] |
Deletes this IdentifierOwner's identifier.
Definition at line 128 of file CeylanIdentifierOwner.cc.
References Ceylan::IdentifierOwner::_id, and Ceylan::emergencyShutdown().
Referenced by Ceylan::Object::dropIdentifier(), and Ceylan::IdentifierOwner::~IdentifierOwner().
void LogSource::directSend | ( | const std::string & | channel, | |
const std::string & | message, | |||
LevelOfDetail | levelOfDetail = DefaultLevelOfDetailForMessage | |||
) | const [protected, virtual, inherited] |
Internal method to send messages.
Filters them out if their level of detail is higher than the one of this log source.
Definition at line 164 of file CeylanLogSource.cc.
References Ceylan::Log::LogSource::_transport, and Ceylan::Log::LogTransport::propagate().
Referenced by Ceylan::Log::LogSource::send(), and Ceylan::Log::LogSource::sendToChannel().
void Object::dropIdentifier | ( | ) | [protected, inherited] |
Removes this Object's identifier, in order to avoid class name mangling.
Definition at line 261 of file CeylanObject.cc.
References Ceylan::IdentifierOwner::deleteIdentifier().
Referenced by Ceylan::Object::forgeIdentifier(), and Ceylan::Object::Object().
void Object::forgeIdentifier | ( | ) | [virtual, inherited] |
Forges this object's identifier.
Log::LogException | if the identifier could not be forged. |
Definition at line 211 of file CeylanObject.cc.
References CEYLAN_LOG, Ceylan::Object::dropIdentifier(), Ceylan::IdentifierOwner::getIdentifier(), Ceylan::IdentifierOwner::hasIdentifier(), Ceylan::IdentifierOwner::setIdentifier(), Ceylan::Object::toString(), and Ceylan::Exception::toString().
string Module::getAuthor | ( | ) | const [virtual, inherited] |
Returns this module's author.
Definition at line 166 of file CeylanModule.cc.
References Ceylan::Module::_author.
string Module::getAuthorMail | ( | ) | const [virtual, inherited] |
Returns this module's author e-mail address.
Definition at line 184 of file CeylanModule.cc.
References Ceylan::Module::_authorMail.
std::string LogSource::getChannelName | ( | ) | const [inherited] |
Returns this LogSource channel name.
Definition at line 101 of file CeylanLogSource.cc.
References Ceylan::Log::LogSource::_channelName.
Referenced by Ceylan::Log::LogSource::toString().
const std::string Object::getClassName | ( | ) | const [virtual, inherited] |
Definition at line 102 of file CeylanObject.cc.
References CEYLAN_LOG.
Referenced by Ceylan::Object::isOfSameType().
void * Plugin::getDataSymbol | ( | const std::string & | dataName | ) | const |
Returns the reference on the data symbol dataName within the opened plugin (DSO).
symbol | the data (non-function) symbol to look-up. |
PluginException | if the plugin feature is not available or if the plugin could not be loaded successfully. |
Definition at line 340 of file CeylanPlugin.cc.
References _filename, _pluginHandle, dataUtils::f, and isOpen().
Referenced by retrieveMetadata().
string Module::getDescription | ( | ) | const [virtual, inherited] |
Returns this module's description.
Definition at line 130 of file CeylanModule.cc.
References Ceylan::Module::_description.
const string Loggable::GetEmbeddedChannelName | ( | const std::string & | fullChannelName | ) | [static, inherited] |
Returns the real channel name used by a Loggable by removing the protocol prefix and separators (typically, 'loggable://').
Definition at line 83 of file CeylanLoggable.cc.
References Ceylan::URI::getEmbeddedURI(), and Ceylan::URI::ProtocolSeparator.
Referenced by Ceylan::Log::ObjectChannel::addMessage(), Ceylan::Log::LogAggregator::createLoggableChannelFrom(), Ceylan::Log::LogAggregator::createObjectChannel(), Ceylan::Log::LogAggregator::findChannel(), and Ceylan::Log::LogAggregator::storeObjectMessage().
string Plugin::getEmbeddedName | ( | ) | [virtual] |
Returns the plugin-embedded name, as read in the library.
ModuleException | if the operation failed. |
Definition at line 223 of file CeylanPlugin.cc.
References _pluginHandle.
Referenced by retrieveMetadata().
const std::string& Ceylan::Plugin::getFileName | ( | ) | const |
Returns the filename corresponding to this plugin, from the loader point of view.
This name (ex: ceylan-test-plugin.so) can be different from the user-specified one (ex:ceylan-test-plugin).
string Plugin::getFilename | ( | ) | const [virtual] |
Returns the actual filename of this plugin.
ModuleException | if the operation failed. |
Definition at line 259 of file CeylanPlugin.cc.
References _pluginHandle.
Referenced by toString().
Plugin::BasicFunctionPointer Plugin::getFunctionSymbol | ( | const std::string & | functionName | ) | const |
Definition at line 373 of file CeylanPlugin.cc.
References _filename, _pluginHandle, dataUtils::f, isOpen(), and Ceylan::toString().
string Module::getHomePage | ( | ) | const [virtual, inherited] |
Returns this module's home page URL.
Definition at line 148 of file CeylanModule.cc.
References Ceylan::Module::_homepageURL.
Identifier & IdentifierOwner::getIdentifier | ( | ) | const [inherited] |
Returns this IdentifierOwner's identifier.
IdentifierNotAvailableException | if the operation failed. |
Definition at line 83 of file CeylanIdentifierOwner.cc.
References Ceylan::IdentifierOwner::_id.
Referenced by Ceylan::Object::forgeIdentifier().
LevelOfDetail LogSource::getLevelOfDetail | ( | ) | const [inherited] |
Returns this LogSource channel name.
Definition at line 119 of file CeylanLogSource.cc.
References Ceylan::Log::LogSource::_level.
string Module::getLicence | ( | ) | const [virtual, inherited] |
Returns this module's release licence.
Definition at line 223 of file CeylanModule.cc.
References Ceylan::Module::_licence.
string Module::getName | ( | ) | const [virtual, inherited] |
Returns the name of this module.
ModuleException | if the operation failed. |
Definition at line 112 of file CeylanModule.cc.
References Ceylan::Module::_name.
Referenced by toString(), and Ceylan::Module::toString().
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().
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().
Plugin::ReferenceCount Plugin::getReferenceCount | ( | ) | const [virtual] |
Returns the current reference count of this plugin.
This is a reference counter that describes how many times this plugin is currently loaded.
ModuleException | if the operation failed. |
Definition at line 291 of file CeylanPlugin.cc.
References _pluginHandle.
LogTransport * LogSource::getTransport | ( | ) | const [virtual, inherited] |
Returns this LogSource's Log transport.
Definition at line 209 of file CeylanLogSource.cc.
References Ceylan::Log::LogSource::_transport.
const Version & Module::getVersion | ( | ) | const [virtual, inherited] |
Returns this module's full version.
Definition at line 202 of file CeylanModule.cc.
References Ceylan::Module::_version.
bool LogSource::hasChannelName | ( | ) | const [inherited] |
Returns whether this Log source has a registered channel name.
Definition at line 83 of file CeylanLogSource.cc.
References Ceylan::Log::LogSource::_channelName.
Referenced by Ceylan::Log::LogSource::toString().
bool IdentifierOwner::hasIdentifier | ( | ) | const [inherited] |
Returns whether this IdentifierOwner has a stored identifier.
Definition at line 119 of file CeylanIdentifierOwner.cc.
References Ceylan::IdentifierOwner::_id.
Referenced by Ceylan::Object::forgeIdentifier(), and Ceylan::IdentifierOwner::~IdentifierOwner().
bool LogSource::hasTransport | ( | ) | const [virtual, inherited] |
Tells whether this LogSource has a registered Log transport.
Definition at line 218 of file CeylanLogSource.cc.
References Ceylan::Log::LogSource::_transport.
Referenced by Ceylan::Log::LogSource::setTransport().
bool Loggable::IsALoggableChannelName | ( | const std::string & | channelName | ) | [static, inherited] |
Returns whether the specified channel name is an object channel name, based on the possible presence of the protocol prefix and separators (typically, loggable://).
Definition at line 73 of file CeylanLoggable.cc.
References Ceylan::URI::getProtocolName(), Ceylan::Log::Loggable::ProtocolName, and Ceylan::URI::ProtocolSeparator.
Referenced by Ceylan::Log::LogAggregator::findChannel(), and Ceylan::Log::LogAggregator::store().
bool Object::isOfSameType | ( | const Object & | other | ) | const [virtual, inherited] |
Returns whether other is an instance of the same type as this object.
other | the object whose type is to be compared with this object's type. |
Definition at line 140 of file CeylanObject.cc.
References Ceylan::Object::getClassName().
bool Plugin::isOpen | ( | ) | const |
Tells whether the file has been loaded and opened as a shared object.
Definition at line 323 of file CeylanPlugin.cc.
References _pluginHandle, and generalUtils::false.
Referenced by getDataSymbol(), getFunctionSymbol(), and toString().
bool Plugin::isResident | ( | ) | const |
Checks whether this plugin has been marked as resident.
PluginException | if the operation failed. |
Definition at line 482 of file CeylanPlugin.cc.
References _pluginHandle.
void Object::logState | ( | Ceylan::VerbosityLevels | level = Ceylan::high |
) | [virtual, inherited] |
Uses its dedicated log channel to display its state.
level | chooses the level of detail |
Definition at line 149 of file CeylanObject.cc.
References Ceylan::Object::send(), and Ceylan::Object::toString().
void Plugin::makeResident | ( | ) |
Mark this plugin so that it cannot be closed dynamically.
This can be useful if a plugin implements some core functionality in the application, which would cause its code to crash if removed.
When loading the running binary as a plugin, it will always be marked as resident.
PluginException | if the operation failed. |
Definition at line 462 of file CeylanPlugin.cc.
References _pluginHandle.
Assignment operator made private to ensure that it will never be called.
The compiler should complain whenever this undefined operator is called, implicitly or not.
void Plugin::retrieveMetadata | ( | ) | [protected, virtual] |
Reads from plugin the usual module metadata, such as plugin description, author, version, licence, etc.
PluginException | if the operation failed. |
Definition at line 541 of file CeylanPlugin.cc.
References dataUtils::e, getDataSymbol(), getEmbeddedName(), Ceylan::Module::setAuthor(), Ceylan::Module::setAuthorMail(), Ceylan::Module::setDescription(), Ceylan::Module::setHomePage(), Ceylan::Module::setLicence(), Ceylan::Module::setName(), Ceylan::Module::setVersion(), and Ceylan::Exception::toString().
Referenced by Plugin().
virtual void Ceylan::Object::send | ( | const std::string & | message, | |
Log::LevelOfDetail | levelOfDetail = Log::DefaultLevelOfDetailForMessage | |||
) | [virtual, inherited] |
Sends message to the internal channel.
message | the log message to send. Please avoid characters '<' and '>' since they have a special meaning for HTML log output. These characters used to be filtered in HTML aggregators but it prevented messages to contain HTML tags on purpose, which proved to be convenient in the case only HTML aggregators are to be used. | |
levelOfDetail | the level of detail of this message (level 5 by default). |
Log::LogException | if the operation failed. |
Reimplemented from Ceylan::Log::LogSource.
Referenced by Ceylan::Object::logState(), Ceylan::Module::Module(), Ceylan::Object::Object(), Ceylan::Module::~Module(), and Ceylan::Object::~Object().
void LogSource::sendToChannel | ( | const std::string & | channel, | |
const std::string & | message, | |||
LevelOfDetail | levelOfDetail = DefaultLevelOfDetailForMessage | |||
) | const [virtual, inherited] |
Sends message to the specified channel, through known LogTransport.
channel | the channel name which will identify the targeted Loglistener. | |
message | the log message to send. Please avoid characters '<' and '>' since they have a special meaning for HTML log output. These characters used to be filtered in HTML aggregators but it prevented messages to contain HTML tags on purpose, which proved to be convenient. | |
levelOfDetail | the level of detail of this message (level 1 by default). |
Definition at line 142 of file CeylanLogSource.cc.
References Ceylan::Log::LogSource::_level, CEYLAN_LOG, Ceylan::Log::LogSource::directSend(), and Ceylan::toString().
void Module::setAuthor | ( | const std::string & | author | ) | [virtual, inherited] |
Sets this module's author.
Definition at line 175 of file CeylanModule.cc.
References Ceylan::Module::_author.
Referenced by retrieveMetadata().
void Module::setAuthorMail | ( | const std::string & | authorMail | ) | [virtual, inherited] |
Sets this module's author e-mail address.
Definition at line 193 of file CeylanModule.cc.
References Ceylan::Module::_authorMail.
Referenced by retrieveMetadata().
void Loggable::setChannelName | ( | const std::string & | channelName | ) | [inherited] |
Sets this Logable channel name.
Reimplemented from Ceylan::Log::LogSource.
Definition at line 63 of file CeylanLoggable.cc.
References Ceylan::Log::Loggable::ProtocolName, and Ceylan::URI::ProtocolSeparator.
Referenced by Ceylan::Log::Loggable::Loggable().
void Module::setDescription | ( | const std::string & | description | ) | [virtual, inherited] |
Sets this module's description.
Definition at line 139 of file CeylanModule.cc.
References Ceylan::Module::_description.
Referenced by retrieveMetadata().
void Module::setHomePage | ( | const std::string & | homePage | ) | [virtual, inherited] |
Sets this module's home page URL.
Definition at line 157 of file CeylanModule.cc.
References Ceylan::Module::_homepageURL.
Referenced by retrieveMetadata().
void IdentifierOwner::setIdentifier | ( | Identifier & | id | ) | [inherited] |
Sets this IdentifierOwner's identifier.
IdentifierNotAvailableException | if the operation failed. |
Definition at line 101 of file CeylanIdentifierOwner.cc.
References Ceylan::IdentifierOwner::_id.
Referenced by Ceylan::Object::forgeIdentifier().
void LogSource::setLevelOfDetail | ( | LevelOfDetail | newLevel | ) | [inherited] |
Sets this LogSource level of detail of interest.
Definition at line 110 of file CeylanLogSource.cc.
References Ceylan::Log::LogSource::_level.
void Module::setLicence | ( | const std::string & | licence | ) | [virtual, inherited] |
Sets this module's release licence.
Definition at line 232 of file CeylanModule.cc.
References Ceylan::Module::_licence.
Referenced by retrieveMetadata().
void Module::setName | ( | const std::string & | name | ) | [virtual, inherited] |
Sets the name of this module.
ModuleException | if the operation failed. |
Definition at line 121 of file CeylanModule.cc.
References Ceylan::Module::_name.
Referenced by retrieveMetadata().
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().
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().
void LogSource::setTransport | ( | LogTransport & | newTransport | ) | [virtual, inherited] |
Sets a new Log transport for this LogSource.
Definition at line 191 of file CeylanLogSource.cc.
References Ceylan::Log::LogSource::_transport, Ceylan::Log::LogSource::hasTransport(), Ceylan::Log::LogSource::unlinkTransport(), and Ceylan::Log::LogPlug::warning().
void Module::setVersion | ( | const Ceylan::Version & | version | ) | [virtual, inherited] |
Sets this module's version, which is copied internally.
Definition at line 211 of file CeylanModule.cc.
References Ceylan::Module::_version, Ceylan::Version::getMajorNumber(), Ceylan::Version::getMinorNumber(), Ceylan::Version::getReleaseNumber(), Ceylan::Version::setMajorNumber(), Ceylan::Version::setMinorNumber(), and Ceylan::Version::setReleaseNumber().
Referenced by Ceylan::Module::Module(), and retrieveMetadata().
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 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 Plugin::toString | ( | VerbosityLevels | level = high |
) | const [virtual] |
Returns a user-friendly description of the state of this object.
level | the requested verbosity level. |
Reimplemented from Ceylan::Module.
Definition at line 506 of file CeylanPlugin.cc.
References _autoPrefix, _filename, getFilename(), Ceylan::Module::getName(), isOpen(), Ceylan::low, and Ceylan::medium.
void LogSource::unlinkTransport | ( | ) | [protected, virtual, inherited] |
Suppresses the link between this LogSource and its Log transport.
Definition at line 243 of file CeylanLogSource.cc.
Referenced by Ceylan::Log::LogSource::setTransport(), and Ceylan::Log::LogSource::~LogSource().
bool Ceylan::Plugin::_autoPrefix [private] |
Tells whether the plugin loader expects symbols to be prefixed according to CEYLAN_PLUGIN_* macros.
Definition at line 423 of file CeylanPlugin.h.
Referenced by toString().
std::string Ceylan::Log::LogSource::_channelName [protected, inherited] |
Stores this LogSource channel name.
Definition at line 242 of file CeylanLogSource.h.
Referenced by Ceylan::Log::LogSource::getChannelName(), Ceylan::Log::LogSource::hasChannelName(), Ceylan::Log::LogSource::send(), and Ceylan::Log::LogSource::setChannelName().
std::string Ceylan::Plugin::_filename [private] |
The user-specified filename of the plugin.
Definition at line 415 of file CeylanPlugin.h.
Referenced by getDataSymbol(), getFunctionSymbol(), and toString().
LevelOfDetail Ceylan::Log::LogSource::_level [protected, inherited] |
The current level of detail of interest for this Log source.
Definition at line 246 of file CeylanLogSource.h.
Referenced by Ceylan::Log::LogSource::getLevelOfDetail(), Ceylan::Log::LogSource::sendToChannel(), Ceylan::Log::LogSource::setLevelOfDetail(), and Ceylan::Log::LogSource::toString().
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().
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().
SystemSpecificPluginHandle* Ceylan::Plugin::_pluginHandle [private] |
The plugin handle returned by the loader.
Definition at line 411 of file CeylanPlugin.h.
Referenced by close(), getDataSymbol(), getEmbeddedName(), getFilename(), getFunctionSymbol(), getReferenceCount(), isOpen(), isResident(), makeResident(), and Plugin().
bool Ceylan::Object::_trackInstance [protected, inherited] |
Tells whether this instance's lifecycle should be advertised in log system.
Definition at line 254 of file CeylanObject.h.
Referenced by Ceylan::Object::Object(), Ceylan::Object::toString(), and Ceylan::Object::~Object().
LogTransport* Ceylan::Log::LogSource::_transport [protected, inherited] |
The LogTransport to be used for sending messages.
Definition at line 258 of file CeylanLogSource.h.
Referenced by Ceylan::Log::LogSource::directSend(), Ceylan::Log::LogSource::getTransport(), Ceylan::Log::LogSource::hasTransport(), and Ceylan::Log::LogSource::setTransport().
const LevelOfDetail Ceylan::Log::LogSource::DefaultLevelOfDetailForSource = 10 [static, inherited] |
The default level of detail of a Log source.
Definition at line 221 of file CeylanLogSource.h.
This locator keeps the plugin search paths available.
Definition at line 363 of file CeylanPlugin.h.
Referenced by Plugin().
Ceylan::Uint16 Plugin::PluginSystemInitialized = 0 [static, protected] |
Tells whether the plugin system is currently initialized, by recording the current number of times the system was requested minus the number of times it was released.
Definition at line 401 of file CeylanPlugin.h.
const string Loggable::ProtocolName = "loggable" [static, inherited] |
Definition at line 122 of file CeylanLoggable.h.
Referenced by Ceylan::Log::Loggable::IsALoggableChannelName(), and Ceylan::Log::Loggable::setChannelName().
const std::string Plugin::SymbolMarker = CEYLAN_SYMBOL_MARKER [static] |
The characters that will be added automatically between the plugin name and the loaded symbols if auto-prefix is on.
For example, retrieving the symbol 'my_test_constant' in plugin named 'ceylan-test-plugin' will cause the look-up of symbol 'ceylan_test_plugin_LTX_my_test_constant'.
Definition at line 376 of file CeylanPlugin.h.