Main Table of Contents


Table of Contents

class PtClassRight
PtClassRight: class summary
PtClassRight::PtClassRight()
PtClassRight::~PtClassRight()
PtClassRight::Match()

class PtClassRight


Intro
PtClassRight: class summary
PtClassRight::PtClassRight()
PtClassRight::~PtClassRight()
PtClassRight::Match()

PtClassRight is a class which is used to assign rights to a class when user authorization is enabled. To assign rights, simply create a PtClassRight, specifying the user or group and the class to which these rights should be given, then store the PtClassRight in the database. To store a PtClassRight, you must have POETADM rights. See "User Authorization" for details.

The PtClassRight class is pre-registered in every POET dictionary. Here is the equivalent class declaration for PtClassRight:

PtClassRight _persistent class PtClassRight


PtClassRight: class summary


Intro

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

Member functions:

constructor PtClassRight(PtUser* , PtClassId& , unsigned short readable, unsigned short writable, unsigned short deletable);
destructor virtual ~PtClassRight();
Match virtual int Match(PtClassId& );

PtClassRight::PtClassRight()


Intro

Declaration:

PtClassRight::PtClassRight(PtUser* pUser, PtClassId& classId, unsigned short readable, unsigned short writable, unsigned short deletable)

Description:

Constructor. Creating and storing a PtClassRight assigns rights to the class.

Parameters:

PtUser* pUser The user or group who should be granted these rights
PtClassId& classId The class to which rights should be granted
unsigned short readable Read rights to be granted
unsigned short writable Write rights to be granted
unsigned short deletable Delete rights to be granted

You can get a PtClassId for a class by browsing the class dictionary, or by calling PtObject:: GetClassId() for an object of the given class.

Please note:

Rights are not granted until the PtRight is actually stored.


PtClassRight::~PtClassRight()


Intro

Declaration:

virtual PtClassRight::~PtClassRight()

Description:

Destructor.


PtClassRight::Match()


Intro

Declaration:

virtual int PtClassRight::Match(PtClassId& classId)

Description:

Returns a non-zero value if the class for which the PtClassRight is defined is the same class as classId or is a base class for classId.

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.