Falcon::PageDict Class Reference

#include <pagedict.h>

Inheritance diagram for Falcon::PageDict:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void append (const Item &item)
 Append an item at the end of the sequence.
virtual const Itemback () const
 Returns the first element of the sequence.
virtual void clear ()
 Removes all the items in the sequence.
virtual FalconDataclone () const
virtual bool empty () const
 Tells if the series is empty.
virtual Itemfind (const Item &key) const
virtual bool findIterator (const Item &key, Iterator &iter)
virtual const Itemfront () const
 Returns the first element of the sequence.
void gcMark (uint32 gen)
virtual uint32 length () const
virtual void merge (const ItemDict &dict)
 PageDict (uint32 pageSize)
 PageDict ()
virtual void prepend (const Item &item)
 Prepend an item at the beginning of the sequence.
virtual void put (const Item &key, const Item &value)
virtual bool remove (const Item &key)
virtual void smartInsert (const Iterator &iter, const Item &key, const Item &value)
 ~PageDict ()

Protected Member Functions

virtual void copyIterator (Iterator &tgt, const Iterator &source) const
 Copy an iterator so that the two points to the same item.
virtual bool equalIterator (const Iterator &first, const Iterator &second) const
virtual void erase (Iterator &iter)
 Deletes the element at position indicated by the iterator.
virtual ItemgetCurrent (const Iterator &iter)
virtual ItemgetCurrentKey (const Iterator &iter)
virtual void getIterator (Iterator &tgt, bool tail=false) const
 Gets an Iterator valid for this sequence.
virtual bool hasCurrent (const Iterator &iter) const
virtual bool hasNext (const Iterator &iter) const
virtual bool hasPrev (const Iterator &iter) const
virtual void insert (Iterator &iter, const Item &data)
 Inserts an element in a position indicated by the iterator.
virtual bool next (Iterator &iter) const
virtual bool prev (Iterator &iter) const


Constructor & Destructor Documentation

Falcon::PageDict::PageDict (  ) 

Falcon::PageDict::PageDict ( uint32  pageSize  ) 

Falcon::PageDict::~PageDict (  ) 


Member Function Documentation

virtual void Falcon::PageDict::append ( const Item data  )  [virtual]

Append an item at the end of the sequence.

Implements Falcon::Sequence.

virtual const Item& Falcon::PageDict::back (  )  const [virtual]

Returns the first element of the sequence.

If the sequence has not an underlying storage, it may generate a temporary item, as the item is immediately copied into some destination by the caller.

This method is never used by the engine to modify the underlying item.

Guarantees are taken so that this method is never called when v_empty() returns false.

Returns:
a valid reference to the first item of the sequence

Implements Falcon::Sequence.

virtual void Falcon::PageDict::clear (  )  [virtual]

Removes all the items in the sequence.

Implements Falcon::ItemDict.

virtual FalconData* Falcon::PageDict::clone (  )  const [virtual]

Implements Falcon::FalconData.

virtual void Falcon::PageDict::copyIterator ( Iterator tgt,
const Iterator source 
) const [protected, virtual]

Copy an iterator so that the two points to the same item.

The source iterator may point to the past-end element, but must not be invalid.

Note:
The base version of this function just adds the iterator to the iterator list; it MUST be called by all the implementations.

Reimplemented from Falcon::Sequence.

virtual bool Falcon::PageDict::empty (  )  const [virtual]

Tells if the series is empty.

Returns:
false if there is at least one valid item in the series, false otherwise.

Implements Falcon::Sequence.

virtual bool Falcon::PageDict::equalIterator ( const Iterator first,
const Iterator second 
) const [protected, virtual]

Implements Falcon::Sequence.

virtual void Falcon::PageDict::erase ( Iterator iter  )  [protected, virtual]

Deletes the element at position indicated by the iterator.

The implementation must check that the iterator is a valid iterator created by this object and pointing to a valid position.

Deletion happens at given position, shifting all the remaining elements backward; after a successful erase, the iterator must point to the element that was previously next in the series, or must be invalidated if the removed element was the last.

If the sequence is empty or the iterator is invalid, an AccessError must be thrown. If the iterator is referencing another sequence, a CodeError must be thrown.

Parameters:
iter an iterator (possibly invalid or not generated by this class).
Returns:
true if the iterator was valid for this object.

