sk::rt::SynchronizedCollection< T > Class Template Reference

#include <SynchronizedCollection.hxx>

Inheritance diagram for sk::rt::SynchronizedCollection< T >:

sk::util::Collection< T > sk::util::Object

List of all members.

Public Member Functions

 SynchronizedCollection (sk::util::Collection< T > &collection)
 SynchronizedCollection (sk::util::Collection< T > *collection)
 ~SynchronizedCollection ()
T & get (const Selector< T > &selector) const
void forEach (const Processor< T > &procesor) const
bool find (sk::util::Holder< T > &holder, const Selector< T > &selector) const
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
bool containsAll (const Collection< T > &other) const
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)
bool moveAll (Collection< T > &other)
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)
T * cutoff (const T &object)
T * cutoff (const Selector< T > &selector)
T * release (const T &object)
T * release (const Selector< T > &selector)
bool removeAll (const Collection< T > &other)
bool removeAll (const Selector< T > &selector)
bool retainAll (const Collection< T > &other)
bool retainAll (const Selector< T > &selector)
virtual T & get (const Selector< T > &selector) const =0
virtual void forEach (const Processor< T > &procesor) const =0
virtual bool find (sk::util::Holder< T > &holder, const Selector< T > &selector) const =0
virtual bool contains (const Selector< T > &selector) const =0
 Returns true if the specified selector assesses to true for any element of this collection.
virtual bool containsAll (const Collection< T > &other) const =0
 Returns true if this collection contains all of the elements in the specified collection.
virtual bool addAll (const Collection< T > &other)=0
 Adds all of the elements in the specified collection to this collection.
virtual bool moveAll (Collection< T > &other)=0
 Moves all of the elements from the specified collection to this collection.
virtual bool remove (const Selector< T > &selector)=0
 Removes a single element from this collection for which the specified selector assesses to true.
virtual T * cutoff (const Selector< T > &selector)=0
virtual T * release (const Selector< T > &selector)=0
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.
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.

Protected Attributes

sk::rt::Mutex _mutex

template<typename T>
class sk::rt::SynchronizedCollection< T >


Constructor & Destructor Documentation

template<typename T>
sk::rt::SynchronizedCollection< T >::SynchronizedCollection ( sk::util::Collection< T > &  collection  )  [inline]

template<typename T>
sk::rt::SynchronizedCollection< T >::SynchronizedCollection ( sk::util::Collection< T > *  collection  )  [inline]

template<typename T >
sk::rt::SynchronizedCollection< T >::~SynchronizedCollection (  )  [inline]


Member Function Documentation

template<typename T>
bool sk::rt::SynchronizedCollection< T >::add ( T *  object  )  [virtual]

Ensures that this collection contains the specified element. A pointer ownership will be assumed.

Implements sk::util::Collection< T >.

template<typename T>
bool sk::rt::SynchronizedCollection< T >::add ( T &  object  )  [virtual]

Ensures that this collection contains the specified element. A reference is added as needed.

Implements sk::util::Collection< 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 >.

template<typename T>
bool sk::rt::SynchronizedCollection< T >::addAll ( const Collection< T > &  other  ) 

template<typename T>
void sk::rt::SynchronizedCollection< T >::clear (  )  [virtual]

Removes all of the elements from this collection.

Implements sk::util::Collection< T >.

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 >.

template<typename T>
bool sk::rt::SynchronizedCollection< T >::contains ( const Selector< T > &  selector  )  const

template<typename T>
bool sk::rt::SynchronizedCollection< T >::contains ( const T &  object  )  const [virtual]

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 >.

template<typename T>
bool sk::rt::SynchronizedCollection< T >::containsAll ( const Collection< T > &  other  )  const

virtual T * sk::util::Collection< T >::cutoff ( const Selector< T > &  selector  )  [pure virtual, inherited]

template<typename T>
T* sk::rt::SynchronizedCollection< T >::cutoff ( const Selector< T > &  selector  ) 

template<typename T>
T* sk::rt::SynchronizedCollection< T >::cutoff ( const T &  object  )  [virtual]

virtual bool sk::util::Collection< T >::find ( sk::util::Holder< T > &  holder,
const Selector< T > &  selector 
) const [pure virtual, inherited]

template<typename T>
bool sk::rt::SynchronizedCollection< T >::find ( sk::util::Holder< T > &  holder,
const Selector< T > &  selector 
) const

virtual void sk::util::Collection< T >::forEach ( const Processor< T > &  procesor  )  const [pure virtual, inherited]

template<typename T>
void sk::rt::SynchronizedCollection< T >::forEach ( const Processor< T > &  procesor  )  const

virtual T & sk::util::Collection< T >::get ( const Selector< T > &  selector  )  const [pure virtual, inherited]

template<typename T>
T & sk::rt::SynchronizedCollection< T >::get ( const Selector< T > &  selector  )  const [inline]

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]

Returns a unique object id.

Reimplemented in sk::rt::Thread.

virtual const String sk::util::Object::inspect (  )  const [virtual, inherited]

template<typename T>
bool sk::rt::SynchronizedCollection< T >::isEmpty (  )  const [virtual]

Returns true if this collection contains no elements.

Implements sk::util::Collection< 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 >.

template<typename T>
bool sk::rt::SynchronizedCollection< T >::moveAll ( Collection< T > &  other  ) 

virtual T * sk::util::Collection< T >::release ( const Selector< T > &  selector  )  [pure virtual, inherited]

template<typename T>
T* sk::rt::SynchronizedCollection< T >::release ( const Selector< T > &  selector  ) 

template<typename T>
T* sk::rt::SynchronizedCollection< T >::release ( const T &  object  )  [virtual]

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 >.

template<typename T>
bool sk::rt::SynchronizedCollection< T >::remove ( const Selector< T > &  selector  ) 

template<typename T>
bool sk::rt::SynchronizedCollection< T >::remove ( const T &  object  )  [virtual]

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 >.

template<typename T>
bool sk::rt::SynchronizedCollection< T >::removeAll ( const Selector< T > &  selector  ) 

template<typename T>
bool sk::rt::SynchronizedCollection< T >::removeAll ( const Collection< T > &  other  ) 

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 >.

template<typename T>
bool sk::rt::SynchronizedCollection< T >::retainAll ( const Selector< T > &  selector  ) 

template<typename T>
bool sk::rt::SynchronizedCollection< T >::retainAll ( const Collection< T > &  other  ) 

virtual const Object& sk::util::Object::self (  )  const [virtual, inherited]

Reimplemented in sk::util::String.

virtual Object& sk::util::Object::self (  )  [virtual, inherited]

Returns a reference to itself.

Reimplemented in sk::util::String.

template<typename T>
int sk::rt::SynchronizedCollection< T >::size (  )  const [virtual]

Returns the number of elements in this collection.

Implements sk::util::Collection< T >.

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.


Member Data Documentation

template<typename T>
sk::rt::Mutex sk::rt::SynchronizedCollection< T >::_mutex [protected]


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

Generated on Tue Mar 3 12:36:09 2009 for stemkit-cpp by  doxygen 1.5.8