Falcon::CoreCarrier< _T > Class Template Reference

#include <corecarrier.h>

Inheritance diagram for Falcon::CoreCarrier< _T >:

Inheritance graph
[legend]

List of all members.

Public Member Functions

void carried (_T *c)
_T * carried () const
virtual CoreObjectclone () const
 Creates a shallow copy of this item.
 CoreCarrier (const CoreCarrier &cc)
 CoreCarrier (const CoreClass *base, _T *la)
bool getProperty (const String &key, Item &ret) const
 Returns the a shallow item copy of required property.
bool hasProperty (const String &key) const
 Returns true if the class provides a certain property.
bool setProperty (const String &prop, const Item &value)
 Sets a property in the object.
virtual ~CoreCarrier ()

template<class _T>
class Falcon::CoreCarrier< _T >


Constructor & Destructor Documentation

template<class _T>
Falcon::CoreCarrier< _T >::CoreCarrier ( const CoreClass base,
_T *  la 
) [inline]

template<class _T>
Falcon::CoreCarrier< _T >::CoreCarrier ( const CoreCarrier< _T > &  cc  )  [inline]

template<class _T>
virtual Falcon::CoreCarrier< _T >::~CoreCarrier (  )  [inline, virtual]


Member Function Documentation

template<class _T>
void Falcon::CoreCarrier< _T >::carried ( _T *  c  )  [inline]

template<class _T>
_T* Falcon::CoreCarrier< _T >::carried (  )  const [inline]

template<class _T>
virtual CoreObject* Falcon::CoreCarrier< _T >::clone (  )  const [inline, virtual]

Creates a shallow copy of this item.

Will return zero if this item has a non-cloneable user-defined data, that is, it's not fully manageable by the language.

Clone operation requests the class ObjectManager to clone the user_data stored in this object, if any. In turn, the ObjectManager may ask the user_data, properly cast, to clone itself. If one of this operation fails or is not possible, then the method returns 0. The VM will eventually raise a CloneError to signal that the operation tried to clone a non manageable user-data object.

If this object has not a user_data, then the cloneing will automatically succeed.

Returns:
a shallow copy of this item.

Implements Falcon::CoreObject.

template<class _T>
bool Falcon::CoreCarrier< _T >::getProperty ( const String prop,
Item value 
) const [inline, virtual]

Returns the a shallow item copy of required property.

The copy is shallow; strings, arrays and complex data inside the original property are shared.

Parameters:
prop the property to be found
value an item containing the object proerty copy.
Returns:
true if the property can be found, false otherwise

Implements Falcon::CoreObject.

References Falcon::CoreObject::defaultProperty().

template<class _T>
bool Falcon::CoreCarrier< _T >::hasProperty ( const String prop  )  const [inline, virtual]

Returns true if the class provides a certain property.

Should not account Object metaclass properties, unless explicitly overloaded.

Parameters:
prop The property to be searched.
Returns:
true if the generator class provides this property.

Reimplemented from Falcon::CoreObject.

References Falcon::PropertyTable::findKey(), Falcon::CoreObject::generator(), and Falcon::CoreClass::properties().

Referenced by Falcon::CoreCarrier< _T >::setProperty().

template<class _T>
bool Falcon::CoreCarrier< _T >::setProperty ( const String prop,
const Item value 
) [inline, virtual]

Sets a property in the object.

If the property is found, the value in the item is copied, otherwise the object is untouched and false is returned.

In case of reflected objects, it may be impossible to set the property. In that case, the owning vm gets an error, and false is returned.

Parameters:
prop The property to be set.
value The item to be set in the property.
Returns:
ture if the property can be set, false otherwise.

Implements Falcon::CoreObject.

References Falcon::e_orig_runtime, and Falcon::CoreCarrier< _T >::hasProperty().


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