IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 8f2c8bc2 authored by Remy Prechelt's avatar Remy Prechelt Committed by ralfulrich
Browse files

Move getConfig to its own class in the heirarchy.

parent 57fe7090
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@
#pragma once
#include <corsika/framework/core/Logging.hpp>
#include <corsika/output/Configurable.hpp>
#include <boost/filesystem.hpp>
#include <yaml-cpp/yaml.h>
......@@ -17,7 +18,7 @@ namespace corsika {
* This is the base class for all outputs so that they
* can be stored in homogeneous containers.
*/
class BaseOutput {
class BaseOutput : public Configurable {
protected:
BaseOutput() = default;
......@@ -63,11 +64,6 @@ namespace corsika {
*/
virtual YAML::Node getSummary() const { return YAML::Node(); }
/**
* Provide YAML configuration for this BaseOutput.
*/
virtual YAML::Node getConfig() const = 0;
protected:
/**
* Set init flag.
......
/*
* (c) Copyright 2021 CORSIKA Project, corsika-project@lists.kit.edu
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#pragma once
#include <corsika/framework/core/Logging.hpp>
#include <corsika/output/Configurable.hpp>
#include <boost/filesystem.hpp>
#include <yaml-cpp/yaml.h>
namespace corsika {
/**
* This is the base class for all classes that have
* YAML representations of their configurations.
*/
class Configurable {
protected:
Configurable() = default;
virtual ~Configurable() = default;
public:
/**
* Provide YAML configuration for this BaseOutput.
*/
virtual YAML::Node getConfig() const = 0;
};
} // namespace corsika
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment