Main Table of Contents


Table of Contents

class PtRight
PtRight: class summary
PtRight::PtRight()
PtRight::~PtRight()
PtRight::AddToList()
PtRight::ClearDeletable()
PtRight::ClearReadable()
PtRight::ClearWritable()
PtRight::GetDescId()
PtRight::IsDeletable()
PtRight::IsReadable()
PtRight::IsWritable()
PtRight::Match()
PtRight::Match()
PtRight::SetDeletable()
PtRight::SetReadable()
PtRight::SetWritable()

class PtRight


Intro
PtRight: class summary
PtRight::PtRight()
PtRight::~PtRight()
PtRight::AddToList()
PtRight::ClearDeletable()
PtRight::ClearReadable()
PtRight::ClearWritable()
PtRight::GetDescId()
PtRight::IsDeletable()
PtRight::IsReadable()
PtRight::IsWritable()
PtRight::Match()
PtRight::Match()
PtRight::SetDeletable()
PtRight::SetReadable()
PtRight::SetWritable()

In POET, you assign rights to users or groups by creating PtRights and storing them. Each PtRight assigns rights to a given class. There are two kinds of PtRights: PtClassRight assigns rights to a class regardless of the values of the objects, and PtAttributeRight assigns rights to those objects of a class which contain certain values.

To store a PtRight, you must have POETADM rights. See "User Authorization" for details.

The PtRight class is pre-registered in every POET dictionary, and classes for ondemands, sets, allsets, and queries for PtRight have also been pre-registered.

The following table lists the pre-registered classes, and shows the equivalent class declaration for each class:

PtRight _persistent class PtRight
PtRightOnDemand typedef ondemand<PtRight> PtRightOnDemand
PtRightOnDemandCSet typedef cset<ondemand<PtRight>> PtRightOnDemandCSet;

PtRight does not have a public constructor. In your programs, you should not create a PtRight directly, you should create a PtClassRight or a PtAttributeRight. Each of these classes is derived from PtRight.


PtRight: class summary


Intro

Files to include Class declaration Base class
poet.hxx ptuser.hxx ptrights.hxx PtObject

Member functions:

protected constructor PtRight(PtUser* , PtClassId& , unsigned short readable, unsigned short writable, unsigned short deletable);
protected destructor virtual ~PtRight();
AddToList virtual int AddToList(PtLinkedList*);
ClearDeletable inline void ClearDeletable();
ClearReadable inline void ClearReadable();
ClearWritable inline void ClearWritable();
GetDescId inline PtClassId GetDescId();
IsDeletable inline int IsDeletable();
IsReadable inline int IsReadable();
IsWritable inline int IsWritable();
Match virtual int Match(PtClassId& );
SetDeletable inline void SetDeletable();
SetReadable inline void SetReadable();
SetWritable inline void SetWritable();

PtRight::PtRight()


Intro

Declaration:

PtRight::PtRight(PtUser* , PtClassId& , unsigned short readable, unsigned short writable, unsigned short deletable)

Description:

This constructor is protected, so you can not call it directly. You should always create an object whose class is derived from PtRight, such as PtClassRight or PtAttributeRight.


PtRight::~PtRight()


Intro

Declaration:

virtual PtRight::~PtRight()

Description:

Destructor.


PtRight::AddToList()


Intro

Declaration:

virtual PtRight::AddToList()

Description:

This method is used for internal purposes only.


PtRight::ClearDeletable()


Intro

Declaration:

inline void PtRight::ClearDeletable()

Description:

Clears the delete rights for the class that this PtRight governs.


PtRight::ClearReadable()


Intro

Declaration:

inline void PtRight::ClearReadable()

Description:

Clears the read rights for the class that this PtRight governs.


PtRight::ClearWritable()


Intro

Declaration:

inline void PtRight::ClearWritable()

Description:

Clears the write rights for the class that this PtRight governs.


PtRight::GetDescId()


Intro

Declaration:

inline PtClassId PtRight::GetDescId()

Description:

Returns the PtClassId for the class that this PtRight governs.


PtRight::IsDeletable()


Intro

Declaration:

inline int PtRight::IsDeletable()

Description:

Reports whether this PtRight grants delete rights.


PtRight::IsReadable()


Intro

Declaration:

inline int PtRight::IsReadable()

Description:

Reports whether this PtRight grants read rights.


PtRight::IsWritable()


Intro

Declaration:

inline int PtRight::IsWritable()

Description:

Reports whether this PtRight grants write rights.


PtRight::Match()


Intro

Declaration:

virtual int PtRight::Match(PtClassId& )

Description:

Determines whether the PtRight grants rights for the given class. This function is virtual; in the PtRight class, it always returns 0. The interesting implementation is in the class PtClassRight.


PtRight::Match()


Intro

Declaration:

virtual int PtRight::Match(PtClassId &clid, PtClassId &scope, unsigned short mempos, PtTypeId typid)

Description:

Determines whether the PtRight grants rights for the given class. This function is virtual; in the PtRight class, it always returns 0. The interesting implementation is in the class PtAttributeRight.


PtRight::SetDeletable()


Intro

Declaration:

inline void PtRight::SetDeletable()

Description:

Sets delete rights for the PtRight. These rights first become active when you store the PtRight.


PtRight::SetReadable()


Intro

Declaration:

inline void PtRight::SetReadable()

Description:

Sets read rights for the PtRight. These rights first become active when you store the PtRight.


PtRight::SetWritable()


Intro

Declaration:

inline void PtRight::SetWritable()

Description:

Sets write rights for the PtRight. These rights first become active when you store the PtRight.

Copyright (c) 1996 POET Software, Inc. All rights reserved. Reproduction in whole or in part in any form or medium without the express permission of POET Software, Inc. is prohibited.