+/** An option used by an output format */
+class SR_API Option
+{
+public:
+ /** Short name of this option suitable for command line usage. */
+ string get_id();
+ /** Short name of this option suitable for GUI usage. */
+ string get_name();
+ /** Description of this option in a sentence. */
+ string get_description();
+ /** Default value for this option. */
+ Glib::VariantBase get_default_value();
+ /** Possible values for this option, if a limited set. */
+ vector<Glib::VariantBase> get_values();
+protected:
+ Option(const struct sr_option *structure,
+ shared_ptr<const struct sr_option> structure_array);
+ ~Option();
+ const struct sr_option *structure;
+ shared_ptr<const struct sr_option> structure_array;
+ /** Deleter needed to allow shared_ptr use with protected destructor. */
+ class Deleter
+ {
+ public:
+ void operator()(Option *option) { delete option; }
+ };
+ friend class Deleter;
+ friend class OutputFormat;
+};
+