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

Core::KeysAndValuesIterator Class Reference

#include <KAVIterator.h>

Inheritance diagram for Core::KeysAndValuesIterator:

Inheritance graph
[legend]
Collaboration diagram for Core::KeysAndValuesIterator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 KeysAndValuesIterator (const Dictionary *coll)
virtual StringclassName (void) const
 Answer receiver class name.
virtual Objectkey (void)
virtual Objectvalue (void)

Constructor & Destructor Documentation

KeysAndValuesIterator::KeysAndValuesIterator const Dictionary coll  ) 
 

Definition at line 30 of file KAVIterator.cc.

00031   : CollectionIterator(coll)
00032 {
00033 }


Member Function Documentation

String * KeysAndValuesIterator::className void   )  const [virtual]
 

Answer receiver class name.

Because there isn't any standard way to obtain class name this method comes to place.

Every class should rewrite this method but many didn't (yet).

Reimplemented from Core::CollectionIterator.

Definition at line 36 of file KAVIterator.cc.

00037 {
00038     return new String("KeysAndValuesIterator");
00039 }

Object * KeysAndValuesIterator::key void   )  [virtual]
 

Definition at line 42 of file KAVIterator.cc.

References Core::Object::error(), Core::Object::isAssociation(), and Core::CollectionIterator::item.

Referenced by Tools::Configuration::keys(), and Tools::Configuration::reloadAll().

00043 {
00044     if (!item->isAssociation())
00045         error(new String("Improper object for iteration. Association expected."));
00046     return ((Association *) item)->key();
00047 }

Object * KeysAndValuesIterator::value void   )  [virtual]
 

Reimplemented from Core::CollectionIterator.

Definition at line 49 of file KAVIterator.cc.

References Core::Object::error(), Core::Object::isAssociation(), and Core::CollectionIterator::item.

Referenced by Tools::Configuration::reloadAll().

00050 {
00051     if (!item->isAssociation())
00052         error(new String("Improper object for iteration. Association expected."));
00053     return ((Association *) item)->value();
00054 }


The documentation for this class was generated from the following files:
Generated on Mon Nov 27 09:51:39 2006 for Smalltalk like C++ Class Library by  doxygen 1.4.2