#include <SynchronizedList.hxx>
Public Member Functions | |
SynchronizedList (sk::util::List< T > &list) | |
SynchronizedList (sk::util::List< T > *list) | |
~SynchronizedList () | |
void | process (T &object) |
T & | get (const Selector< T > &selector) const |
virtual T & | get (const Selector< T > &selector) const =0 |
void | forEach (const Processor< T > &procesor) const |
virtual void | forEach (const Processor< T > &procesor) const =0 |
bool | find (sk::util::Holder< T > &holder, const Selector< T > &selector) const |
virtual bool | find (sk::util::Holder< T > &holder, const Selector< T > &selector) const =0 |
bool | isEmpty () const |
Returns true if this collection contains no elements. | |
int | size () const |
Returns the number of elements in this collection. | |
bool | contains (const T &object) const |
Returns true if this collection contains the specified element. | |
bool | contains (const Selector< T > &selector) const |
virtual bool | contains (const Selector< T > &selector) const =0 |
Returns true if the specified selector assesses to true for any element of this collection. | |
bool | containsAll (const Collection< T > &other) const |
virtual bool | containsAll (const Collection< T > &other) const =0 |
Returns true if this collection contains all of the elements in the specified collection. | |
bool | add (T &object) |
Ensures that this collection contains the specified element. A reference is added as needed. | |
bool | add (T *object) |
Ensures that this collection contains the specified element. A pointer ownership will be assumed. | |
bool | addAll (const Collection< T > &other) |
virtual bool | addAll (const Collection< T > &other)=0 |
Adds all of the elements in the specified collection to this collection. | |
bool | moveAll (Collection< T > &other) |
virtual bool | moveAll (Collection< T > &other)=0 |
Moves all of the elements from the specified collection to this collection. | |
void | clear () |
Removes all of the elements from this collection. | |
bool | remove (const T &object) |
Removes a single instance of the specified element from this collection, if it is present. | |
bool | remove (const Selector< T > &selector) |
virtual bool | remove (const Selector< T > &selector)=0 |
Removes a single element from this collection for which the specified selector assesses to true. | |
T * | cutoff (const T &object) |
T * | cutoff (const Selector< T > &selector) |
virtual T * | cutoff (const Selector< T > &selector)=0 |
T * | release (const T &object) |
T * | release (const Selector< T > &selector) |
virtual T * | release (const Selector< T > &selector)=0 |
bool | removeAll (const Collection< T > &other) |
bool | removeAll (const Selector< T > &selector) |
virtual bool | removeAll (const Collection< T > &other)=0 |
Removes all of this collection's elements that are also contained in the specified collection. | |
virtual bool | removeAll (const Selector< T > &selector)=0 |
Removes all of this collection's elements for which the specified selector assesses to true. | |
bool | retainAll (const Collection< T > &other) |
bool | retainAll (const Selector< T > &selector) |
virtual bool | retainAll (const Collection< T > &other)=0 |
Retains only the elements in this collection that are contained in the specified collection. | |
virtual bool | retainAll (const Selector< T > &selector)=0 |
Retains only the elements in this collection for whitch the specified selector assesses to true. | |
virtual Object & | self () |
Returns a reference to itself. | |
virtual const Object & | self () const |
Object * | clone () const |
Instantiates another object of the same class as a copy of itself. | |
virtual const Class | getClass () const |
Returns the object's class. | |
virtual uint64_t | getId () const |
Returns a unique object id. | |
virtual const String | toString () const |
Returns a string representation of the object. By default, it returns the object's class and the objects's id. | |
virtual const String | inspect () const |
Returns a string containing human-readable representation of the object. | |
virtual void | add (int index, T &object)=0 |
virtual void | add (int index, T *object)=0 |
virtual bool | addAll (int index, const Collection< T > &other)=0 |
virtual bool | moveAll (int index, Collection< T > &other)=0 |
virtual T & | get (int index) const =0 |
virtual int | indexOf (const T &object) const =0 |
virtual int | indexOf (const Selector< T > &selector) const =0 |
virtual int | lastIndexOf (const T &object) const =0 |
virtual int | lastIndexOf (const Selector< T > &selector) const =0 |
virtual T & | remove (int index)=0 |
virtual T * | cutoff (int index)=0 |
virtual T * | release (int index)=0 |
virtual void | set (int index, T &object)=0 |
virtual void | set (int index, T *object)=0 |
Protected Attributes | |
sk::rt::Mutex | _mutex |
sk::rt::SynchronizedList< T >::SynchronizedList | ( | sk::util::List< T > & | list | ) | [inline] |
sk::rt::SynchronizedList< T >::SynchronizedList | ( | sk::util::List< T > * | list | ) | [inline] |
sk::rt::SynchronizedList< T >::~SynchronizedList | ( | ) | [inline] |
virtual void sk::util::List< T >::add | ( | int | index, | |
T * | object | |||
) | [pure virtual, inherited] |
Implemented in sk::util::AbstractList< T >, and sk::util::AbstractList< T >.
virtual void sk::util::List< T >::add | ( | int | index, | |
T & | object | |||
) | [pure virtual, inherited] |
Implemented in sk::util::AbstractList< T >, and sk::util::AbstractList< T >.
bool sk::rt::SynchronizedCollection< T >::add | ( | T * | object | ) | [virtual, inherited] |
Ensures that this collection contains the specified element. A pointer ownership will be assumed.
Implements sk::util::Collection< T >.
bool sk::rt::SynchronizedCollection< T >::add | ( | T & | object | ) | [virtual, inherited] |
Ensures that this collection contains the specified element. A reference is added as needed.
Implements sk::util::Collection< T >.
virtual bool sk::util::List< T >::addAll | ( | int | index, | |
const Collection< T > & | other | |||
) | [pure virtual, inherited] |
Implemented in sk::util::AbstractList< T >, and sk::util::AbstractList< T >.
virtual bool sk::util::Collection< T >::addAll | ( | const Collection< T > & | other | ) | [pure virtual, inherited] |
Adds all of the elements in the specified collection to this collection.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
bool sk::rt::SynchronizedCollection< T >::addAll | ( | const Collection< T > & | other | ) | [inherited] |
void sk::rt::SynchronizedCollection< T >::clear | ( | ) | [virtual, inherited] |
Object* sk::util::Object::clone | ( | ) | const [inherited] |
Instantiates another object of the same class as a copy of itself.
Reimplemented in sk::rt::logger::Destination, and sk::util::String.
virtual bool sk::util::Collection< T >::contains | ( | const Selector< T > & | selector | ) | const [pure virtual, inherited] |
Returns true if the specified selector assesses to true for any element of this collection.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
bool sk::rt::SynchronizedCollection< T >::contains | ( | const Selector< T > & | selector | ) | const [inherited] |
bool sk::rt::SynchronizedCollection< T >::contains | ( | const T & | object | ) | const [virtual, inherited] |
Returns true if this collection contains the specified element.
Implements sk::util::Collection< T >.
virtual bool sk::util::Collection< T >::containsAll | ( | const Collection< T > & | other | ) | const [pure virtual, inherited] |
Returns true if this collection contains all of the elements in the specified collection.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
bool sk::rt::SynchronizedCollection< T >::containsAll | ( | const Collection< T > & | other | ) | const [inherited] |
virtual T * sk::util::List< T >::cutoff | ( | int | index | ) | [pure virtual, inherited] |
Implemented in sk::util::AbstractList< T >, and sk::util::AbstractList< T >.
virtual T * sk::util::Collection< T >::cutoff | ( | const Selector< T > & | selector | ) | [pure virtual, inherited] |
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
T * sk::rt::SynchronizedCollection< T >::cutoff | ( | const Selector< T > & | selector | ) | [inherited] |
T * sk::rt::SynchronizedCollection< T >::cutoff | ( | const T & | object | ) | [virtual, inherited] |
Implements sk::util::Collection< T >.
virtual bool sk::util::Collection< T >::find | ( | sk::util::Holder< T > & | holder, | |
const Selector< T > & | selector | |||
) | const [pure virtual, inherited] |
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
bool sk::rt::SynchronizedCollection< T >::find | ( | sk::util::Holder< T > & | holder, | |
const Selector< T > & | selector | |||
) | const [inherited] |
virtual void sk::util::Collection< T >::forEach | ( | const Processor< T > & | procesor | ) | const [pure virtual, inherited] |
Implemented in sk::util::AbstractCollection< T >, sk::util::ArrayList< T >, and sk::util::AbstractCollection< T >.
void sk::rt::SynchronizedCollection< T >::forEach | ( | const Processor< T > & | procesor | ) | const [inherited] |
virtual T & sk::util::List< T >::get | ( | int | index | ) | const [pure virtual, inherited] |
Implemented in sk::util::AbstractList< T >, sk::util::ArrayList< T >, and sk::util::AbstractList< T >.
virtual T & sk::util::Collection< T >::get | ( | const Selector< T > & | selector | ) | const [pure virtual, inherited] |
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
T & sk::rt::SynchronizedCollection< T >::get | ( | const Selector< T > & | selector | ) | const [inherited] |
virtual const Class sk::util::Object::getClass | ( | ) | const [virtual, inherited] |
Returns the object's class.
Reimplemented in sk::cppunit::SourcePath, sk::io::AbstractInputStream, sk::io::AbstractOutputStream, sk::io::AbstractPipe, sk::io::AnonymousPipe, sk::io::BufferedInputStream, sk::io::BufferedOutputStream, sk::io::ByteArrayInputStream, sk::io::ByteArrayOutputStream, sk::io::ClosedChannelException, sk::io::DataInputStream, sk::io::DataOutputStream, sk::io::DelegatingInputStream, sk::io::DelegatingOutputStream, sk::io::DelegatingTty, sk::io::EOFException, sk::io::File, sk::io::FileDescriptor, sk::io::FileDescriptorInputStream, sk::io::FileDescriptorOutputStream, sk::io::FileInputStream, sk::io::FileOutputStream, sk::io::IOException, sk::io::Pty, sk::io::TtyDevice, sk::io::TtyFileDescriptor, sk::net::ip4::Address, sk::rt::config::CwdUprootLocator, sk::rt::config::HomeLocator, sk::rt::config::InlineLocator, sk::rt::config::SpotLocator, sk::rt::config::UprootLocator, sk::rt::logger::Level, sk::rt::logger::Spot, sk::rt::logger::Stream, sk::rt::Mutex, sk::rt::ReentrantLock, sk::rt::scope::Aggregator, sk::rt::scope::Controller, sk::rt::Scope, sk::rt::thread::abstract::Factory, sk::rt::thread::AbstractLock, sk::rt::thread::Exit, sk::rt::thread::State, sk::rt::Thread, sk::sys::AbstractProcessListener, sk::sys::DelegatingExecutable, sk::sys::Group, sk::sys::Pipeline, sk::sys::PipeProcess, sk::sys::Process, sk::sys::PtyProcess, sk::sys::User, sk::util::AbstractCollection< T >, sk::util::AbstractList< T >, sk::util::ArrayList< T >, sk::util::Boolean, sk::util::Class, sk::util::Container, sk::util::Exception, sk::util::IllegalStateException, sk::util::IndexOutOfBoundsException, sk::util::InsufficientMemoryException, sk::util::Integer, sk::util::InterruptedException, sk::util::Method, sk::util::MissingResourceException, sk::util::NoSuchElementException, sk::util::NullPointerException, sk::util::NumberFormatException, sk::util::Pathname, sk::util::String, sk::util::StringArray, sk::util::StringHash, sk::util::SystemException, sk::util::UnsupportedOperationException, sk::util::AbstractCollection< T >, and sk::util::AbstractList< T >.
virtual uint64_t sk::util::Object::getId | ( | ) | const [virtual, inherited] |
virtual int sk::util::List< T >::indexOf | ( | const Selector< T > & | selector | ) | const [pure virtual, inherited] |
Implemented in sk::util::AbstractList< T >, and sk::util::AbstractList< T >.
virtual int sk::util::List< T >::indexOf | ( | const T & | object | ) | const [pure virtual, inherited] |
Implemented in sk::util::AbstractList< T >, and sk::util::AbstractList< T >.
virtual const String sk::util::Object::inspect | ( | ) | const [virtual, inherited] |
Returns a string containing human-readable representation of the object.
Reimplemented in sk::rt::thread::AbstractLock, sk::rt::Thread, sk::util::Class, sk::util::Container, sk::util::slot::Pointer< T, Mixin >, sk::util::slot::Reference< T, Mixin >, sk::util::String, and sk::util::StringArray.
bool sk::rt::SynchronizedCollection< T >::isEmpty | ( | ) | const [virtual, inherited] |
virtual int sk::util::List< T >::lastIndexOf | ( | const Selector< T > & | selector | ) | const [pure virtual, inherited] |
Implemented in sk::util::AbstractList< T >, and sk::util::AbstractList< T >.
virtual int sk::util::List< T >::lastIndexOf | ( | const T & | object | ) | const [pure virtual, inherited] |
Implemented in sk::util::AbstractList< T >, and sk::util::AbstractList< T >.
virtual bool sk::util::List< T >::moveAll | ( | int | index, | |
Collection< T > & | other | |||
) | [pure virtual, inherited] |
Implemented in sk::util::AbstractList< T >, and sk::util::AbstractList< T >.
virtual bool sk::util::Collection< T >::moveAll | ( | Collection< T > & | other | ) | [pure virtual, inherited] |
Moves all of the elements from the specified collection to this collection.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
bool sk::rt::SynchronizedCollection< T >::moveAll | ( | Collection< T > & | other | ) | [inherited] |
void sk::rt::SynchronizedList< T >::process | ( | T & | object | ) | [inline] |
virtual T * sk::util::List< T >::release | ( | int | index | ) | [pure virtual, inherited] |
Implemented in sk::util::AbstractList< T >, and sk::util::AbstractList< T >.
virtual T * sk::util::Collection< T >::release | ( | const Selector< T > & | selector | ) | [pure virtual, inherited] |
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
T * sk::rt::SynchronizedCollection< T >::release | ( | const Selector< T > & | selector | ) | [inherited] |
T * sk::rt::SynchronizedCollection< T >::release | ( | const T & | object | ) | [virtual, inherited] |
Implements sk::util::Collection< T >.
virtual T & sk::util::List< T >::remove | ( | int | index | ) | [pure virtual, inherited] |
Implemented in sk::util::AbstractList< T >, and sk::util::AbstractList< T >.
virtual bool sk::util::Collection< T >::remove | ( | const Selector< T > & | selector | ) | [pure virtual, inherited] |
Removes a single element from this collection for which the specified selector assesses to true.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
bool sk::rt::SynchronizedCollection< T >::remove | ( | const Selector< T > & | selector | ) | [inherited] |
bool sk::rt::SynchronizedCollection< T >::remove | ( | const T & | object | ) | [virtual, inherited] |
Removes a single instance of the specified element from this collection, if it is present.
Implements sk::util::Collection< T >.
virtual bool sk::util::Collection< T >::removeAll | ( | const Selector< T > & | selector | ) | [pure virtual, inherited] |
Removes all of this collection's elements for which the specified selector assesses to true.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
virtual bool sk::util::Collection< T >::removeAll | ( | const Collection< T > & | other | ) | [pure virtual, inherited] |
Removes all of this collection's elements that are also contained in the specified collection.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
bool sk::rt::SynchronizedCollection< T >::removeAll | ( | const Selector< T > & | selector | ) | [inherited] |
bool sk::rt::SynchronizedCollection< T >::removeAll | ( | const Collection< T > & | other | ) | [inherited] |
virtual bool sk::util::Collection< T >::retainAll | ( | const Selector< T > & | selector | ) | [pure virtual, inherited] |
Retains only the elements in this collection for whitch the specified selector assesses to true.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
virtual bool sk::util::Collection< T >::retainAll | ( | const Collection< T > & | other | ) | [pure virtual, inherited] |
Retains only the elements in this collection that are contained in the specified collection.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
bool sk::rt::SynchronizedCollection< T >::retainAll | ( | const Selector< T > & | selector | ) | [inherited] |
bool sk::rt::SynchronizedCollection< T >::retainAll | ( | const Collection< T > & | other | ) | [inherited] |
virtual const Object& sk::util::Object::self | ( | ) | const [virtual, inherited] |
Reimplemented in sk::util::String.
virtual Object& sk::util::Object::self | ( | ) | [virtual, inherited] |
virtual void sk::util::List< T >::set | ( | int | index, | |
T * | object | |||
) | [pure virtual, inherited] |
Implemented in sk::util::AbstractList< T >, and sk::util::AbstractList< T >.
virtual void sk::util::List< T >::set | ( | int | index, | |
T & | object | |||
) | [pure virtual, inherited] |
Implemented in sk::util::AbstractList< T >, and sk::util::AbstractList< T >.
int sk::rt::SynchronizedCollection< T >::size | ( | ) | const [virtual, inherited] |
virtual const String sk::util::Object::toString | ( | ) | const [virtual, inherited] |
Returns a string representation of the object. By default, it returns the object's class and the objects's id.
Reimplemented in sk::rt::logger::Level, sk::rt::thread::State, sk::util::Boolean, sk::util::Class, sk::util::Container, sk::util::Pathname, and sk::util::String.
sk::rt::Mutex sk::rt::SynchronizedCollection< T >::_mutex [protected, inherited] |