Playa::Handle< PointerType > Class Template Reference

Class Playa::Handle provides a general implementation of the common features of reference-counted handles. More...

List of all members.

Public Member Functions

 Handle ()
 Empty ctor.
 Handle (const RCP< PointerType > &_ptr)
 Construct from a smart pointer.
 Handle (Handleable< PointerType > *rawPtr)
 Construct from a raw pointer to a Handleable.
const RCP< PointerType > & ptr () const
 Read-only access to the underlying smart pointer.
RCP< PointerType > & ptr ()
 Read-write access to the underlying smart pointer.
void print (std::ostream &os) const
 Print to a stream.
std::string description () const
 Return a short descriptive std::string using the Describable interface.
std::string fallbackDescription () const
 Write a fallback description to be used in objects that are neither named, printable, or describable.
int verb () const
 Return the verbosity.
void setVerb (int v)
 Set the verbosity.

Private Attributes

RCP< PointerType > ptr_


Detailed Description

template<class PointerType>
class Playa::Handle< PointerType >

Class Playa::Handle provides a general implementation of the common features of reference-counted handles.

Definition at line 72 of file PlayaHandle.hpp.


Constructor & Destructor Documentation

template<class PointerType>
Playa::Handle< PointerType >::Handle (  )  [inline]

Empty ctor.

Definition at line 76 of file PlayaHandle.hpp.

template<class PointerType>
Playa::Handle< PointerType >::Handle ( const RCP< PointerType > &  _ptr  )  [inline]

Construct from a smart pointer.

Definition at line 79 of file PlayaHandle.hpp.

template<class PointerType>
Playa::Handle< PointerType >::Handle ( Handleable< PointerType > *  rawPtr  )  [inline]

Construct from a raw pointer to a Handleable.

Definition at line 82 of file PlayaHandle.hpp.


Member Function Documentation

template<class PointerType >
std::string Playa::Handle< PointerType >::description (  )  const [inline]

Return a short descriptive std::string using the Describable interface.

If the contents of the handle cannot be downcasted or crosscasted to a Describable*, an exception will be thrown.

Reimplemented in Sundance::CellPredicate, Playa::Vector< Scalar >, and Playa::Vector< double >.

Definition at line 133 of file PlayaHandle.hpp.

References Playa::Handle< PointerType >::fallbackDescription(), and Playa::Handle< PointerType >::ptr_.

Referenced by Playa::EpetraVectorType::createGhostImporter(), Sundance::SubsetCellFilter::description(), Sundance::LabeledSubsetCellFilter::description(), and Sundance::SubsetCellFilter::SubsetCellFilter().

template<class PointerType >
std::string Playa::Handle< PointerType >::fallbackDescription (  )  const [inline]

Write a fallback description to be used in objects that are neither named, printable, or describable.

Definition at line 145 of file PlayaHandle.hpp.

Referenced by Playa::Handle< PointerType >::description().

template<class PointerType >
void Playa::Handle< PointerType >::print ( std::ostream &  os  )  const [inline]

Print to a stream.

This tries to use, in order, the Printable, Describable, and fallback forms of output.

Reimplemented in Playa::Vector< Scalar >, and Playa::Vector< double >.

Definition at line 121 of file PlayaHandle.hpp.

References Playa::Printable::print().

Referenced by NOX::NOXPlaya::Group::applyJacobianInverse(), Playa::NonlinearOperatorBase< double >::getJacobian(), Projection1DTest::name(), Poisson1DTest::name(), std::operator<<(), and Sundance::LinearSolveDriver::solve().

template<class PointerType>
RCP<PointerType>& Playa::Handle< PointerType >::ptr (  )  [inline]

Read-write access to the underlying smart pointer.

Definition at line 88 of file PlayaHandle.hpp.

template<class PointerType>
const RCP<PointerType>& Playa::Handle< PointerType >::ptr (  )  const [inline]

Read-only access to the underlying smart pointer.

Definition at line 85 of file PlayaHandle.hpp.

