From 00814c1fb5dc835067029da916433de66c400c5d Mon Sep 17 00:00:00 2001 From: abn Date: Wed, 16 Apr 2014 10:34:00 +0200 Subject: [PATCH] Doc: indicating functions returning a borrowed ref in MEDLoader --- src/MEDLoader/MEDFileData.cxx | 3 +++ src/MEDLoader/MEDFileMesh.cxx | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/MEDLoader/MEDFileData.cxx b/src/MEDLoader/MEDFileData.cxx index 82687b1bb..ffac18050 100644 --- a/src/MEDLoader/MEDFileData.cxx +++ b/src/MEDLoader/MEDFileData.cxx @@ -66,16 +66,19 @@ std::vector MEDFileData::getDirectChildren() const } +/** Return a borrowed reference (caller is not responsible for object destruction) */ MEDFileFields *MEDFileData::getFields() const { return const_cast(static_cast(_fields)); } +/** Return a borrowed reference (caller is not responsible for object destruction) */ MEDFileMeshes *MEDFileData::getMeshes() const { return const_cast(static_cast(_meshes)); } +/** Return a borrowed reference (caller is not responsible for object destruction) */ MEDFileParameters *MEDFileData::getParams() const { return const_cast(static_cast(_params)); diff --git a/src/MEDLoader/MEDFileMesh.cxx b/src/MEDLoader/MEDFileMesh.cxx index 6360c2a9e..b68a6fa74 100644 --- a/src/MEDLoader/MEDFileMesh.cxx +++ b/src/MEDLoader/MEDFileMesh.cxx @@ -5673,6 +5673,7 @@ MEDFileMeshesIterator *MEDFileMeshes::iterator() return new MEDFileMeshesIterator(this); } +/** Return a borrowed reference (caller is not responsible) */ MEDFileMesh *MEDFileMeshes::getMeshAtPos(int i) const { if(i<0 || i>=(int)_meshes.size()) @@ -5683,6 +5684,7 @@ MEDFileMesh *MEDFileMeshes::getMeshAtPos(int i) const return _meshes[i]->getOneTimeStep(); } +/** Return a borrowed reference (caller is not responsible) */ MEDFileMesh *MEDFileMeshes::getMeshWithName(const std::string& mname) const { std::vector ms=getMeshesNames(); -- 2.39.2