Deriving TShapeInterest

TShapeInterest adds a shape ID. IsEqual uses it (along with the inherited implementation that uses the name and notifier) to define equality. No implementation is provided because it is standard.

      class TShapeInterest : public TInterest
      {
      public:
          MCollectibleDeclarationsMacro(TShapeInterest);
      
                                  TShapeInterest(MNotifier*, const TToken&, const TShape&);
                                  TShapeInterest(const TShapeInterest&);
          virtual                 ~TShapeInterest();
          const TShapeInterest&   operator =(const TShapeInterest&);
      
                  const TGlobalID GetShapeID() const;
      
          virtual TStream&        operator >>=(TStream&) const;
          virtual TStream&        operator <<=(TStream&);
      
          virtual Boolean         IsEqual(const MCollectible*) const;
          virtual long            Hash() const;
      
      protected:
                                  TShapeInterest();
      
      private:
          TGlobalID               fShapeID;
      
          enum { kOriginalVersion };
      };

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker