v0.8.23
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 87 of file AuxPETSc.hpp.

Constructor & Destructor Documentation

◆ BasicMethodPtr() [1/2]

MoFEM::BasicMethodPtr::BasicMethodPtr ( BasicMethod ptr)

Definition at line 88 of file AuxPETSc.hpp.

88 : rawPtr(ptr) {}
BasicMethod * rawPtr
Definition: AuxPETSc.hpp:103

◆ BasicMethodPtr() [2/2]

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

Definition at line 90 of file AuxPETSc.hpp.

91  : rawPtr(ptr.get()), bmPtr(ptr) {}
BasicMethod * rawPtr
Definition: AuxPETSc.hpp:103
boost::shared_ptr< BasicMethod > bmPtr
Definition: AuxPETSc.hpp:104

Member Function Documentation

◆ getSharedPtr()

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

Definition at line 95 of file AuxPETSc.hpp.

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

◆ operator *()

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

Definition at line 92 of file AuxPETSc.hpp.

92 { return *rawPtr; };
BasicMethod * rawPtr
Definition: AuxPETSc.hpp:103

◆ operator->()

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

Definition at line 93 of file AuxPETSc.hpp.

93 { return rawPtr; }
BasicMethod * rawPtr
Definition: AuxPETSc.hpp:103

Member Data Documentation

◆ bmPtr

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

Definition at line 104 of file AuxPETSc.hpp.

◆ rawPtr

BasicMethod* MoFEM::BasicMethodPtr::rawPtr
private

Definition at line 103 of file AuxPETSc.hpp.


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