Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

PropertyAccessControl Class Reference

Use subclasses of PropertyAccessControl to implement various access control policies on property reads and writes. More...

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

Inheritance diagram for PropertyAccessControl:

NoPropertyAccessControl ReadOnlyPropertyAccessControl List of all members.

Public Member Functions

Static Public Member Functions


Detailed Description

Use subclasses of PropertyAccessControl to implement various access control policies on property reads and writes.

Definition at line 348 of file property.hh.


Member Function Documentation

void PropertyAccessControl::addPolicy PropertyAccessControl ac  )  [static]
 

Add a new access control policy.

This policy will be available as whatever name is returned by ac->getPolicyName().

Parameters:
ac The policy object.

Definition at line 49 of file property.cc.

void PropertyAccessControl::addPolicyFactory const string &  name,
PropertyAccessControlFactory  ac
[static]
 

Add a new access control policy.

The difference between this and the other addPolicy method is that a policy factory creates a new policy object each time getPolicy() is called, whereas otherwise the same policy object will be returned each time. This is useful if you want to write an access control policy bound to a specific object that keeps some state about that object.

Parameters:
name The policy name. This should be the same as the name returned by getPolicyName() for the factory-created objects.
ac The policy factory.

Definition at line 55 of file property.cc.

virtual bool PropertyAccessControl::checkChangePermission PropertyEvent event,
string &  message
[pure virtual]
 

AccessControl callback to check if a given Vobject is permitted to change this property.

Parameters:
event the requested change

Implemented in NoPropertyAccessControl, and ReadOnlyPropertyAccessControl.

virtual bool PropertyAccessControl::checkReadPermission PropertyEvent event,
string &  message
[pure virtual]
 

AccessControl callback to check if a given Vobject is permitted to read a section of this property.

Parameters:
event the requested read

Implemented in NoPropertyAccessControl, and ReadOnlyPropertyAccessControl.

PropertyAccessControl * PropertyAccessControl::getPolicy const string &  name,
LocalProperty lv
[static]
 

Get the requested policy given the name and LocalVobject.

Parameters:
name The policy name, registered at some point using addPolicy()
lv The LocalProperty this policy will be added to (doesn't actually add it, but a policy factory may want to know what object it is being added to)
Returns:
the policy object, or NULL if there is no registered policy with that name

Definition at line 61 of file property.cc.

Referenced by LocalProperty::insertPropertyAccessControl().

virtual const string PropertyAccessControl::getPolicyName  )  [pure virtual]
 

Get a short string describing this policy.

Implemented in NoPropertyAccessControl, and ReadOnlyPropertyAccessControl.

Referenced by addPolicy().

void PropertyAccessControl::removePolicy const string &  name  )  [static]
 

Remove policy with the given name.

Parameters:
name policy name

Definition at line 71 of file property.cc.


The documentation for this class was generated from the following files:
Generated on Tue Aug 12 03:55:56 2003 for Interreality Project - VOS by doxygen 1.3.2