rambrain
rambrainconfig.h
Go to the documentation of this file.
1 /* rambrain - a dynamical physical memory extender
2  * Copyright (C) 2015 M. Imgrund, A. Arth
3  * mimgrund (at) mpifr-bonn.mpg.de
4  * arth (at) usm.uni-muenchen.de
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef INITIALISATION_H
21 #define INITIALISATION_H
22 
23 #include "configreader.h"
24 #include "managedSwap.h"
25 #include "managedMemory.h"
26 #include "common.h"
27 
28 namespace rambrain
29 {
30 
31 namespace rambrainglobals
32 {
33 
38 {
39 public:
51 
56  void reinit ( bool reread = true );
57 
58 
62  inline void setCustomConfigPath ( const string &path ) {
63  config.setCustomConfigPath ( path );
64  }
65 
69  inline const configuration &getConfig() {
70  return config.getConfig();
71  }
72 
76  void resizeMemory ( global_bytesize memory );
81  void resizeSwap ( global_bytesize memory );
82 
83 private:
87  void init();
91  void clean();
92 
96 
97 };
98 
100 extern rambrainConfig config;
101 
102 }
103 
104 }
105 
106 #endif // INITIALISATION_H
107 
void resizeMemory(global_bytesize memory)
Simple setter.
void resizeSwap(global_bytesize memory)
Simple setter.
const configuration & getConfig()
Simple getter.
~rambrainConfig()
Destructs the throught the config initiated swap and manager.
Class that serves as a backend to managedMemory to actual write/read managedMemoryChunks to/from hard...
Definition: managedSwap.h:35
uint64_t global_bytesize
Definition: common.h:65
configuration & getConfig()
Simple getter.
Definition: configreader.h:192
Main struct to save configuration variables.
Definition: configreader.h:131
rambrainConfig()
Construct a new config handling class.
void setCustomConfigPath(const string &path)
Simple setter.
Main class for handling configuration throughout the library and for the user.
rambrainConfig config
You will find the object in managedMemory.cpp as we have to define it in some 'used' file in the link...
void reinit(bool reread=true)
Reinitialises the system.
void setCustomConfigPath(const string &path)
Simple setter.
Definition: configreader.h:185
Reader class to read in and properly parse config files.
Definition: configreader.h:163
Backend class to handle raw memory and interaction/storage with managedSwap.
Definition: managedMemory.h:68