Falcon::CoreArray Class Reference

Core array (or array of items). More...

#include <carray.h>

Inheritance diagram for Falcon::CoreArray:

Inheritance graph
[legend]

List of all members.

Public Member Functions

void append (const Item &ndata)
Itemat (int32 pos)
const Itemat (int32 pos) const
CoreDictbindings () const
bool canBeMethod () const
 Returns true if this array should be considered a method when callable and stored in a property.
void canBeMethod (bool b)
 Determines if this array can be seen as a method in a class.
bool change (const CoreArray &other, int32 begin, int32 end)
bool checkPosBound (int32 &pos)
 Checks the position to be in the array, and eventually changes it if it's negative.
CoreArrayclone () const
 CoreArray (uint32 prealloc)
 CoreArray (const CoreArray &other)
 CoreArray ()
 Creates the core array.
int32 find (const Item &itm) const
virtual void gcMark (uint32 gen)
 Applies mark to subclasses.
ItemgetProperty (const String &name)
 Gets a proprty of this vector.
bool insert (const CoreArray &other, int32 pos)
bool insert (const Item &ndata, int32 pos)
bool insertSpace (uint32 pos, uint32 size)
virtual bool isFunc () const
ItemArrayitems ()
const ItemArrayitems () const
void length (uint32 size)
uint32 length () const
CoreDictmakeBindings ()
 Create the bindings for this array, or get those already created.
void merge (const CoreArray &other)
void merge_front (const CoreArray &other)
virtual const Stringname () const
const Itemoperator[] (int32 pos) const throw ()
Itemoperator[] (int32 pos) throw ()
CoreArraypartition (int32 start, int32 end) const
void prepend (const Item &ndata)
virtual void readIndex (const Item &pos, Item &target)
 Implements the deep item interface.
virtual void readProperty (const String &prop, Item &item)
 Implements the deep item interface.
virtual void readyFrame (VMachine *vm, uint32 paramCount)
bool remove (int32 first, int32 last)
bool remove (int32 pos)
void reserve (uint32 size)
void resize (uint32 size)
void setBindings (CoreDict *binds)
void setProperty (const String &name, const Item &data)
 Set a property in this array.
void table (CoreObject *t)
CoreObjecttable () const
void tablePos (uint32 tp)
uint32 tablePos () const
virtual void writeIndex (const Item &pos, const Item &target)
 Implements the deep item interface.
virtual void writeProperty (const String &prop, const Item &item)
 Implements the deep item interface.
 ~CoreArray ()


Detailed Description

Core array (or array of items).

Constructor & Destructor Documentation

Falcon::CoreArray::CoreArray (  ) 

Creates the core array.

Falcon::CoreArray::CoreArray ( const CoreArray other  ) 

Falcon::CoreArray::CoreArray ( uint32  prealloc  ) 

Falcon::CoreArray::~CoreArray (  ) 


Member Function Documentation

void Falcon::CoreArray::append ( const Item ndata  )  [inline]

Item& Falcon::CoreArray::at ( int32  pos  )  [inline]

const Item& Falcon::CoreArray::at ( int32  pos  )  const [inline]

CoreDict* Falcon::CoreArray::bindings (  )  const [inline]

bool Falcon::CoreArray::canBeMethod (  )  const [inline]

Returns true if this array should be considered a method when callable and stored in a property.

void Falcon::CoreArray::canBeMethod ( bool  b  )  [inline]

Determines if this array can be seen as a method in a class.

If the array is part of a table, it can never be a method, and this setting is ignored.

bool Falcon::CoreArray::change ( const CoreArray other,
int32  begin,
int32  end 
) [inline]

References m_itemarray.

bool Falcon::CoreArray::checkPosBound ( int32 pos  )  [inline]

Checks the position to be in the array, and eventually changes it if it's negative.

Parameters:
pos the position to be checked and eventually turned into a positive value.
Returns:
false if pos is outside the array size

CoreArray* Falcon::CoreArray::clone (  )  const

int32 Falcon::CoreArray::find ( const Item itm  )  const [inline]

virtual void Falcon::CoreArray::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.

Item* Falcon::CoreArray::getProperty ( const String name  ) 

Gets a proprty of this vector.

Properties are either bindings or table properties. Bindings override table-wide properties.

If the given property is not found, 0 is returned.

Parameters:
name The property to be found.
Returns:
the property item if found or zero.

bool Falcon::CoreArray::insert ( const CoreArray other,
int32  pos 
) [inline]

References m_itemarray.

bool Falcon::CoreArray::insert ( const Item ndata,
int32  pos 
) [inline]

bool Falcon::CoreArray::insertSpace ( uint32  pos,
uint32  size 
) [inline]

virtual bool Falcon::CoreArray::isFunc (  )  const [inline, virtual]

Implements Falcon::CallPoint.

ItemArray& Falcon::CoreArray::items (  )  [inline]

const ItemArray& Falcon::CoreArray::items (  )  const [inline]

void Falcon::CoreArray::length ( uint32  size  )  [inline]

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

CoreDict* Falcon::CoreArray::makeBindings (  ) 

Create the bindings for this array, or get those already created.

void Falcon::CoreArray::merge ( const CoreArray other  )  [inline]

References m_itemarray.

void Falcon::CoreArray::merge_front ( const CoreArray other  )  [inline]

References m_itemarray.

virtual const String& Falcon::CoreArray::name (  )  const [virtual]

Implements Falcon::CallPoint.

const Item& Falcon::CoreArray::operator[] ( int32  pos  )  const throw () [inline]

Item& Falcon::CoreArray::operator[] ( int32  pos  )  throw () [inline]

CoreArray* Falcon::CoreArray::partition ( int32  start,
int32  end 
) const

void Falcon::CoreArray::prepend ( const Item ndata  )  [inline]

virtual void Falcon::CoreArray::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::CoreArray::readProperty ( const String ,
Item item 
) [virtual]

Implements the deep item interface.

May throw AccessError * if the property cannot be read.

Implements Falcon::DeepItem.

virtual void Falcon::CoreArray::readyFrame ( VMachine vm,
uint32  paramCount 
) [virtual]

Implements Falcon::CallPoint.

bool Falcon::CoreArray::remove ( int32  first,
int32  last 
) [inline]

bool Falcon::CoreArray::remove ( int32  pos  )  [inline]

void Falcon::CoreArray::reserve ( uint32  size  )  [inline]

void Falcon::CoreArray::resize ( uint32  size  )  [inline]

void Falcon::CoreArray::setBindings ( CoreDict binds  )  [inline]

void Falcon::CoreArray::setProperty ( const String name,
const Item data 
)

Set a property in this array.

If there is a biniding with the given property name, that item is updated. If not, If there is a table with a column name, the coresponding item in the array is updated. If not, new bindings are created, and the property is stored as a new binding.

Parameters:
name The property to be updated.
data The update data.

void Falcon::CoreArray::table ( CoreObject t  )  [inline]

CoreObject* Falcon::CoreArray::table (  )  const [inline]

void Falcon::CoreArray::tablePos ( uint32  tp  )  [inline]

uint32 Falcon::CoreArray::tablePos (  )  const [inline]

virtual void Falcon::CoreArray::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::CoreArray::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:32 2009 for Falcon_Core by  doxygen 1.5.8