Jive reference manual
List of all members | Public Member Functions | Protected Member Functions
jem::util::ObjectMap Class Referenceabstract

#include <jem/util/ObjectMap.h>

Inheritance diagram for jem::util::ObjectMap:
Inheritance graph

Public Member Functions

Ref< MapEnumenumerate () const
 
virtual Ref< EnumeratorgetEnumerator () const
 Returns an enumerator over this collection. More...
 
virtual Ref< MapEnumgetMapEnum () const =0
 
virtual bool contains (const Ref< Object > &key) const
 
virtual Ref< Objectget (const Ref< Object > &key) const
 
virtual bool find (Ref< Object > &value, const Ref< Object > &key) const =0
 
virtual void insert (const Ref< Object > &key, const Ref< Object > &value)=0
 
virtual void erase (const Ref< Object > &key)=0
 
virtual bool add (const Ref< Object > &obj)
 Adds an object to this collection. More...
 
- Public Member Functions inherited from jem::util::ObjectCollection
virtual ClassgetClass () const
 Returns the Class instance representing the runtime class of this object. More...
 
Ref< Enumeratorenumerate () const
 Returns an enumerator over this collection. More...
 
virtual void clear ()=0
 Deletes all objects from this collection. More...
 
virtual void reserve (int n)
 Pre-allocates data structures for storing additional objects. More...
 
virtual void trimToSize ()
 Deallocates non-used memory. More...
 
virtual int capacity () const
 Returns the capacity of this collection. More...
 
virtual int size () const =0
 Returns the number of objects in this collection. More...
 
- Public Member Functions inherited from jem::Object
virtual String toString () const
 Returns a short textual description of this object. More...
 
virtual long hashValue () const
 Returns a hash value for this object. More...
 
virtual bool equals (const Ref< Object > &obj) const
 Tests whether two objects are equal. More...
 
Ref< Objectclone () const
 Returns a copy of this object. More...
 

Protected Member Functions

virtual ~ObjectMap ()
 
void clone_ (const ObjectMap &rhs)
 
void readFrom_ (io::ObjectInput &in)
 
void writeTo_ (io::ObjectOutput &out) const
 
- Protected Member Functions inherited from jem::util::ObjectCollection
virtual ~ObjectCollection ()
 
void clone_ (const ObjectCollection &rhs)
 Makes a deep copy of another collection. More...
 
void readFrom_ (io::ObjectInput &in)
 Reads the contents of this collection from an object input stream. More...
 
void writeTo_ (io::ObjectOutput &out) const
 Writes the contents of this collection to an object output stream. More...
 
- Protected Member Functions inherited from jem::Collectable
 Collectable ()
 Creates an empty Collectable. More...
 
 ~Collectable ()
 Frees resources. More...
 
- Protected Member Functions inherited from jem::util::Enumerable
virtual ~Enumerable ()
 
- Protected Member Functions inherited from jem::Interface
virtual ~Interface ()
 Empty destructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from jem::util::ObjectCollection
static ClassmakeClass ()
 
static ClassgetType ()
 
- Static Public Member Functions inherited from jem::Object
static ClassgetType ()
 Returns the Class instance representing the Object class. More...
 

Constructor & Destructor Documentation

virtual jem::util::ObjectMap::~ObjectMap ( )
protectedvirtual

Member Function Documentation

Ref<MapEnum> jem::util::ObjectMap::enumerate ( ) const
virtual Ref<Enumerator> jem::util::ObjectMap::getEnumerator ( ) const
virtual

Returns an Enumerator that can be used to iterate over all objects in this collection. This object collection may not be structurally modified as long as one or more enumerators are pointing to it.

Implements jem::util::ObjectCollection.

virtual Ref<MapEnum> jem::util::ObjectMap::getMapEnum ( ) const
pure virtual
virtual bool jem::util::ObjectMap::contains ( const Ref< Object > &  key) const
virtual
virtual Ref<Object> jem::util::ObjectMap::get ( const Ref< Object > &  key) const
virtual
virtual bool jem::util::ObjectMap::find ( Ref< Object > &  value,
const Ref< Object > &  key 
) const
pure virtual
virtual void jem::util::ObjectMap::insert ( const Ref< Object > &  key,
const Ref< Object > &  value 
)
pure virtual
virtual void jem::util::ObjectMap::erase ( const Ref< Object > &  key)
pure virtual
virtual bool jem::util::ObjectMap::add ( const Ref< Object > &  obj)
virtual

Requests that the object obj is added to this collection. This function returns true if the object has been added, and false otherwise. An implementation of this function does not have to add the object if it is already present in this collection and if all objects in this collection should be unique.

This function may not be called if an enumerator points to this collection.

Parameters
obj- the object to be added.
Returns
true if the object has been added to this collection, and false otherwise.

Implements jem::util::ObjectCollection.

void jem::util::ObjectMap::clone_ ( const ObjectMap rhs)
protected
void jem::util::ObjectMap::readFrom_ ( io::ObjectInput in)
protected
void jem::util::ObjectMap::writeTo_ ( io::ObjectOutput out) const
protected