#include <Teko_CloneFactory.hpp>

Public Member Functions | |
| CloneFactory () | |
| Default constructor. | |
| CloneFactory (const CloneFactory< CloneBaseType > &cf) | |
| Copy constructor. | |
| 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. | |
| void | getCloneNames (std::vector< std::string > &names) const |
Protected Attributes | |
| std::map< std::string, Teuchos::RCP< const Cloneable > > | parentClones_ |
| stores the clonable objects | |
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.
| Teko::CloneFactory< CloneBaseType >::CloneFactory | ( | ) | [inline] |
Default constructor.
Definition at line 132 of file Teko_CloneFactory.hpp.
| Teko::CloneFactory< CloneBaseType >::CloneFactory | ( | const CloneFactory< CloneBaseType > & | cf | ) | [inline] |
Copy constructor.
Definition at line 135 of file Teko_CloneFactory.hpp.
| virtual Teuchos::RCP<CloneBaseType> Teko::CloneFactory< CloneBaseType >::build | ( | const std::string & | str | ) | const [inline, virtual] |
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.
| virtual void Teko::CloneFactory< CloneBaseType >::addClone | ( | const std::string & | str, |
| const Teuchos::RCP< Cloneable > & | clone | ||
| ) | [inline, virtual] |
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.
| virtual int Teko::CloneFactory< CloneBaseType >::cloneCount | ( | ) | const [inline, virtual] |
Return the number of clones stored in this factory.
Definition at line 174 of file Teko_CloneFactory.hpp.
| void Teko::CloneFactory< CloneBaseType >::getCloneNames | ( | std::vector< std::string > & | names | ) | const [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.
std::map<std::string,Teuchos::RCP<const Cloneable> > Teko::CloneFactory< CloneBaseType >::parentClones_ [protected] |
stores the clonable objects
Definition at line 190 of file Teko_CloneFactory.hpp.
1.7.6.1