Implements Falcon::Sequence.

virtual Item* Falcon::PageDict::find ( const Item key  )  const [virtual]

Implements Falcon::ItemDict.

virtual bool Falcon::PageDict::findIterator ( const Item key,
Iterator iter 
) [virtual]

Implements Falcon::ItemDict.

virtual const Item& Falcon::PageDict::front (  )  const [virtual]

Returns the first element of the sequence.

If the sequence has not an underlying storage, it may generate a temporary item, as the item is immediately copied into some destination by the caller.

Guarantees are taken so that this method is never called when v_empty() returns false.

Returns:
a valid reference to the first item of the sequence

Implements Falcon::Sequence.

void Falcon::PageDict::gcMark ( uint32  gen  )  [virtual]

Reimplemented from Falcon::Sequence.

virtual Item& Falcon::PageDict::getCurrent ( const Iterator iter  )  [protected, virtual]

Implements Falcon::Sequence.

virtual Item& Falcon::PageDict::getCurrentKey ( const Iterator iter  )  [protected, virtual]

Implements Falcon::Sequence.

virtual void Falcon::PageDict::getIterator ( Iterator tgt,
bool  tail = false 
) const [protected, virtual]

Gets an Iterator valid for this sequence.

If you need an iterator as a pointer or in the target stack, use Iterator( Sequence*, bool) instead.

The iterator constructor calls back this method to be configured.

It is possible to call this method thereafter to reset the iterator, even if it's gone invalid.

However, it is not legal to call this method with an iterator coming from another sequence; this will cause the program to throw a CodeError.

Note:
The base version of this function just adds the iterator to the iterator list; it MUST be called by all the implementations.
Parameters:
An Iterator to be set.
tail if false, get an iterator to the first element, else get an iterator to the last element.

Reimplemented from Falcon::Sequence.

virtual bool Falcon::PageDict::hasCurrent ( const Iterator iter  )  const [protected, virtual]

Implements Falcon::Sequence.

virtual bool Falcon::PageDict::hasNext ( const Iterator iter  )  const [protected, virtual]

Implements Falcon::Sequence.

virtual bool Falcon::PageDict::hasPrev ( const Iterator iter  )  const [protected, virtual]

Implements Falcon::Sequence.

virtual void Falcon::PageDict::insert ( Iterator iter,
const Item data 
) [protected, virtual]

Inserts an element in a position indicated by the iterator.

The implementation must check that the iterator is a valid iterator created by this object and pointing to a valid position.

Insertion happens at given position, shifting all the remaining elements forward; after a successful insert, the iterator must point to the newly inserted element, and the previously current element is found safely in the next() position of the iterator.

Valid iterators (generated by this owner) pointing to invalid positions must be treated as pointing to last-past-one element; insertion causes append on tail, and at return they must be valid and point to the last valid element (the one just inserted).

If the iterator cannot be used, for example because their owner is not this item, this method will raise a CodeError.

Parameters:
iterator an iterator.
data the item to be inserted
Returns:
true if the iterator was valid for this object.

Implements Falcon::Sequence.

virtual uint32 Falcon::PageDict::length (  )  const [virtual]

Implements Falcon::ItemDict.

virtual void Falcon::PageDict::merge ( const ItemDict dict  )  [virtual]

Implements Falcon::ItemDict.

virtual bool Falcon::PageDict::next ( Iterator iter  )  const [protected, virtual]

Implements Falcon::Sequence.

virtual void Falcon::PageDict::prepend ( const Item data  )  [virtual]

Prepend an item at the beginning of the sequence.

Implements Falcon::Sequence.

virtual bool Falcon::PageDict::prev ( Iterator iter  )  const [protected, virtual]

Implements Falcon::Sequence.

virtual void Falcon::PageDict::put ( const Item key,
const Item value 
) [virtual]

Implements Falcon::ItemDict.

virtual bool Falcon::PageDict::remove ( const Item key  )  [virtual]

Implements Falcon::ItemDict.

virtual void Falcon::PageDict::smartInsert ( const Iterator iter,
const Item key,
const Item value 
) [virtual]

Implements Falcon::ItemDict.


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

Generated on Mon Oct 19 10:11:39 2009 for Falcon_Core by  doxygen 1.5.8