VuFilter  class

Subclasses :VuKeyFilter; VuStandardFilter; VuAssociationFilter; VuTypeFilter; VuOpaqueFilter



#ifdef USE_SH_POOLS
public:
                // Overload new/delete to use a SmartHeap pool
                void *operator new(size_t size) { return MemAllocPtr(gVuFilterMemPool,size,FALSE);      };
                void operator delete(void *mem) { if (mem) MemFreePtr(mem); };
#endif
public:
  virtual ~VuFilter();

  virtual int Compare(VuEntity *ent1, VuEntity *ent2) = 0;
        //  < 0 --> ent1  < ent2
        // == 0 --> ent1 == ent2
        //  > 0 --> ent1  > ent2
  virtual VU_BOOL Test(VuEntity *ent) = 0;
        // TRUE --> ent in sub-set
        // FALSE --> ent not in sub-set
  virtual VU_BOOL RemoveTest(VuEntity *ent);
        // TRUE --> ent might be in sub-set
        // FALSE --> ent could never have been in sub-set
        //   -- default implementation returns True()
  virtual VU_BOOL Notice(VuMessage *event);
        // TRUE --> event may cause a change to result of Test()
        // FALSE --> event will never cause a change to result of Test()
        //   -- default implementation returns FALSE

  virtual VuFilter *Copy() = 0;         // allocates and returns a copy

protected:
  // base is empty
  VuFilter() {}
  // copy constructor
  VuFilter(VuFilter *) {}

// DATA
 // implementation (and members) empty
 // --> must be provided by sub-classes