Line data Source code
1 : /*! 2 : * \file esys/repo/manifest/xmlfile_manifest.cpp 3 : * \brief 4 : * 5 : * \cond 6 : * __legal_b__ 7 : * 8 : * Copyright (c) 2020 Michel Gillet 9 : * Distributed under the MIT License. 10 : * (See accompanying file LICENSE.txt or 11 : * copy at https://opensource.org/licenses/MIT) 12 : * 13 : * __legal_e__ 14 : * \endcond 15 : * 16 : */ 17 : 18 : #include "esys/repo/esysrepo_prec.h" 19 : #include "esys/repo/manifest/xmlfile.h" 20 : #include "esys/repo/manifest/xmlfileimpl.h" 21 : 22 : namespace esys::repo::manifest 23 : { 24 : 25 28 : XMLFile::XMLFile() 26 28 : : Base() 27 : { 28 28 : m_impl = std::make_unique<XMLFileImpl>(this); 29 28 : } 30 : 31 28 : XMLFile::~XMLFile() = default; 32 : 33 25 : Result XMLFile::read(const std::string &path) 34 : { 35 25 : return get_impl()->read(path); 36 : } 37 : 38 1 : Result XMLFile::write(const std::string &path) 39 : { 40 1 : return get_impl()->write(path); 41 : } 42 : 43 2 : Result XMLFile::write(std::ostream &os) 44 : { 45 2 : return get_impl()->write(os); 46 : } 47 : 48 28 : XMLFileImpl *XMLFile::get_impl() 49 : { 50 28 : return m_impl.get(); 51 : } 52 : 53 0 : const XMLFileImpl *XMLFile::get_impl() const 54 : { 55 0 : return m_impl.get(); 56 : } 57 : 58 : } // namespace esys::repo::manifest