10 #include "../utils/runtime_error.h" 62 return std::dynamic_pointer_cast<
AddRename>(shared_from_this());
AddRename(const Str &key_old_, const Str &key_new_)
Constructor of AddRename class.
std::function< bool(const Json &)> JsonToBoolFunc
An alias for a function accepts a Json object and returns a bool.
std::string Str
Str is an alias for string.
virtual void compute_impl(Json &data, JsonToVoidFunc check_required_keys, JsonToBoolFunc check_optional_keys) override
This method overrides Updater::compute_impl.
nlohmann::json Json
Json is an alias for nlohmann::json.
AddRename renames an existing property.
void runtime_error(const Str &msg)
Raise (for Python) and throw (for C++) a runtime error.
This file has a definition of AddRename class, which is a subclass of Adder class.
Namespace for utility functions.
ShPtr< AddRename > overwrite(bool do_overwrite_=true)
Allow overwriting an existing property by a renamed property with the same name.
std::function< void(const Json &)> JsonToVoidFunc
An alias for a function accepts a Json object.
std::shared_ptr< T > ShPtr
ShPtr is an alias for shared pointer.