Owner.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
// Copyright (c) 1994 James Clark
// See the file COPYING for copying permission.
#pragma ident "%Z%%M% %I% %E% SMI"
#ifndef Owner_INCLUDED
#define Owner_INCLUDED 1
// A pointer that owns the object pointed to.
// T must be of class type.
// This is coded so that T need not yet have been defined.
#ifdef SP_NAMESPACE
#endif
~Owner();
void operator=(T *p) {
p_ = p;
}
}
T *extract() {
p_ = 0;
return tem;
}
void clear() {
if (p_) {
del();
p_ = 0;
}
}
void del();
T *p_;
};
#ifdef SP_NAMESPACE
}
#endif
#endif /* not Owner_INCLUDED */
#ifdef SP_DEFINE_TEMPLATES
#include "Owner.cxx"
#endif