v0.14.0
Public Member Functions | Private Attributes | List of all members
MoFEM::BasicMethodPtr Struct Reference

#include <src/petsc/AuxPETSc.hpp>

Collaboration diagram for MoFEM::BasicMethodPtr:
[legend]

Public Member Functions

 BasicMethodPtr (BasicMethod *ptr)
 
template<typename BASICMETHOD >
 BasicMethodPtr (boost::shared_ptr< BASICMETHOD > ptr)
 
virtual ~BasicMethodPtr ()=default
 
BasicMethodoperator* () const
 
BasicMethodoperator-> () const
 
boost::shared_ptr< BasicMethodgetSharedPtr () const
 

Private Attributes

BasicMethodrawPtr
 
boost::shared_ptr< BasicMethodbmPtr
 

Detailed Description

Definition at line 33 of file AuxPETSc.hpp.

Constructor & Destructor Documentation

◆ BasicMethodPtr() [1/2]

MoFEM::BasicMethodPtr::BasicMethodPtr ( BasicMethod ptr)
inline

Definition at line 34 of file AuxPETSc.hpp.

34 : rawPtr(ptr) {}

◆ BasicMethodPtr() [2/2]

template<typename BASICMETHOD >
MoFEM::BasicMethodPtr::BasicMethodPtr ( boost::shared_ptr< BASICMETHOD >  ptr)
inline

Definition at line 36 of file AuxPETSc.hpp.

37  : rawPtr(ptr.get()), bmPtr(ptr) {}

◆ ~BasicMethodPtr()

virtual MoFEM::BasicMethodPtr::~BasicMethodPtr ( )
virtualdefault

Member Function Documentation

◆ getSharedPtr()

boost::shared_ptr<BasicMethod> MoFEM::BasicMethodPtr::getSharedPtr ( ) const
inline

Definition at line 44 of file AuxPETSc.hpp.

44  {
45  if (!bmPtr)
46  THROW_MESSAGE("Shared pointer not set. You have to be using raw "
47  "pointer, that is unsafe.");
48  return bmPtr;
49  }

◆ operator*()

BasicMethod& MoFEM::BasicMethodPtr::operator* ( ) const
inline

Definition at line 41 of file AuxPETSc.hpp.

41 { return *rawPtr; };

◆ operator->()

BasicMethod* MoFEM::BasicMethodPtr::operator-> ( ) const
inline

Definition at line 42 of file AuxPETSc.hpp.

42 { return rawPtr; }

Member Data Documentation

◆ bmPtr

boost::shared_ptr<BasicMethod> MoFEM::BasicMethodPtr::bmPtr
private

Definition at line 53 of file AuxPETSc.hpp.

◆ rawPtr

BasicMethod* MoFEM::BasicMethodPtr::rawPtr
private

Definition at line 52 of file AuxPETSc.hpp.


The documentation for this struct was generated from the following file:
THROW_MESSAGE
#define THROW_MESSAGE(msg)
Throw MoFEM exception.
Definition: definitions.h:574
MoFEM::BasicMethodPtr::bmPtr
boost::shared_ptr< BasicMethod > bmPtr
Definition: AuxPETSc.hpp:53
MoFEM::BasicMethodPtr::rawPtr
BasicMethod * rawPtr
Definition: AuxPETSc.hpp:52