Blue Brain BioExplorer
Statistics.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018, EPFL/Blue Brain Project
3  *
4  * Responsible Author: Daniel.Nachbaur@epfl.ch
5  *
6  * This file is part of Blue Brain BioExplorer <https://github.com/BlueBrain/BioExplorer>
7  *
8  * This library is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU Lesser General Public License version 3.0 as published
10  * by the Free Software Foundation.
11  *
12  * This library is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
15  * details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this library; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21 
22 #pragma once
23 
26 
27 SERIALIZATION_ACCESS(Statistics)
28 
29 namespace core
30 {
32 class Statistics : public BaseObject
33 {
34 public:
35  double getFPS() const { return _fps; }
36  void setFPS(const double fps) { _updateValue(_fps, fps); }
37  size_t getSceneSizeInBytes() const { return _sceneSizeInBytes; }
38  void setSceneSizeInBytes(const size_t sceneSizeInBytes) { _updateValue(_sceneSizeInBytes, sceneSizeInBytes); }
39 
40 private:
41  double _fps{0.0};
42  size_t _sceneSizeInBytes{0};
43 
44  SERIALIZATION_FRIEND(Statistics)
45 };
46 } // namespace core
#define SERIALIZATION_FRIEND(type)
Definition: Macros.h:32
#define SERIALIZATION_ACCESS(type)
Definition: Macros.h:25
void _updateValue(T &member, const T &newValue, const bool triggerCallback=true)
Definition: BaseObject.h:87
void setFPS(const double fps)
Definition: Statistics.h:36
size_t getSceneSizeInBytes() const
Definition: Statistics.h:37
void setSceneSizeInBytes(const size_t sceneSizeInBytes)
Definition: Statistics.h:38
double getFPS() const
Definition: Statistics.h:35