If your set declaration contains ondemands then PTXX derives your set from PtOnDemandSet. OnDemandSets are derived from PtObjectSet. The implementation is different, but the programming interface is virtually identical.
These methods are documented under PtObjectSet. This chapter documents only those methods which differ from those in PtObjectSet. Please read the chapter "Sets" in the Programmer's Guide for general guidelines on declaring and programming with sets. Set declaration syntax is explained in the chapter "The PTXX Precompiler." In this Reference Guide, "PTXX-generated classes" shows the code which PTXX generates for an ondemand set in your persistent class declarations.
Files to include | Class declaration | Base class |
poet.hxx | ptondset.hxx | PtObjectSet |
Forget | int Forget(); |
Make | static PtOnDemandSet* Make(PtBase* , const PtString& ClassName, PtSetType); |
- int PtOnDemandSet::Forget()
If the set is responsible for the referenced object, decrements the link count for the referenced object and removes responsibility for the object.
- static PtOnDemandSet* PtOnDemandSet::Make(PtBase* , const PtString& ClassName, PtSetType)
Creates an ondemand set to contain objects of the given class, and assigns the set to the database. Since this is a static function, you do not need to create an PtOnDemandSet to call this function.
PtBase* pBase | The database to which the set should be assigned |
const PtString& ClassName | The name of the class that the set should contain |
PtSetType type | PtCSET, PtLSET, or PtHSET |
A pointer to the new set. If the set could not be created, returns 0.
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.