optica namespace
The root namespace for all optica functions and types.
Classes
-
template <Arity Value>class ArityProperty
- Represents Arity property (Possible number of arguments)
-
template <std::class Exact
size_t Size> - Represents option takes exact number.
-
template <std::struct FixedString
size_t N> - Compiletime friendly fixed size string used as NTTP.
- class OneOrMore
- Represents option takes at least one argument.
-
template <typename Derived>class PropertyBase
- Base class for any kind CMD option.
Concepts
-
template <typename T>concept IsNumericArity
- Concept determining is Arity numeric.
-
template <typename T>concept IsTypedArity
- Concept determining is Arity one of not numeric.
-
template <typename T>concept Property
- Concept for determining is T Property or not.
-
template <typename T>concept IsArityProperty
- IsArityOrNot.
-
template <typename T>concept Arity
- Concept for any related to Arguments type.
Functions
-
template <typename T>auto ParseType(std::
string_view data, T&) → bool constexpr - Parsing function for std::
string_view. -
template <>auto ParseType<int>(std::
string_view data, int& res) → bool constexpr - Specialization for parsing int values.
Function documentation
template <typename T>
bool optica:: ParseType(std:: string_view data,
T&) constexpr
Parsing function for std::
Template parameters | |
---|---|
T | Type into string should be parsed |
Parameters | |
data | Actual std:: |
Returns | bool that shows is parsing successful |
template <>
bool optica:: ParseType<int>(std:: string_view data,
int& res) constexpr
Specialization for parsing int values.
Parameters | |
---|---|
data | Actual std:: |
res | Output result |
Returns | bool in case if parsing isn't successful \showinlinesource |