Teko Version of the Day
Public Member Functions
Teko::AutoClone< CloneType, BaseType > Class Template Reference

#include <Teko_CloneFactory.hpp>

Inheritance diagram for Teko::AutoClone< CloneType, BaseType >:
Inheritance graph

List of all members.

Public Member Functions

 AutoClone ()
virtual Teuchos::RCP< Cloneableclone () const

Detailed Description

template<class CloneType, class BaseType = AutoCloneDummy>
class Teko::AutoClone< CloneType, BaseType >

Class that provides an easy way to create a cloneable class. All that is required is that the user implements a default constructor. This also serves as a model for creating other AutoClone-like interfaces.

The template parameter CloneType describes the type of cloned object to returned. An object returned from AutoClone::clone will be typed as CloneType. The BaseType is the parent type of the cloned object created. It is included, with default AutoCloneDummy, so that no instantiaions of CloneType are unnecessarily created.

Use of this class assumes the CloneType and BaseType classes have a default constructor and does not override the clone method.

Definition at line 93 of file Teko_CloneFactory.hpp.

Constructor & Destructor Documentation

template<class CloneType , class BaseType = AutoCloneDummy>
Teko::AutoClone< CloneType, BaseType >::AutoClone ( ) [inline]

Simple default constructor, calls the default constructor of BaseType

Definition at line 100 of file Teko_CloneFactory.hpp.

Member Function Documentation

template<class CloneType , class BaseType = AutoCloneDummy>
virtual Teuchos::RCP<Cloneable> Teko::AutoClone< CloneType, BaseType >::clone ( ) const [inline, virtual]

Function that clones this object. This is not neccessarily a copy, but it is an object of the same dynamic type.

A pointer to an object of the same type is returned

Implements Teko::Cloneable.

Definition at line 111 of file Teko_CloneFactory.hpp.

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables