Template Class ConfigIface¶
Defined in File Interface.h
Inheritance Relationships¶
Base Type¶
public uconfig::Interface< Format >(Template Class Interface)
Class Documentation¶
-
template<typename
Format>
classuconfig::ConfigIface: public uconfig::Interface<Format>¶ Interface for uconfig::Config objects.
Public Functions
-
template<typename ...
FormatTs>ConfigIface(const std::string &parse_path, Config<FormatTs...> *config)¶ Constructor.
Note
Does not own
config, should not outlive it.- Template Parameters
FormatTs – Type of the formats for
config. Should includeFormat.- Parameters
[in] parse_path – Path to the config in terms of
Format.[in] config – Pointer to the uconfig::Config to wrap.
-
ConfigIface(const ConfigIface<Format>&) = default¶ Copy constructor.
-
ConfigIface<Format> &
operator=(const ConfigIface<Format>&) = default¶ Copy assignment.
-
ConfigIface(ConfigIface<Format>&&) noexcept = default¶ Move constructor.
-
ConfigIface<Format> &
operator=(ConfigIface<Format>&&) noexcept = default¶ Move assignment.
-
virtual
~ConfigIface() = default¶ Destructor.
-
virtual bool
Parse(const format_type &parser, const source_type *source, bool throw_on_fail = true) override¶ Parse referenced uconfig::Config from
sourceusingparser.- Parameters
[in] parser – Parser instance to use.
[in] source – Source to parse from.
[in] throw_on_fail – Will throw an uconfig::ParseError is failed to parse all mandatory values. Default true.
- Throws
uconfig::ParseError – Thrown if
throw_on_fail.- Returns
true if config has been parsed, false otherwise.
-
virtual void
Emit(const format_type &emitter, dest_type *dest, bool throw_on_fail = true) override¶ Emit referenced uconfig::Config to
destinationusingemitter.- Parameters
[in] emitter – Emitter instance to use.
[in] dest – Destination to emit into.
[in] throw_on_fail – Will throw an uconfig::EmitError is failed to emit. Default true.
- Throws
uconfig::EmitError – Thrown if
throw_on_fail.
-
virtual const std::string &
Path() const noexcept override¶ Get path of the wrapped uconfig::Config.
-
virtual bool
Initialized() const noexcept override¶ Check if wrapped uconfig::Config has all mandatory values set.
-
virtual bool
Optional() const noexcept override¶ Check if wrapped uconfig::Config declared as optional.
-
template<typename ...