Falcon::CacheObject Class Reference

#include <cacheobject.h>

Inheritance diagram for Falcon::CacheObject:

Inheritance graph
[legend]

List of all members.

Public Member Functions

ItemcachedProperty (const String &name) const
ItemcachedPropertyAt (uint32 pos) const
virtual bool deserialize (Stream *stream, bool bLive)
 Deserializes the object from a stream.
virtual void gcMark (uint32 mark)
 Mark the items in the cache and the inner data, if it's garbageable.
virtual bool getProperty (const String &key, Item &ret) const
 Returns the a shallow item copy of required property.
virtual void reflectFrom (void *user_data)
 Reflect an external data into this object.
virtual void reflectTo (void *user_data) const
 Reflect this object into external data.
virtual bool serialize (Stream *stream, bool bLive) const
 Serializes this instance on a stream.
virtual bool setProperty (const String &prop, const Item &value)
 Sets a property in the object.
virtual ~CacheObject ()

Protected Member Functions

 CacheObject (const CacheObject &other)
 CacheObject (const CoreClass *generator, bool bSeralizing=false)

Protected Attributes

Itemm_cache


Constructor & Destructor Documentation

Falcon::CacheObject::CacheObject ( const CoreClass generator,
bool  bSeralizing = false 
) [protected]

Falcon::CacheObject::CacheObject ( const CacheObject other  )  [protected]

virtual Falcon::CacheObject::~CacheObject (  )  [virtual]


Member Function Documentation

Item* Falcon::CacheObject::cachedProperty ( const String name  )  const [inline]

Item* Falcon::CacheObject::cachedPropertyAt ( uint32  pos  )  const [inline]

virtual bool Falcon::CacheObject::deserialize ( Stream stream,
bool  bLive 
) [virtual]

Deserializes the object from a stream.

The object should be created shortly before this call, giving instruction to the constructor not to perform a full initialization, as the content of the object will be soon overwritten.

Will throw in case of error.

Exceptions:
IOError in case of stream error.
Parameters:
stream The stream from which to read the object.
bLive If true,
Returns:
External call indicator. In case it returns true, the caller should

Reimplemented from Falcon::CoreObject.

virtual void Falcon::CacheObject::gcMark ( uint32  mark  )  [virtual]

Mark the items in the cache and the inner data, if it's garbageable.

If this object contains an external FalconData instance, it gets marked; anyhow, this function marks the cache items.

Reimplemented from Falcon::CoreObject.

Reimplemented in Falcon::core::ErrorObject.

virtual bool Falcon::CacheObject::getProperty ( const String prop,
Item value 
) const [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.

Reimplemented in Falcon::CRObject.

virtual void Falcon::CacheObject::reflectFrom ( void *  user_data  )  [virtual]

Reflect an external data into this object.

This method uses the reflection informations in the generator class property table to load the data stored in the user_data parameter into the local item vector cache.

As this is an optional operation, the base class implementation does nothing.

virtual void Falcon::CacheObject::reflectTo ( void *  user_data  )  const [virtual]

Reflect this object into external data.

This method uses the reflection informations in the generator class property table to store a C/C++ copy of the data stored in the local cache of this object into an external data.

As this is an optional operation, the base class implementation does nothing.

virtual bool Falcon::CacheObject::serialize ( Stream stream,
bool  bLive 
) const [virtual]

Serializes this instance on a stream.

Exceptions:
IOError in case of stream error.

Reimplemented from Falcon::CoreObject.

virtual bool Falcon::CacheObject::setProperty ( const String prop,
const Item value 
) [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.

Reimplemented in Falcon::CRObject.


Member Data Documentation

Item* Falcon::CacheObject::m_cache [mutable, protected]


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