#include <coherence/lang/cloneable_spec.hpp>
Inherits class_spec< T, E, I >.
It addition to the features auto-generated by the class_spec<> helper template cloneable_spec<> auto-generates an implementation of "Object::Handle clone() const" which delegates to the defined classes const copy constructor.
A normal cloneable class definition would be:
class Foo : public cloneable_spec<Foo, extends<Bar>, implements<SomeInterface, SomeOtherInterface> > { // add support for auto-generated static create methods friend class factory<Foo>; protected: // Constructors are defined as protected, and access via // auto-generated create methods, with matching signatures Foo() : super() ... { } // Copy constructor Foo(const Foo& that) : super(that) ... { } public: // normal class definition.... };
Public Types | |
typedef cloneable_spec | this_spec |
Specification definition. | |
typedef cloneable_spec | super |
Definition T's parent class. | |
typedef class_spec < T, E, I > | super_spec |
Definition of the spec's parent class. | |
Public Member Functions | |
virtual TypedHandle < Object > | clone () const |
Protected Member Functions | |
cloneable_spec () | |
Generate a set of proxy constructors matching the signatures of the parent class's constructors. |
cloneable_spec | ( | ) | [inline, protected] |
Generate a set of proxy constructors matching the signatures of the parent class's constructors.
NOTE: Compilation errors referencing this line likely indicate that class being defined by this spec makes calls a "super" constructor supplying a set of parameters for which there is no exact match on the parent class.