returns a copy of this
When implementing, your class should use its own type as the return type, e.g.:
class Foo : public Cloneable {
public:
virtual Foo* clone() { return new Foo(*this); }
};
HOWEVER, this is currently unsupported in gcc 3.3, which the latest version for which Sony has supplied the patches to work on the Aibo.
So instead, you must currently provide the interface exactly as shown, and then the caller will probably need to cast the result to the known type. Hopefully Sony will eventually update the gcc version to at least 3.4 and we can switch over to use the "covariant return type". |