//
// common.h - a common abstract type for objects placed in containers
//
#ifndef COMMON_H_INCLUDED
#define COMMON_H_INCLUDED
#include <iostream.h>
class common
{
public:
virtual const common &
operator=(const common &c) = 0;
virtual common *dup() const = 0;
virtual size_t size() const = 0;
virtual ostream &write(ostream &s) const = 0;
virtual istream &read(istream &s) = 0;
virtual ~common() { }
};
inline ostream &operator<<(ostream &os, const common &c)
{
return c.write(os);
}
inline istream &operator>>(istream &os, common &c)
{
return c.read(os);
}
#endif
/* End of File */