ifw-daq 3.1.0
IFW Data Acquisition modules
Loading...
Searching...
No Matches
parsing.hpp
Go to the documentation of this file.
1/**
2 * @file
3 * @ingroup daq_ocm_libdaqif_suppport
4 * @copyright 2022 ESO - European Southern Observatory
5 *
6 * @brief Contains parse functions for daqif
7 */
8#ifndef OCMIF_PARSING_HPP_
9#define OCMIF_PARSING_HPP_
10#include <Daqif.hpp>
11#include <string_view>
12
13
14namespace daqif {
15
16template<class To>
17To FromString(std::string_view input);
18
19/**
20 * Parse state name.
21 *
22 * @returns State if the case-insensitive name matches a valid state.
23 * @throws std::invalid_argument if no state matches.
24 */
25template<>
26DaqState FromString<DaqState>(std::string_view state);
27
28/**
29 * Parse sub-state name.
30 *
31 * @returns State if the case-insensitive name matches a valid state.
32 * @throws std::invalid_argument if no state matches.
33 */
34template<>
35DaqSubState FromString<DaqSubState>(std::string_view state);
36
37}
38#endif // #ifndef OCMIF_PARSING_HPP_
To FromString(std::string_view input)
DaqState FromString< DaqState >(std::string_view state)
Parse state name.
Definition: parsing.cpp:20
DaqSubState FromString< DaqSubState >(std::string_view state)
Parse sub-state name.
Definition: parsing.cpp:34