Octopus 16.0
real-space, real-time, TDDFT code
share_directory.hpp
Go to the documentation of this file.
1#ifndef PSEUDO_SHARE_DIRECTORY_HPP
2#define PSEUDO_SHARE_DIRECTORY_HPP
3
4/*
5 Copyright (C) 2018 Xavier Andrade
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20*/
21
22#include <string>
23#include "config.h"
24
25namespace pseudopotential {
26
28
29public:
30 static void set(const std::string &dir) { directory() = dir; }
31
32 static std::string get() {
33 if (directory().size() != 0)
34 return directory();
35 return SHARE_DIR;
36 }
37
38private:
40 static std::string directory_;
41 return directory_;
42 }
43};
44
45} // namespace pseudopotential
46
47#endif
48
49// Local Variables:
50// mode: c++
51// coding: utf-8
52// End:
void const fint8 * size
Definition: alloc_cache_low.cc:67
Definition: share_directory.hpp:27
static std::string get()
Definition: share_directory.hpp:32
static void set(const std::string &dir)
Definition: share_directory.hpp:30
static std::string & directory()
Definition: share_directory.hpp:39
#define SHARE_DIR
Definition: config.h:9
!The assertions are ignored if the code is compiled in not debug when !prints out the assertion string
Definition: global.h:58
Definition: anygrid.hpp:27