MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / ptr

Method ptr

src/OpenFOAM/memory/tmp/tmpI.H:198–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196
197template<class T>
198inline T* Foam::tmp<T>::ptr() const
199{
200 if (isTmp())
201 {
202 if (!ptr_)
203 {
204 FatalErrorInFunction
205 << typeName() << " deallocated"
206 << abort(FatalError);
207 }
208
209 if (!ptr_->unique())
210 {
211 FatalErrorInFunction
212 << "Attempt to acquire pointer to object referred to"
213 << " by multiple temporaries of type " << typeName()
214 << abort(FatalError);
215 }
216
217 T* ptr = ptr_;
218 ptr_ = 0;
219
220 return ptr;
221 }
222 else
223 {
224 return ptr_->clone().ptr();
225 }
226}
227
228
229template<class T>

Callers 15

addFrontBackPatchesFunction · 0.45
setCouplingInfoFunction · 0.45
mainFunction · 0.45
extrudeMesh.CFile · 0.45
mainFunction · 0.45
DelaunayMeshIO.CFile · 0.45
writeMeshFunction · 0.45
mainFunction · 0.45

Calls 3

uniqueMethod · 0.80
abortFunction · 0.50
cloneMethod · 0.45

Tested by

no test coverage detected