#include <OTC/collctn/single.hh> template<class T> class OTC_Single : public OTC_MPObject {
public:
static os_typespec* get_os_typespec();
inline OTC_Single(T const& theFirst);
inline OTC_Single(OTC_Single<T> const& theSingle);
inline OTC_Single<T>& operator=(OTC_Single<T> const& theSingle);
inline T const& first() const;
inline T& first();
};
OTC_Single
class can be used to encapsulate a single item.
This class is generally only useful where you want to ensure
that an object is allocated from the common memory pool rather
than the normal free store. Multi valued variants of this class
are available in the form of the OTC_Pair
and OTC_Triple
classes.
inline OTC_Single(T const& theFirst);
theFirst
.
inline OTC_Single(OTC_Single<T> const& theSingle);
theSingle
.
inline OTC_Single<T>& operator=(OTC_Single<T> const& theSingle);
theSingle
.
inline T const& first() const;
inline T& first();
OTC_Pair
, OTC_Triple