Objects

object is an abstract base class, from which all objects stored in the graph must be derived. A synopsis of the ABC is:

  class object: public Ptrlist
  {
  public:
    /* serialisation methods */
    virtual void lpack(pack_t *buf)=0; 
    virtual void lunpack(pack_t *buf)=0;
    /* virtual "constructors" */
    virtual object* lnew() const=0;  
    virtual object* lcopy() const=0;  
    virtual ~object() {}
    virtual int type() const=0;     /* return index into archetype table */
    /* partition weightings - redefine in derived type if needed */
    virtual idxtype weight() const {return 1;}
    virtual idxtype edgeweight(const objref& x) const {return 1;}
  };



Subsections