ppap4lmp  0.7.2
sta_custom.h
Go to the documentation of this file.
1 
9 #ifndef STA_CUSTOM_H
10 #define STA_CUSTOM_H
11 
12 #include <starters/starter.h>
13 
24 class StaCustom : public Starter {
30  protected:
32  virtual void compute_impl(
33  Json &data,
34  JsonToVoidFunc check_required_keys,
35  JsonToBoolFunc check_optional_keys) override;
36  public:
47  StaCustom(
48  const Json &json_);
49  virtual ~StaCustom() = default;
50 };
51 
52 #endif
This file has a definition of Starter class, which is a subclass of Updater class.
std::function< bool(const Json &)> JsonToBoolFunc
An alias for a function accepts a Json object and returns a bool.
Definition: updater.h:20
Json json
Definition: sta_custom.h:29
StaCustom(const Json &json_)
Constructor of StaCustom class.
Definition: sta_custom.cpp:16
nlohmann::json Json
Json is an alias for nlohmann::json.
Definition: json.h:22
Starter sets some properties to an empty Element object.
Definition: starter.h:24
StaCustom sets an user-defined Json object to a new Element object as its Element::data.
Definition: sta_custom.h:24
std::function< void(const Json &)> JsonToVoidFunc
An alias for a function accepts a Json object.
Definition: updater.h:18
virtual void compute_impl(Json &data, JsonToVoidFunc check_required_keys, JsonToBoolFunc check_optional_keys) override
This method overrides Updater::compute_impl.
Definition: sta_custom.cpp:24