|
- #pragma once
-
- #include <cppargs/options/member/member_option.h>
-
- namespace cppargs
- {
-
- template<typename T_instance, typename T_predicate>
- struct member_predicate_option
- : public member_option<T_instance>
- {
- public:
- using instance_type = T_instance;
- using predicate_type = T_predicate;
- using base_type = member_option<instance_type>;
-
- private:
- predicate_type _predicate;
-
- public:
- /**
- * @brief Constructor.
- *
- * @param[in] p_meta Meta data of the option.
- * @param[in] args Arguments to pass to the predicate constructor.
- */
- template<typename... T_args>
- inline member_predicate_option(
- const option_meta& p_meta,
- T_args&&... args);
-
- /**
- * @brief Parse the option using the current context.
- *
- * @param[in|out] c Context to use for parsing.
- */
- virtual void parse(context& c) const override;
- };
-
- }
|