Template Class Interface¶
Defined in File Interface.h
Inheritance Relationships¶
Derived Types¶
public uconfig::ConfigIface< Format >
(Template Class ConfigIface)public uconfig::ValueIface< T, Format >
(Template Class ValueIface)public uconfig::VariableIface< T, Format >
(Template Class VariableIface)public uconfig::VectorIface< T, Format >
(Template Class VectorIface)
Class Documentation¶
-
template<typename
Format
>
classuconfig
::
Interface
¶ Abstract interface for the
Format
.Separates uconfig::Format from uconfig::Object instances. Derived instances wraps different objects and used to parse/emit them using
Format
.Subclassed by uconfig::ConfigIface< Format >, uconfig::ValueIface< T, Format >, uconfig::VariableIface< T, Format >, uconfig::VectorIface< T, Format >
Public Types
Public Functions
-
virtual
~Interface
() = default¶ Destructor.
-
virtual bool
Parse
(const format_type &parser, const source_type *source, bool throw_on_fail) = 0¶ Parse the
source
usingparser
.- Parameters
[in] parser – Parser instance to use.
[in] source – Source to parse value from.
[in] throw_on_fail – Will throw an uconfig::ParseError is failed to parse. Default true.
- Throws
uconfig::ParseError – May be thrown if
throw_on_fail
.- Returns
true if something has been parsed, false otherwise.
-
virtual void
Emit
(const format_type &emitter, dest_type *dest, bool throw_on_fail) = 0¶ Emit to the
destination
usingemitter
.- 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 – May be thrown if
throw_on_fail
.
-
virtual const std::string &
Path
() const noexcept = 0¶ Get path of the object according to the
Format
.
-
virtual bool
Initialized
() const noexcept = 0¶ Check if wrapped object has any value in it.
-
virtual bool
Optional
() const noexcept = 0¶ Check if wrapped object declared as optional.
-
virtual