struct dlstreamer::ParamDesc#

Structure describing element parameter - name, short description, default value, range or list (for strings) of supported values.

#include <element.h>

struct ParamDesc {
    // fields

    std::string name;
    std::string description;
    Any default_value;
    std::vector<Any> range;

    // construction

    ParamDesc(
        std::string_view name,
        std::string_view desc,
        Any default_value,
        std::vector<Any> valid_values = {}
    );

    ParamDesc(
        std::string_view name,
        std::string_view desc,
        const Any& default_value,
        const Any& min_value,
        const Any& max_value
    );

    ParamDesc(
        std::string_view name,
        std::string_view desc,
        const char* default_value,
        std::vector<std::string> valid_values = {}
    );

    // methods

    template <typename T>
    bool is_type() const;
};