#include <Teko_CloneFactory.hpp>
Public Member Functions | |
CloneFactory () | |
Default constructor. More... | |
CloneFactory (const CloneFactory< CloneBaseType > &cf) | |
Copy constructor. More... | |
virtual Teuchos::RCP < CloneBaseType > | build (const std::string &str) const |
virtual void | addClone (const std::string &str, const Teuchos::RCP< Cloneable > &clone) |
virtual int | cloneCount () const |
Return the number of clones stored in this factory. More... | |
void | getCloneNames (std::vector< std::string > &names) const |
Protected Attributes | |
std::map< std::string, Teuchos::RCP< const Cloneable > > | parentClones_ |
stores the clonable objects More... | |
This class eases the construction of clone factories. It takes any Cloneable object and associates it with a string. It will then perform the dynamic cast to whatever type the user specifies using the CloneBaseType template parameter.
Definition at line 129 of file Teko_CloneFactory.hpp.
|
inline |
Default constructor.
Definition at line 132 of file Teko_CloneFactory.hpp.
|
inline |
Copy constructor.
Definition at line 135 of file Teko_CloneFactory.hpp.
|
inlinevirtual |
Build a clone of the object associated with the string. This object is automatically cast to the desired base type. This will permit the easy use of the AutoClone class.
[in] | str | String associated with object to build. |
Definition at line 153 of file Teko_CloneFactory.hpp.
|
inlinevirtual |
Add a string associated clone to the factory. This object can be used later to build a clone of itself. If this method is called twice with the same string, the later clone will be maintained.
[in] | str | String associated with this object. |
[in] | clone | Object to be cloned. |
Definition at line 170 of file Teko_CloneFactory.hpp.
|
inlinevirtual |
Return the number of clones stored in this factory.
Definition at line 174 of file Teko_CloneFactory.hpp.
|
inline |
Get the label for all clones in this CloneFactory
.
[in,out] | names | Destination vector for the the clone names |
Definition at line 181 of file Teko_CloneFactory.hpp.
|
protected |
stores the clonable objects
Definition at line 190 of file Teko_CloneFactory.hpp.