v0.9.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)
 
BasicMethodoperator * () const
 
BasicMethodoperator-> () const
 
boost::shared_ptr< BasicMethodgetSharedPtr () const
 

Private Attributes

BasicMethodrawPtr
 
boost::shared_ptr< BasicMethodbmPtr
 

Detailed Description

Definition at line 91 of file AuxPETSc.hpp.

Constructor & Destructor Documentation

◆ BasicMethodPtr() [1/2]

MoFEM::BasicMethodPtr::BasicMethodPtr ( BasicMethod ptr)

Definition at line 92 of file AuxPETSc.hpp.

92 : rawPtr(ptr) {}
BasicMethod * rawPtr
Definition: AuxPETSc.hpp:107

◆ BasicMethodPtr() [2/2]

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

Definition at line 94 of file AuxPETSc.hpp.

95  : rawPtr(ptr.get()), bmPtr(ptr) {}
BasicMethod * rawPtr
Definition: AuxPETSc.hpp:107
boost::shared_ptr< BasicMethod > bmPtr
Definition: AuxPETSc.hpp:108

Member Function Documentation

◆ getSharedPtr()

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

Definition at line 99 of file AuxPETSc.hpp.

99  {
100  if (!bmPtr)
101  THROW_MESSAGE("Shared pointer not set. You have to be using raw "
102  "pointer, that is unsafe.");
103  return bmPtr;
104  }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:620
boost::shared_ptr< BasicMethod > bmPtr
Definition: AuxPETSc.hpp:108

◆ operator *()

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

Definition at line 96 of file AuxPETSc.hpp.

96 { return *rawPtr; };
BasicMethod * rawPtr
Definition: AuxPETSc.hpp:107

◆ operator->()

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

Definition at line 97 of file AuxPETSc.hpp.

97 { return rawPtr; }
BasicMethod * rawPtr
Definition: AuxPETSc.hpp:107

Member Data Documentation

◆ bmPtr

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

Definition at line 108 of file AuxPETSc.hpp.

◆ rawPtr

BasicMethod* MoFEM::BasicMethodPtr::rawPtr
private

Definition at line 107 of file AuxPETSc.hpp.


The documentation for this struct was generated from the following file: