interreality.org [VOS]
[Home] [About]
[Screenshots]
[Download]
[News]
[Community]
[Documentation] [Manual]
[Bugs & Requests] [Wiki]

VOS::BasicLocalProperty Class Reference
[libmetaobject_property]

#include <vos/metaobjects/property/basiclocalproperty.hh>

Inheritance diagram for VOS::BasicLocalProperty:

VOS::LocalProperty VOS::PersistBlockListener VOS::Property VOS::MetaObject VOS::Vobject VOS::Dispatchable VUtil::RefCounted List of all members.

Detailed Description

Base class for local properties.

Simply stores data and listeners.

Definition at line 14 of file basiclocalproperty.hh.

Public Member Functions

Static Public Member Functions

Protected Member Functions


Constructor & Destructor Documentation

VOS::BasicLocalProperty::BasicLocalProperty ( VobjectBase superobject  )  [protected]


Member Function Documentation

virtual void VOS::BasicLocalProperty::addPropertyListener ( PropertyListener pl,
bool  refresh = true 
) [virtual]

Add a new property listener to this property.

This listener's methods will be called when the property is modified.

See also:
PropertyListener
Parameters:
pl The new property listener. If it is also a RefCounted object, references will be acquired correctly.
refresh If given, determines whether the new property listener will be immediately notified of the current property contents.

Implements VOS::Property.

virtual bool VOS::BasicLocalProperty::getAsynchronousEvents (  )  [inline, virtual]

See also:
VUtil::ListenernBase::getAsynchronousEvents()

Implements VOS::LocalProperty.

Definition at line 113 of file basiclocalproperty.hh.

virtual const std::string VOS::BasicLocalProperty::getDataType (  )  [virtual]

Return type of decoded data (usually a MIME type).

Implements VOS::Property.

virtual int VOS::BasicLocalProperty::getLength (  )  [virtual]

Get length (bytes) of decoded data.

Implements VOS::Property.

virtual const std::string VOS::BasicLocalProperty::getVOSType (  )  [virtual]

Return MetaObject type, "property".

Implements VOS::Property.

static MetaObject* VOS::BasicLocalProperty::new_BasicLocalProperty ( VobjectBase superobject,
const std::string &  calledtype 
) [static]

virtual void VOS::BasicLocalProperty::notifyBlockChanged ( const std::string &  key,
const std::string &  data 
) [virtual]

Notify that a block has been changed.

Parameters:
key the key
data the new data

Implements VOS::PersistBlockListener.

virtual void VOS::BasicLocalProperty::notifyBlockChanging ( const std::string &  key,
const std::string &  data 
) [virtual]

Notify that a block is going to change, but the change has not yet been committed (this is mainly useful if you want to back up the old block before it is replaced by the new one).

Parameters:
key the key
data the new data

Implements VOS::PersistBlockListener.

virtual std::string VOS::BasicLocalProperty::read ( int  start,
int  length 
) [virtual]

Return substring of decoded data, possibly performing decode if necesary.

See also:
read(std::string, int int)

Implements VOS::Property.

virtual std::string VOS::BasicLocalProperty::read (  )  [virtual]

Return decoded data, possibly performing decode if necesary.

See also:
read(std::string, int int)

Implements VOS::Property.

virtual void VOS::BasicLocalProperty::read ( std::string &  target,
int  start,
int  length 
) [virtual]

Read a substring of decoded data into target, possibly performing decode if necesary.

Parameters:
target Place data in this string
start Byte offset to start reading
length Number of bytes to read. If this parameter is -1, read until the end of the data.

Implements VOS::Property.

virtual void VOS::BasicLocalProperty::read ( std::string &  target  )  [virtual]

Read decoded data into target, possibly performing decode if necesary.

See also:
read(std::string, int, int)

Implements VOS::Property.

virtual void VOS::BasicLocalProperty::removePropertyListener ( PropertyListener pl  )  [virtual]

Remove the property listener 'pl' from this property.

Parameters:
pl Listener to remove. If it is also a RefCounted object, references will be released correctly.

Implements VOS::Property.

virtual void VOS::BasicLocalProperty::replace ( Vobject initiator,
const std::string &  newdata,
const std::string &  newtype = "?" 
) [virtual]

Completely change the value and type of data stored in this property.

Parameters:
initiator Object requesting replacement, for access control check.
newdata New data.
newtype The type of the new datatype. If no type identifier was supplied, the previous one is kept.

Implements VOS::LocalProperty.

virtual void VOS::BasicLocalProperty::replace ( const std::string &  newdata,
const std::string &  newtype = "?" 
) [inline, virtual]

Completely change the value and type of data stored in this property.

Parameters:
newdata New data.
newtype The type of the new datatype. If no type identifier was supplied, the previous one is kept. NOTE: the initial datatype (set by the constructor) is "?" which is (or should be) an invalid value for any application.

Reimplemented from VOS::LocalProperty.

Definition at line 60 of file basiclocalproperty.hh.

virtual void VOS::BasicLocalProperty::setAsynchronousEvents ( bool  b  )  [inline, virtual]

See also:
VUtil::ListenernBase::setAsynchronousEvents()

Implements VOS::LocalProperty.

Definition at line 117 of file basiclocalproperty.hh.

static VUtil::vRef<ParentChildRelation> VOS::BasicLocalProperty::setProperty ( Vobject on,
const std::string &  propname,
const std::string &  propval,
const std::string &  valtype,
const std::string &  pac,
bool  letErrorThrough = false 
) [static]

Set a subproperty on an object, returning relation between object and property.

Parameters:
on Object to set a subproperty on
propname Name of the property to set
propval New value of the property
valtype Datatype of the new value
pac Property access control to add to the object it it had to be created (If property exists, this argument is ignored)
letErrorThrough If given, determines whether exceptions will be caught in this method (false), or thrown out to the caller (true).
Returns:
object expressing relation between the object and the property

Reimplemented from VOS::Property.

virtual void VOS::BasicLocalProperty::write ( Vobject initiator,
int  start,
const std::string &  newdata 
) [virtual]

Write newdata into property value, starting at byte position start.

Implements VOS::LocalProperty.

virtual void VOS::BasicLocalProperty::write ( int  start,
const std::string &  newdata 
) [inline, virtual]

Write newdata into property value, starting at byte position start.

Reimplemented from VOS::LocalProperty.

Definition at line 57 of file basiclocalproperty.hh.


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