#include <CeylanThread.h>


Public Member Functions | |
| Waiter () | |
| Basic constructor. | |
| ~Waiter () throw () | |
| Basic non-virtual destructor. | |
| bool | wait (System::Second seconds=0) |
| Blocks for sec seconds the calling thread, until time is elapsed, or signal() or broadcast() is called by another thread. | |
| bool | signal () |
| Signals only one waiting thread. | |
| bool | broadcast () |
| Signals all waiting threads. | |
Protected Types | |
| enum | TextOutputFormat { rawText, html } |
| Defines what text output formats for TextDisplayable instances are available. More... | |
Protected Member Functions | |
| virtual void | lock () |
| Locks the mutex. | |
| virtual void | unlock () |
| Unlocks the mutex. | |
| virtual const std::string | toString (Ceylan::VerbosityLevels level=Ceylan::high) const |
| Returns a user-friendly description of the state of this object. | |
| virtual void | postLock () |
| Effective locking of the mutex. | |
| virtual void | preUnlock () |
| Effective locking of the mutex. | |
| SystemSpecificMutexType & | getMutexReference () |
| Returns the reference on the mutex itself. | |
| virtual bool | mustBeLocked () const |
| bool | isLocked () const |
| Returns the lock state, locked or unlocked. | |
Static Protected 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 | |
| bool | _locked |
| This is the actual piece of informations which is used to know the lock state. | |
Static Protected Attributes | |
| static TextOutputFormat | _OutputFormat = rawText |
| The text format to be used currently by TextDisplayable instances. | |
Private Member Functions | |
| Waiter (const Waiter &source) | |
| Copy constructor made private to ensure that it will never be called. | |
| Waiter & | operator= (const Waiter &source) |
| Assignment operator made private to ensure that it will be never called. | |
Private Attributes | |
| SystemSpecificThreadCondition * | _condition |
| This Waiter's system-specific condition variable, since multiple threads can wait on a single Waiter. | |
Definition at line 374 of file CeylanThread.h.
enum Ceylan::TextDisplayable::TextOutputFormat [inherited] |
Defines what text output formats for TextDisplayable instances are available.
Definition at line 124 of file CeylanTextDisplayable.h.
| Thread::Waiter::Waiter | ( | ) |
Basic constructor.
| FeatureNotAvailableException | if the multithreading feature is not available, so that no Waiter instance can be created in this case. |
Definition at line 558 of file CeylanThread.cc.
References Ceylan::System::Thread::Thread::Waiter::_condition.
| Thread::Waiter::~Waiter | ( | ) | throw () |
Basic non-virtual destructor.
Definition at line 584 of file CeylanThread.cc.
References Ceylan::System::Thread::Thread::Waiter::_condition.
| Ceylan::System::Thread::Thread::Waiter::Waiter | ( | const Waiter & | 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.
| bool Thread::Waiter::broadcast | ( | ) |
Signals all waiting threads.
Definition at line 711 of file CeylanThread.cc.
References Ceylan::System::Thread::Thread::Waiter::_condition, Ceylan::System::Mutex::lock(), generalUtils::true, and Ceylan::System::Mutex::unlock().
| Mutex::SystemSpecificMutexType & Mutex::getMutexReference | ( | ) | [protected, inherited] |
Returns the reference on the mutex itself.
Definition at line 237 of file CeylanMutex.cc.
References Ceylan::System::Mutex::_internalMutex.
Referenced by Ceylan::System::Thread::Thread::Waiter::wait().
| 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().
| bool Ceylan::Lockable::isLocked | ( | ) | const [inline, inherited] |
Returns the lock state, locked or unlocked.
Definition at line 251 of file CeylanLockable.h.
| void Mutex::lock | ( | ) | [virtual, inherited] |
Locks the mutex.
This method is to be called by the user of the class instances.
It will handle the locking process and will call the 'postLock' method afterwards.
| LockException | if the operation failed. |
Reimplemented from Ceylan::Lockable.
Definition at line 117 of file CeylanMutex.cc.
References Ceylan::Lockable::_locked, Ceylan::System::Mutex::postLock(), and generalUtils::true.
Referenced by Ceylan::System::Thread::Thread::Waiter::broadcast(), Ceylan::System::Synchronized< bool >::operator++(), Ceylan::System::Synchronized< ThreadCount >::operator++(), Ceylan::System::Synchronized< bool >::operator--(), Ceylan::System::Synchronized< ThreadCount >::operator--(), Ceylan::System::Synchronized< bool >::setValue(), Ceylan::System::Synchronized< ThreadCount >::setValue(), Ceylan::System::Thread::Thread::Waiter::signal(), and Ceylan::System::Thread::Thread::Waiter::wait().
| bool Lockable::mustBeLocked | ( | ) | const [virtual, inherited] |
Definition at line 99 of file CeylanLockable.cc.
References generalUtils::true.
Referenced by Ceylan::Lockable::lock(), Ceylan::Lockable::unlock(), and Ceylan::Lockable::~Lockable().
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 Mutex::postLock | ( | ) | [protected, virtual, inherited] |
Effective locking of the mutex.
| LockException | if the effective locking failed. |
Reimplemented from Ceylan::Lockable.
Definition at line 139 of file CeylanMutex.cc.
References Ceylan::System::Mutex::_internalMutex.
Referenced by Ceylan::System::Mutex::lock().
| void Mutex::preUnlock | ( | ) | [protected, virtual, inherited] |
Effective locking of the mutex.
| LockException | if the effective locking failed. |
Reimplemented from Ceylan::Lockable.
Definition at line 183 of file CeylanMutex.cc.
References Ceylan::System::Mutex::_internalMutex.
Referenced by Ceylan::System::Mutex::unlock().
| 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().
| bool Thread::Waiter::signal | ( | ) |
Signals only one waiting thread.
Definition at line 682 of file CeylanThread.cc.
References Ceylan::System::Thread::Thread::Waiter::_condition, Ceylan::System::Mutex::lock(), generalUtils::true, and Ceylan::System::Mutex::unlock().
| 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 Mutex::toString | ( | Ceylan::VerbosityLevels | level = Ceylan::high |
) | const [virtual, inherited] |
Returns a user-friendly description of the state of this object.
| level | the requested verbosity level. |
Reimplemented from Ceylan::Lockable.
Definition at line 228 of file CeylanMutex.cc.
| void Mutex::unlock | ( | ) | [virtual, inherited] |
Unlocks the mutex.
This method is to be called by the user of the class instances.
It will handle the unlocking process and will call the 'preUnlock' method afterwards.
| LockException | if the operation failed. |
Reimplemented from Ceylan::Lockable.
Definition at line 128 of file CeylanMutex.cc.
References Ceylan::Lockable::_locked, generalUtils::false, and Ceylan::System::Mutex::preUnlock().
Referenced by Ceylan::System::Thread::Thread::Waiter::broadcast(), Ceylan::System::Synchronized< bool >::operator++(), Ceylan::System::Synchronized< ThreadCount >::operator++(), Ceylan::System::Synchronized< bool >::operator--(), Ceylan::System::Synchronized< ThreadCount >::operator--(), Ceylan::System::Synchronized< bool >::setValue(), Ceylan::System::Synchronized< ThreadCount >::setValue(), Ceylan::System::Thread::Thread::Waiter::signal(), and Ceylan::System::Thread::Thread::Waiter::wait().
| bool Thread::Waiter::wait | ( | System::Second | seconds = 0 |
) |
Blocks for sec seconds the calling thread, until time is elapsed, or signal() or broadcast() is called by another thread.
| seconds | the requested sleeping time, if null no timeout will occur. |
Definition at line 608 of file CeylanThread.cc.
References Ceylan::System::Thread::Thread::Waiter::_condition, Ceylan::System::Mutex::getMutexReference(), Ceylan::System::Mutex::lock(), Ceylan::toString(), generalUtils::true, and Ceylan::System::Mutex::unlock().
SystemSpecificThreadCondition* Ceylan::System::Thread::Thread::Waiter::_condition [private] |
This Waiter's system-specific condition variable, since multiple threads can wait on a single Waiter.
Definition at line 478 of file CeylanThread.h.
Referenced by Ceylan::System::Thread::Thread::Waiter::broadcast(), Ceylan::System::Thread::Thread::Waiter::signal(), Ceylan::System::Thread::Thread::Waiter::wait(), Ceylan::System::Thread::Thread::Waiter::Waiter(), and Ceylan::System::Thread::Thread::Waiter::~Waiter().
bool Ceylan::Lockable::_locked [protected, inherited] |
This is the actual piece of informations which is used to know the lock state.
Definition at line 217 of file CeylanLockable.h.
Referenced by Ceylan::System::Mutex::lock(), Ceylan::Lockable::lock(), Ceylan::Lockable::toString(), Ceylan::System::Mutex::unlock(), Ceylan::Lockable::unlock(), and Ceylan::Lockable::~Lockable().
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().
1.5.8