Blue Brain BioExplorer
ApplicationParameters.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2024, EPFL/Blue Brain Project
3  *
4  * The Blue Brain BioExplorer is a tool for scientists to extract and analyse
5  * scientific data from visualization
6  *
7  * This file is part of Blue Brain BioExplorer <https://github.com/BlueBrain/BioExplorer>
8  *
9  * This library is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU Lesser General Public License version 3.0 as published
11  * by the Free Software Foundation.
12  *
13  * This library is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22 
23 #pragma once
24 
25 #include "AbstractParameters.h"
26 
28 #include <string>
29 #include <vector>
30 
31 SERIALIZATION_ACCESS(ApplicationParameters)
32 
33 namespace core
34 {
38 {
39 public:
41 
43  void print() final;
44 
46  const std::string& getEngine() const { return _engine; }
48  const std::vector<std::string>& getOsprayModules() const { return _modules; }
49 
51  void setDynamicLoadBalancer(const bool value) { _updateValue(_dynamicLoadBalancer, value); }
52 
54  const Vector2ui getWindowSize() const { return Vector2ui(_windowSize); }
55  void setWindowSize(const Vector2ui& size)
56  {
57  Vector2d value(size);
58  _updateValue(_windowSize, value);
59  }
61  bool isBenchmarking() const { return _benchmarking; }
62  void setBenchmarking(bool enabled) { _benchmarking = enabled; }
64  void setJpegCompression(const size_t compression) { _updateValue(_jpegCompression, compression); }
65  size_t getJpegCompression() const { return _jpegCompression; }
67  size_t getImageStreamFPS() const { return _imageStreamFPS; }
68  void setImageStreamFPS(const size_t fps) { _updateValue(_imageStreamFPS, fps); }
69 
70  bool useVideoStreaming() const { return _useVideoStreaming; }
72  size_t getMaxRenderFPS() const { return _maxRenderFPS; }
73  bool isStereo() const { return _stereo; }
74  bool getParallelRendering() const { return _parallelRendering; }
75  const std::string& getHttpServerURI() const { return _httpServerURI; }
76  void setHttpServerURI(const std::string& httpServerURI) { _updateValue(_httpServerURI, httpServerURI); }
77 
78  const std::string& getEnvMap() const { return _envMap; }
79  const std::string& getSandboxPath() const { return _sandBoxPath; }
80  const strings& getInputPaths() const { return _inputPaths; }
81  po::positional_options_description& posArgs() { return _positionalArgs; }
82 
83 protected:
84  void parse(const po::variables_map& vm) final;
85 
86  std::string _engine{ENGINE_OSPRAY};
87  std::vector<std::string> _modules;
89  bool _benchmarking{false};
91  bool _stereo{false};
92  size_t _imageStreamFPS{60};
93  size_t _maxRenderFPS{std::numeric_limits<size_t>::max()};
94  std::string _httpServerURI;
95  bool _parallelRendering{false};
96  bool _dynamicLoadBalancer{false};
97  bool _useVideoStreaming{false};
98  std::string _envMap;
99  std::string _sandBoxPath;
100 
102 
103  po::positional_options_description _positionalArgs;
104 
106 };
107 } // namespace core
#define SERIALIZATION_FRIEND(type)
Definition: Macros.h:32
#define SERIALIZATION_ACCESS(type)
Definition: Macros.h:25
void setDynamicLoadBalancer(const bool value)
const std::vector< std::string > & getOsprayModules() const
void setImageStreamFPS(const size_t fps)
void parse(const po::variables_map &vm) final
std::vector< std::string > _modules
const strings & getInputPaths() const
const std::string & getEnvMap() const
void setHttpServerURI(const std::string &httpServerURI)
void setJpegCompression(const size_t compression)
void setWindowSize(const Vector2ui &size)
const std::string & getSandboxPath() const
po::positional_options_description _positionalArgs
const std::string & getEngine() const
const Vector2ui getWindowSize() const
po::positional_options_description & posArgs()
const std::string & getHttpServerURI() const
void _updateValue(T &member, const T &newValue, const bool triggerCallback=true)
Definition: BaseObject.h:87
glm::vec< 2, double > Vector2d
Definition: MathTypes.h:142
glm::vec< 2, uint32_t > Vector2ui
Definition: MathTypes.h:133
std::vector< std::string > strings
Definition: Types.h:44