Class Configuration#
Defined in File Configuration.h
Class Documentation#
-
class Configuration#
Configuration for a MooViE run.
A class wrapping the settings and information that is necessary for a MooViE run. Configuration is implemented as a singelton. Before calling Configuration::get_instance to get the singleton instance Configuration::initialize need to be called once.
- Author
stratmann
- Date
16.01.2018
Public Functions
-
inline const std::string &get_input_file() const#
Returns the path to the input file.
- Returns:
the input file path
-
inline void set_input_file(const std::string &input_file)#
-
inline const std::string &get_output_file() const#
Returns the path to the output file.
- Returns:
the output file path
-
inline void set_output_file(const std::string &output_file)#
Sets the path to the output file.
- Parameters:
output_file – the output file path to set
-
inline int get_width() const#
Returns the width of the MooViE scene
- Returns:
the width
-
inline void set_width(int width)#
Sets the width of a MooViE scene.
- Parameters:
width – the width to set
-
inline int get_height() const#
Returns the height of the MooViE scene
- Returns:
the height
-
inline void set_height(int height)#
Sets the height of a MooViE scene.
- Parameters:
height – the height to set
-
inline double get_output_angle_span() const#
Returns the output angle span, the angle span for the OutputGrid.
- Returns:
the output angle span
-
inline void set_output_angle_span(double output_angle_span)#
Sets the output angle span, the angle span for the OutputGrid.
- Parameters:
output_angle_span – the output angle span to set
-
inline double get_output_inner_radius() const#
Returns the inner radius of the output, the radius at which the OutputGrid starts.
- Returns:
the output inner radius
-
inline void set_output_inner_radius(double output_inner_radius)#
Sets the inner radius of the output, the radius at which the OutputGrid starts.
- Parameters:
output_inner_radius – the output inner radius to set
-
inline double get_output_thickness() const#
Returns the thickness of the outputs colored segmented ring.
- Returns:
the output thickness
-
inline void set_output_thickness(double output_thickness)#
Sets the thickness of the outputs colored segmented ring.
- Parameters:
output_thickness – the output_thickness to set
-
inline double get_grid_size() const#
Returns the size of actual grid that is a part of the OutputGrid.
- Returns:
the m_grid_size
-
inline void set_grid_size(double grid_size)#
Sets the size of actual grid that is a part of the OutputGrid.
- Parameters:
grid_size – the m_grid_size to set
-
inline int get_num_major_sections_grid() const#
Returns the number of bold sections of the scale of the OutputGrid.
- Returns:
the number of major sections
-
inline void set_num_major_sections_grid(int major_sections)#
Sets the number of bold sections of the scale of the OutputGrid.
- Parameters:
major_sections – the number of major sections to set
-
inline int get_num_minor_sections_grid() const#
Returns the number of narrow sections of the scale of the OutputGrid.
- Returns:
the number of minor sections
-
inline void set_num_minor_sections_grid(int minor_sections)#
Sets the number of narrow sections of the scale of the OutputGrid.
- Parameters:
minor_sections – the number of minor sections to set
-
inline double get_min_grid_fill_ratio() const#
Returns the ratio of space of an output axis that must be covered by the span by the corresponding variable. The actual ratio will be equal or higher than this value.
- Returns:
fill ratio of output grid
-
inline void set_min_grid_fill_ratio(double min_grid_fill_ratio)#
Sets the ratio of space of an output axis that must be covered by the span by the corresponding variable. The actual ratio will be equal or higher than this value.
- Parameters:
grid_fill_ratio – the fill ratio of output grid to set
-
inline double get_input_inner_radius() const#
Returns the inner radius of an input, the radius where the InputAxis start.
- Returns:
the input inner radius
-
inline void set_input_inner_radius(double input_inner_radius)#
Sets the inner radius of an input, the radius where the InputAxis start.
- Parameters:
input_inner_radius – the input inner radius to set
-
inline double get_input_separation_angle() const#
Returns the seperation angle between inputs.
- Returns:
the input separation angle
-
inline void set_input_separation_angle(double input_separation_angle)#
Sets the seperation angle between inputs.
- Parameters:
input_separation_angle – the input separation angle to set
-
inline double get_input_thickness() const#
Returns the thickness of the colored ring of the InputAxis.
- Returns:
the input thickness
-
inline void set_input_thickness(double input_thickness)#
Sets the thickness of the colored ring of the InputAxis.
- Parameters:
input_thickness – the input thickness to set
-
inline int get_num_major_sections_axis() const#
Returns the number of bold sections of the scale of the InputAxis.
- Returns:
the number of major sections
-
inline void set_num_major_sections_axis(int major_sections)#
Sets the number of bold sections of the scale of the InputAxis.
- Parameters:
major_sections – the number of major sections to set
-
inline int get_num_minor_sections_axis() const#
Returns the number of narrow sections of the scale of the InputAxis.
- Returns:
the number of minor sections
-
inline void set_num_minor_sections_axis(int minor_sections)#
Sets the number of narrow sections of the scale of the InputAxis.
- Parameters:
minor_sections – the number minor sections to set
-
inline bool is_histograms_enabled() const#
Returns whether or not histograms should be drawn.
- Returns:
histograms enabled or not
-
inline void set_histograms_enabled(bool histograms_enabled)#
Sets whether or not histograms should be drawn.
- Parameters:
histograms_enabled – histograms enabled or not
-
inline int get_num_histogram_classes() const#
Returns the number of classes that each histogram consists of.
- Returns:
the number of histogram classes
-
inline void set_num_histogram_classes(int num_histogram_classes)#
Sets the number of classes that each histogram consists of.
- Parameters:
num_histogram_classes – the number of histogram classes to set
-
inline double get_histogram_height() const#
Returns the height that each histogram has.
- Returns:
the histogram height
-
inline void set_histogram_height(double histogram_height)#
Sets the height that each histogram has.
- Parameters:
histogram_height – the histogram height to set
-
inline const Color &get_histogram_background() const#
Returns the background color that each histogram has.
- Returns:
the histogram background color
-
inline void set_histogram_background(const Color &histogram_background)#
Sets the background color that each histogram has.
- Parameters:
histogram_background – the histogram background color to set
-
inline const Color &get_histogram_fill() const#
Returns the fill color of each histogram’s bars.
- Returns:
the histogram fill color
-
inline void set_histogram_fill(const Color &histogram_fill)#
Sets the fill color of each histogram’s bars.
- Parameters:
histogram_fill – the histogram fill color to set
-
inline int get_relevant_places() const#
Returns the decimal place that is every column cell is rounded to.
- Returns:
the decimal place
-
inline void set_relevant_places(int relevant_places)#
Sets the decimal place that is every column cell is rounded to.
- Parameters:
relevant_places – the epsilon places to set
-
inline const DrawerProperties &get_prop_thick() const#
Returns MooViEs DrawerProperties for thick black lines.
- Returns:
the DrawerProperties for thick lines
-
inline void set_prop_thick(const DrawerProperties<> &prop_thick)#
Sets MooViEs DrawerProperties for thick black lines.
- Parameters:
prop_thick – the DrawerProperties to set
-
inline const DrawerProperties &get_prop_thin() const#
Returns MooViEs DrawerProperties for thin black lines.
- Returns:
the DrawerProperties for thin lines
-
inline void set_prop_thin(const DrawerProperties<> &prop_thin)#
Sets MooViEs DrawerProperties for thin black lines.
- Parameters:
prop_thin – the DrawerProperties to set
-
inline const TextProperties &get_prop_scale_label() const#
Returns MooViEs TextProperties for Scale labels.
- Returns:
the TextProperties for Scale labels
-
inline void set_prop_scale_label(const TextProperties &prop_scale_label)#
Sets MooViEs TextProperties for Scale labels.
- Parameters:
prop_scale_label – the TextProperties to set
-
inline const TextProperties &get_prop_axis_label() const#
Returns MooViEs TextProperties for InputAxis labels.
- Returns:
the TextProperties for InputAxis labels
-
inline void set_prop_axis_label(const TextProperties &prop_axis_label)#
Sets MooViEs TextProperties for InputAxis labels.
- Parameters:
prop_axis_label – the TextProperties to set
Public Static Functions
-
static inline Configuration &get_instance()#
Returns a reference to the singleton instance of Configuration. Configuration::initialize needs to be called at least once before.
- Throws:
bad_function_call – if instance was not initialized
- Returns:
the reference to the Configuration instance
-
static void initialize(const std::string &fname, const std::string &cpath)#
Initializes the singleton instance with the given input file path and the information given by the configuration file located under the given configuration file path.
- Parameters:
fname – the path to the input file
cpath – the path to the configuration file
-
static void initialize(const std::string &fname)#
Initializes the singleton instance with the given input file path and the standard configuration information.
- Parameters:
fname – the path to the input file
-
static void save_to_file(const std::string &cpath)#
Writes the current configuration instance to the specified file path.
- Parameters:
cpath – the path to save the configuration file to
Public Static Attributes
-
static const std::array<Color, 10> GLOW_10 = {{Color(242, 165, 44, 255), Color(248, 130, 54, 255), Color(241, 98, 58, 255), Color(229, 66, 60, 255), Color(216, 14, 64, 255), Color(180, 0, 154, 255), Color(117, 0, 222, 255), Color(81, 0, 189, 255), Color(52, 12, 149, 255), Color(40, 15, 94, 255)}}#
An array of Colors