From 02e387e7b65252a9cd15b672a87f3bcc6be26399 Mon Sep 17 00:00:00 2001 From: Florian Sylvestre Date: Fri, 22 Jul 2022 17:16:31 +0200 Subject: libcamera: yaml_parser: Add getList() function Allow to retrieve a YAML list of any already supported types in a std::vector. Signed-off-by: Florian Sylvestre Tested-by: Naushir Patuck Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Signed-off-by: Laurent Pinchart --- include/libcamera/internal/yaml_parser.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include') diff --git a/include/libcamera/internal/yaml_parser.h b/include/libcamera/internal/yaml_parser.h index 9c85d26a..78c359f7 100644 --- a/include/libcamera/internal/yaml_parser.h +++ b/include/libcamera/internal/yaml_parser.h @@ -183,6 +183,22 @@ public: return get().value_or(defaultValue); } +#ifndef __DOXYGEN__ + template || + std::is_same_v || + std::is_same_v || + std::is_same_v || + std::is_same_v || + std::is_same_v || + std::is_same_v || + std::is_same_v> * = nullptr> +#else + template +#endif + std::optional> getList() const; + DictAdapter asDict() const { return DictAdapter{ list_ }; } ListAdapter asList() const { return ListAdapter{ list_ }; } -- cgit v1.2.1