TBTK
Communicator.h
Go to the documentation of this file.
1 /* Copyright 2017 Kristofer Bj√∂rnson
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
23 #ifndef COM_DAFER45_TBTK_COMMUNICATOR
24 #define COM_DAFER45_TBTK_COMMUNICATOR
25 
26 namespace TBTK{
27 
29 public:
31  Communicator(bool verbose);
32 
34  void setVerbose(bool verbose);
35 
37  bool getVerbose() const;
38 
40  static void setGlobalVerbose(bool globalVerbose);
41 
43  static bool getGlobalVerbose();
44 private:
46  bool verbose;
47 
49  static bool globalVerbose;
50 };
51 
52 inline void Communicator::setVerbose(bool verbose){
53  this->verbose = verbose;
54 }
55 
56 inline bool Communicator::getVerbose() const{
57  return verbose;
58 }
59 
60 inline void Communicator::setGlobalVerbose(bool globalVerbose){
61  Communicator::globalVerbose = globalVerbose;
62 }
63 
65  return globalVerbose;
66 }
67 
68 }; //End namespace TBTK
69 
70 #endif
bool getVerbose() const
Definition: Communicator.h:56
Communicator(bool verbose)
void setVerbose(bool verbose)
Definition: Communicator.h:52
Definition: ModelFactory.h:35
static void setGlobalVerbose(bool globalVerbose)
Definition: Communicator.h:60
Definition: Communicator.h:28
static bool getGlobalVerbose()
Definition: Communicator.h:64