For every object in the Graphcode system, there is an objref
on
every processor referring to it.
Synopsis:
class objref { public: GraphID_t ID; unsigned int proc; objref(GraphID_t id=0, int proc=myid(), object *o=NULL); objref(GraphID_t id, int proc, object &o); objref(const objref& x); ~objref(); objref& operator=(const objref& x); object& operator*(); object* operator->(); const object* operator->() const; const object* operator->() const; void addref(object* o, bool mflag=false); bool nullref() const; void nullify(); };
mflag
parameter indicates whether the object is managed (created by new
or
lnew()
), and can be safely deleted
when nullified, or
is an external object that should not be deleted. An objref can also
be instantiated already pointing to an unmanaged object via its constructor.