Referenced by Sundance::FieldWriter::addField(), Sundance::FunctionalPolynomial::addPoly(), Sundance::HomogeneousDOFMap::allocate(), Epetra::Epetra_PlayaOperator::Apply(), Epetra::Epetra_PlayaOperator::ApplyInverse(), Sundance::basisRestrictableToBoundary(), Sundance::CFMeshPair::CFMeshPair(), Sundance::SymbolicTransformation::chooseSign(), Sundance::Complex(), Sundance::NLOp::computeFunctionValue(), Sundance::NLOp::computeJacobianAndFunction(), Sundance::NLOp::computeSensitivities(), Sundance::copyDiscreteFunction(), Playa::SerialVectorType::createGhostImporter(), Playa::EpetraVectorType::createGhostImporter(), Playa::EpetraVectorType::createMatrixFactory(), Sundance::MeshSourceBase::createMesh(), Playa::denseSolve(), Playa::denseSVD(), Sundance::describeFunction(), Sundance::DiscreteFunction::discFunc(), Sundance::Expr::divide(), Epetra::Epetra_PlayaOperator::Epetra_PlayaOperator(), Playa::EpetraVector::EpetraVector(), Sundance::ExprFieldWrapper::ExprFieldWrapper(), Sundance::PeanoMesher3D::fillMesh(), Sundance::PeanoMesher2D::fillMesh(), Sundance::HNMesher3D::fillMesh(), Sundance::HNMesher2D::fillMesh(), Sundance::FunctionSupportResolver::flattenSpectral(), Sundance::EquationSet::flattenSpectral(), Sundance::SumOfIntegrals::funcsOnRegion(), Sundance::FunctionalPolynomial::FunctionalPolynomial(), Sundance::FunctionSupportResolver::FunctionSupportResolver(), Playa::BasicLMBFGSDirection::generateDirection(), Sundance::BasisFamily::getBasisTopology(), Playa::SerialVector::getConcrete(), Playa::EpetraVector::getConcrete(), Playa::EpetraMatrix::getConcrete(), Playa::EpetraVector::getConcretePtr(), Playa::EpetraMatrix::getConcretePtr(), Sundance::CurveIntegralCalc::getCurveQuadPoints_polygon(), Sundance::getDiscreteFunctionMesh(), Sundance::getDiscreteFunctionVector(), Sundance::EvaluatableExpr::getEvalExpr(), Sundance::DOFMapBuilder::getMaxCellFilter(), Sundance::VectorBasisComponent::getReferenceDOFs(), Sundance::SymbolicTransformation::getScalar(), Sundance::UserDefOp::getScalarArgs(), Sundance::CurveIntegralCalc::getSurfQuadPoints(), Playa::SerialGhostImporter::importView(), Sundance::MatrixVectorAssemblyKernel::init(), Sundance::DiscreteSpace::initImporter(), Sundance::SubsetCellFilter::internalGetCells(), Sundance::CFMeshPair::isEmpty(), Sundance::SymbolicFuncElement::isIndependentOf(), Sundance::SymbolicFuncElement::isLinearForm(), Sundance::DOFMapBuilder::isWholeDomain(), Sundance::Expr::lessThan(), Sundance::makeDeriv(), Sundance::LinearEigenproblem::makeEigenfunctions(), Playa::makeEpetraDiagonalMatrix(), Sundance::LinearEigenproblem::makeMassProb(), Sundance::Expr::multiply(), Sundance::FunctionalPolynomial::multiplyPoly(), Sundance::FunctionalPolynomial::multiplyScalar(), Playa::NOXSolver::NOXSolver(), Sundance::VectorBasisComponent::nReferenceDOFsWithFacets(), Sundance::VectorBasisComponent::nReferenceDOFsWithoutFacets(), Sundance::CellSet::operator<(), Sundance::CellPredicate::operator<(), Sundance::Expr::operator<<(), Sundance::operator<<(), Playa::Vector< Scalar >::operator=(), Sundance::Expr::operator[](), Playa::InitTraits< SimpleMV, LinearOperator< double > >::opPtr(), Sundance::pow(), Sundance::SymbPreprocessor::processInputFuncs(), Sundance::SymbPreprocessor::processInputParams(), Sundance::VectorBasisComponent::refEval(), Playa::SerialVector::SerialVector(), Sundance::setDiscreteFunctionVector(), Sundance::SymbPreprocessor::setupVariations(), Sundance::LinearSolveDriver::solve(), Playa::BelosSolver::solve(), Playa::SerialVector::space(), Playa::EpetraVector::space(), Sundance::SymbolicFunc::substituteZero(), Sundance::Expr::sum(), Sundance::VectorBasisComponent::supportsCellTypePair(), Sundance::unfoldPeriodicMesh(), Sundance::VectorBasisComponent::VectorBasisComponent(), and Sundance::VectorFillingAssemblyKernel::VectorFillingAssemblyKernel().

template<class PointerType >
void Playa::Handle< PointerType >::setVerb ( int  v  )  [inline]

Set the verbosity.

Definition at line 170 of file PlayaHandle.hpp.

References Playa::ObjectWithVerbosity::setVerb().

template<class PointerType >
int Playa::Handle< PointerType >::verb (  )  const [inline]


Member Data Documentation

template<class PointerType>
RCP<PointerType> Playa::Handle< PointerType >::ptr_ [private]

Site Contact