Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

OMF::Set Class Reference

#include

Inheritance diagram for OMF::Set:

OMF::Container OMF::Object List of all members.

Detailed Description

The Set class is a container of objects that implements ordered, non-unique containment semantics. That is to say the order of objects added to the list is important and an object can be in the list more than once.

The underlying set is actually implemented as a map. The idea is that we want to map objects to their identities or hash codes. If we don't map to identity, then we end up always adding new objects.


Public Member Functions

  Set ()
  Set (const Set &value)
virtual  ~Set ()
const Set operator= (const Set &value)
virtual Iterator  begin ()
virtual Iterator  end ()
virtual Iterator  find (OMF::Object *obj)
virtual Iterator  find (bool value)
virtual Iterator  find (int value)
virtual Iterator  find (const char *value)
virtual ConstIterator  begin () const
virtual ConstIterator  end () const
virtual ConstIterator  find (Object *obj) const
virtual ConstIterator  find (bool value) const
virtual ConstIterator  find (int value) const
virtual ConstIterator  find (const char *value) const
Iterator  insert (Object *obj)
Iterator  insert (bool value)
Iterator  insert (int value)
Iterator  insert (const char *value)
void  erase (Iterator i)
void  erase (Object *obj)
void  erase (bool value)
void  erase (int value)
void  erase (const char *value)
virtual bool  empty () const
virtual size_t  size () const
virtual void  add (Object *obj)
virtual void  add (bool value)
virtual void  add (int value)
virtual void  add (const char *value)
virtual void  remove (OMF::Object *obj)
virtual void  remove (bool value)
virtual void  remove (int value)
virtual void  remove (const char *value)
virtual void  clear ()
virtual const std::string &  typeCode () const
bool  contains (Object *obj) const
bool  contains (bool value) const
bool  contains (int value) const
bool  contains (const char *value) const
void  collect (OMF::Object *obj)
virtual unsigned  hashCode () const
ModelObject metaObject ()

Constructor & Destructor Documentation

OMF::Set::Set  ) 
 

OMF::Set::Set const Set value  ) 
 

virtual OMF::Set::~Set  )  [virtual]
 


Member Function Documentation

virtual void OMF::Set::add const char *  value  )  [virtual]
 

Implements OMF::Container.

virtual void OMF::Set::add int  value  )  [virtual]
 

Implements OMF::Container.

virtual void OMF::Set::add bool  value  )  [virtual]
 

Implements OMF::Container.

virtual void OMF::Set::add Object obj  )  [virtual]
 

Basic methods to append data.

Implements OMF::Container.

virtual ConstIterator OMF::Set::begin  )  const [virtual]
 

Implements OMF::Container.

virtual Iterator OMF::Set::begin  )  [virtual]
 

Implements OMF::Container.

virtual void OMF::Set::clear  )  [virtual]
 

Clears the collection.

Implements OMF::Container.

void OMF::Container::collect OMF::Object obj  )  [inherited]
 

The collect method is a generic append for other list/set objects of the same type. The object must be a container for the collect to function. Note that if the object is not a container, no action is taken and no exception is raised.

bool OMF::Container::contains const char *  value  )  const [inherited]
 

bool OMF::Container::contains int  value  )  const [inherited]
 

bool OMF::Container::contains bool  value  )  const [inherited]
 

bool OMF::Container::contains Object obj  )  const [inherited]
 

The contains method tests for the existence of an object within the container.

virtual bool OMF::Set::empty  )  const [virtual]
 

Implements OMF::Container.

virtual ConstIterator OMF::Set::end  )  const [virtual]
 

Implements OMF::Container.

virtual Iterator OMF::Set::end  )  [virtual]
 

Implements OMF::Container.

void OMF::Set::erase const char *  value  ) 
 

void OMF::Set::erase int  value  ) 
 

void OMF::Set::erase bool  value  ) 
 

void OMF::Set::erase Object obj  ) 
 

void OMF::Set::erase Iterator  i  ) 
 

virtual ConstIterator OMF::Set::find const char *  value  )  const [virtual]
 

Implements OMF::Container.

virtual ConstIterator OMF::Set::find int  value  )  const [virtual]
 

Implements OMF::Container.

virtual ConstIterator OMF::Set::find bool  value  )  const [virtual]
 

Implements OMF::Container.

virtual ConstIterator OMF::Set::find Object obj  )  const [virtual]
 

Implements OMF::Container.

virtual Iterator OMF::Set::find const char *  value  )  [virtual]
 

Implements OMF::Container.

virtual Iterator OMF::Set::find int  value  )  [virtual]
 

Implements OMF::Container.

virtual Iterator OMF::Set::find bool  value  )  [virtual]
 

Implements OMF::Container.

virtual Iterator OMF::Set::find OMF::Object obj  )  [virtual]
 

Implements OMF::Container.

virtual unsigned OMF::Container::hashCode  )  const [virtual, inherited]
 

The hash implementation for containers is to simply return the pointer value as an integer. We don't anticipate the need for value-based identity with containers.

Implements OMF::Object.

Iterator OMF::Set::insert const char *  value  ) 
 

Iterator OMF::Set::insert int  value  ) 
 

Iterator OMF::Set::insert bool  value  ) 
 

Iterator OMF::Set::insert Object obj  ) 
 

ModelObject* OMF::Object::metaObject  )  [inherited]
 

Return the meta-object of this instance. The meta-object is an instance of the metaclass of this object. For example, the metaclass of UML::Attribute is Model::Class. The metaobject for an instance of UML::Attribute is an instance of Model::Class.

This method may force a load of an entire metamodel in order to return the correct object.

const Set& OMF::Set::operator= const Set value  ) 
 

virtual void OMF::Set::remove const char *  value  )  [virtual]
 

Implements OMF::Container.

virtual void OMF::Set::remove int  value  )  [virtual]
 

Implements OMF::Container.

virtual void OMF::Set::remove bool  value  )  [virtual]
 

Implements OMF::Container.

virtual void OMF::Set::remove OMF::Object obj  )  [virtual]
 

Basic methods to remove data.

Implements OMF::Container.

virtual size_t OMF::Set::size  )  const [virtual]
 

Implements OMF::Container.

virtual const std::string& OMF::Set::typeCode  )  const [virtual]
 

The typeCode method returns a textual description of an object's type. This can vary between classifications of objects. For primitives and collections, the names are essentially static. For model objects, enumerations and collections the name of the object is the scoped name of the instantiating class. Note that the names of primitives are not typed.

Implements OMF::Object.


The documentation for this class was generated from the following file:
Generated on Fri Sep 10 13:07:38 2004 for OpenModelingFramework by 1.3.8