Playa::Handleable< Base > Class Template Reference
List of all members.
class Playa::Handleable< Base >
provides an abstract interface for polymorphic conversion from raw pointers to smart pointers. Recall from the Teuchos RefCountPtr documentation that one should never create directly a smart pointer from a raw pointer; rather, smart pointers should be created through a call to rcp(). The type of the argument to rcp() must be known at compile time. This makes the syntax
Handle h = new Derived();
impossible with the straightforward implementation in which Handle
takes a raw pointer to a Base. In order to preserve this clean syntax, we require any handles supporting this syntax to take a raw pointer to a Handleable<Base>, where Handleable<Base> provides a getRcp()
method which returns the result of a call to rcp() on this.
Definition at line 36 of file PlayaHandleable.hpp.
Constructor & Destructor Documentation
Member Function Documentation
Return a safely-created RefCountPtr to the base type
Implemented in Playa::AnasaziEigensolver< Scalar >, Playa::BlockTriangularSolver< Scalar >, Playa::BlockTriangularSolver< Scalar >, Playa::EpetraVectorType, Playa::GenericLeftPreconditioner< Scalar >, Playa::GenericRightPreconditioner< Scalar >, Playa::GenericLeftPreconditioner< Scalar >, Playa::NewtonArmijoSolver< Scalar >, Playa::NOXSolver, Playa::PoissonBoltzmannOp, and Playa::SerialVectorType.
The documentation for this class was generated from the following file: