Oracle Coherence for C++ API
Release 3.6.0.0
E15728-01

- Main Page
- Namespaces
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# cloneable_spec Class Template Reference

`#include <coherence/lang/cloneable_spec.hpp>`

Inherits class_spec< T, E, I >.

List of all members.

## Detailed Description

### template<class T, class E = extends<Object>, class I = implements<>>
class coherence::lang::cloneable_spec< T, E, I >

Helper for defining a cloneable managed class.

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....
       };

See also:
  extends

  implements

Author:
  mf 2008.07.14

## 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.

## Constructor & Destructor Documentation

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.

The documentation for this class was generated from the following file:

- coherence/lang/cloneable_spec.hpp

Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.