Falcon::PropertyTable Class Reference

Very simple double entry table for pure properties. More...

#include <proptable.h>

Inheritance diagram for Falcon::PropertyTable:

Inheritance graph
[legend]

List of all members.

Public Member Functions

uint32 added () const
bool append (const String *key, const Item &itm, reflectionFunc func_from, reflectionFunc func_to=0)
bool append (const String *key, const Item &itm, t_reflection mode, uint32 offset, bool bReadOnly=false)
bool append (const String *key, const Item &itm, bool bReadOnly=false)
PropEntryappend (const String *name)
void appendSafe (const String *key, const Item &itm, reflectionFunc func_from, reflectionFunc func_to=0)
void appendSafe (const String *key, const Item &itm, t_reflection mode, uint32 offset, bool bReadOnly=false)
void appendSafe (const String *key, const Item &itm, bool bReadOnly=false)
PropEntryappendSafe (const String *key)
void checkProperties ()
 Analyzes the table and sets its properties.
bool findKey (const String &key, uint32 &pos) const
const PropEntrygetEntry (uint32 pos) const
PropEntrygetEntry (uint32 pos)
const StringgetKey (uint32 pos) const
const ItemgetValue (uint32 pos) const
ItemgetValue (uint32 pos)
const ItemgetValue (const String &key) const
bool isReflective () const
bool isStatic () const
 PropertyTable (const PropertyTable &)
 PropertyTable (uint32 size)
uint32 size () const
 ~PropertyTable ()

Public Attributes

uint32 m_added
bool m_bReflective
bool m_bStatic
PropEntrym_entries
uint32 m_size


Detailed Description

Very simple double entry table for pure properties.

Property tables are a convenient way to store efficiently and search at the fastest possible speed a set of pre-defined pure Falcon strings stored in a safe memory area that does not need procetion, collecting or reference counting.

Unluckily, this is a quite rare situation. Luckily, this is exactly the situation of Falcon objects (and classes), whose property names are allocated as Falcon Strings in the same Module that declares them.

The property table stores also informations about the class that declared the property. In fact, in case of inheritance, the property may come from an inner class, that needs to be managed through a different handler.

The needed information is the ID of the class in the inheritance list, which is used to pick the correct user_data in the object instance, and the user_data handler (ObjectHandler).

Actually, the ObjectHandler information would not be needed, but it is kept here for caching. There is only one property table per class in each program, so it's an affordable cost.

Once created, the m_value field of each entry is read-only. It stores enumeration and constant initialization values for properties and method/class entries for methods/class accessors.

A property table has two characteristics that are accounted at its creation:


Constructor & Destructor Documentation

Falcon::PropertyTable::PropertyTable ( uint32  size  ) 

Falcon::PropertyTable::PropertyTable ( const PropertyTable  ) 

Falcon::PropertyTable::~PropertyTable (  ) 


Member Function Documentation

uint32 Falcon::PropertyTable::added (  )  const [inline]

bool Falcon::PropertyTable::append ( const String key,
const Item itm,
reflectionFunc  func_from,
reflectionFunc  func_to = 0 
) [inline]

bool Falcon::PropertyTable::append ( const String key,
const Item itm,
t_reflection  mode,
uint32  offset,
bool  bReadOnly = false 
) [inline]

bool Falcon::PropertyTable::append ( const String key,
const Item itm,
bool  bReadOnly = false 
) [inline]

PropEntry& Falcon::PropertyTable::append ( const String name  ) 

void Falcon::PropertyTable::appendSafe ( const String key,
const Item itm,
reflectionFunc  func_from,
reflectionFunc  func_to = 0 
) [inline]

References Falcon::e_reflectFunc.

void Falcon::PropertyTable::appendSafe ( const String key,
const Item itm,
t_reflection  mode,
uint32  offset,
bool  bReadOnly = false 
) [inline]

void Falcon::PropertyTable::appendSafe ( const String key,
const Item itm,
bool  bReadOnly = false 
) [inline]

PropEntry& Falcon::PropertyTable::appendSafe ( const String key  )  [inline]

void Falcon::PropertyTable::checkProperties (  ) 

Analyzes the table and sets its properties.

bool Falcon::PropertyTable::findKey ( const String key,
uint32 pos 
) const

const PropEntry& Falcon::PropertyTable::getEntry ( uint32  pos  )  const [inline]

PropEntry& Falcon::PropertyTable::getEntry ( uint32  pos  )  [inline]

const String* Falcon::PropertyTable::getKey ( uint32  pos  )  const [inline]

const Item* Falcon::PropertyTable::getValue ( uint32  pos  )  const [inline]

Item* Falcon::PropertyTable::getValue ( uint32  pos  )  [inline]

const Item* Falcon::PropertyTable::getValue ( const String key  )  const [inline]

bool Falcon::PropertyTable::isReflective (  )  const [inline]

bool Falcon::PropertyTable::isStatic (  )  const [inline]

uint32 Falcon::PropertyTable::size (  )  const [inline]


Member Data Documentation


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

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