Main Table of Contents


Table of Contents

enum PtDepthMode

enum PtDepthMode


Intro

When you store, delete, lock, or watch an object, you often want to do the same thing to the objects that it references via pointers, ondemands, pointer sets, or ondemand sets. Therefore, functions like Store(), Delete(), Lock(), and Watch() use depth modes to determine which referenced objects should be involved. PtDepthMode can be PtFLAT, PtSHALLOW, PtNO_ONDEMAND, or PtDEEP. The following diagrams show how each of these depth modes affect referenced objects. In these diagrams, the root object is the object which is actually stored, deleted, watched, or locked.

The diagrams distinguish three kinds of objects. The target of a pointer is an object which is referenced through a pointer or a pointer set:

persistent class RootObject
{
Person* TargetOfPointer;
lset<Person*> TargetOfPointerInSet;
};

The target of an ondemand is an object which is referenced through an ondemand or an ondemand set:

persistent class RootObject
{
ondemand<Person> TargetOfOnDemand;
lset<ondemand<Person>> TargetOfOnDemandInSet;
};

A dependent object is a referenced object whose pointer, ondemand, or set is declared to be dependent with the depend keyword in the class declaration:

persistent class RootObject
{
depend Person* DependentPerson;
depend lset<Person*> DependentPointerSet;
depend ondemand<Person> DependentOnDemand;
depend lset<ondemand<Person>> DependentOnDemandSet;
};

PtFLAT Only the object itself is involved
PtSHALLOW (default for Delete()) The object and its dependent objects are involved
PtNO_ONDEMAND The object and all referenced objects that are not ondemands are involved
PtDEEP (default for Store()) The object and all referenced objects are involved

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.