Falcon::CoreDict Class Reference

#include <coredict.h>

Inheritance diagram for Falcon::CoreDict:

Inheritance graph
[legend]

List of all members.

Public Member Functions

void bless (bool b)
 Bless this dictionary.
void clear ()
CoreDictclone () const
 CoreDict (const CoreDict &other)
 CoreDict (ItemDict *dict)
bool empty () const
bool find (const Item &key, Item &value)
Itemfind (const String &key) const
 Performs a find using a static string as a key.
Itemfind (const Item &key) const
bool findIterator (const Item &key, Iterator &iter)
virtual void gcMark (uint32 gen)
 Applies mark to subclasses.
bool getMethod (const String &name, Item &mth)
 Returns a method out of this dictionary.
bool isBlessed () const
 Returns true if this dictionary is blessed.
ItemDictitems ()
const ItemDictitems () const
uint32 length () const
void merge (const CoreDict &dict)
void put (const Item &key, const Item &value)
virtual void readIndex (const Item &pos, Item &target)
 Implements the deep item interface.
virtual void readProperty (const String &, Item &item)
 Implements the deep item interface.
bool remove (const Item &key)
void smartInsert (const Iterator &iter, const Item &key, const Item &value)
virtual void writeIndex (const Item &pos, const Item &target)
 Implements the deep item interface.
virtual void writeProperty (const String &, const Item &item)
 Implements the deep item interface.
virtual ~CoreDict ()


Constructor & Destructor Documentation

Falcon::CoreDict::CoreDict ( ItemDict dict  )  [inline]

Falcon::CoreDict::CoreDict ( const CoreDict other  )  [inline]

virtual Falcon::CoreDict::~CoreDict (  )  [inline, virtual]


Member Function Documentation

void Falcon::CoreDict::bless ( bool  b  )  [inline]

Bless this dictionary.

A blessed dictionary becomes a flessible instance.

Its elements are treated as properties; the dot accessor will act as searching for the given property, and a read dot accessor will create a mehtod; in the method, the dictionary can be accessed through "self".

void Falcon::CoreDict::clear (  )  [inline]

CoreDict* Falcon::CoreDict::clone (  )  const [inline]

bool Falcon::CoreDict::empty (  )  const [inline]

bool Falcon::CoreDict::find ( const Item key,
Item value 
)

Item* Falcon::CoreDict::find ( const String key  )  const

Performs a find using a static string as a key.

This wraps the string in a temporary item and calls the normal find(const Item &)

Item* Falcon::CoreDict::find ( const Item key  )  const [inline]

bool Falcon::CoreDict::findIterator ( const Item key,
Iterator iter 
) [inline]

virtual void Falcon::CoreDict::gcMark ( uint32  mk  )  [virtual]

Applies mark to subclasses.

By default, this method just changes the mark() value.

Subclasses having deep data may overload this to take care of marking it.

Reimplemented from Falcon::Garbageable.

bool Falcon::CoreDict::getMethod ( const String name,
Item mth 
)

Returns a method out of this dictionary.

This method returns true if there is a function item stored under the given key, provided that this dictionary is blessed.

Parameters:
name The name of the method to be searched.
mth An item that will receive a full readied method on success.
Returns:
true if the method was found.

bool Falcon::CoreDict::isBlessed (  )  const [inline]

Returns true if this dictionary is blessed.

ItemDict& Falcon::CoreDict::items (  )  [inline]

const ItemDict& Falcon::CoreDict::items (  )  const [inline]

uint32 Falcon::CoreDict::length (  )  const [inline]

void Falcon::CoreDict::merge ( const CoreDict dict  )  [inline]

References m_dict.

void Falcon::CoreDict::put ( const Item key,
const Item value 
) [inline]

virtual void Falcon::CoreDict::readIndex ( const Item pos,
Item target 
) [virtual]

Implements the deep item interface.

May throw AccessError * if the pos doesn't represents a valid item index for the current type.

Implements Falcon::DeepItem.

virtual void Falcon::CoreDict::readProperty ( const String ,
Item item 
) [virtual]

Implements the deep item interface.

May throw AccessError * if the property cannot be read.

Implements Falcon::DeepItem.

bool Falcon::CoreDict::remove ( const Item key  )  [inline]

void Falcon::CoreDict::smartInsert ( const Iterator iter,
const Item key,
const Item value 
) [inline]

virtual void Falcon::CoreDict::writeIndex ( const Item pos,
const Item target 
) [virtual]

Implements the deep item interface.

May throw AccessError * if the pos doesn't represents a valid item index for the current type or if the target item can't be set into this item at the given index.

Implements Falcon::DeepItem.

virtual void Falcon::CoreDict::writeProperty ( const String ,
const Item item 
) [virtual]

Implements the deep item interface.

May throw AccessError * if the property cannot be set.

Implements Falcon::DeepItem.


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

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