Orcus
Loading...
Searching...
No Matches
measurement.hpp
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 */
7
8#ifndef ORCUS_MEASUREMENT_HPP
9#define ORCUS_MEASUREMENT_HPP
10
11#include "types.hpp"
12#include "env.hpp"
13
14#include <cstdlib>
15#include <string>
16
17namespace orcus {
18
19ORCUS_DLLPUBLIC double to_double(std::string_view s, const char** p_parse_ended = nullptr);
20ORCUS_DLLPUBLIC long to_long(std::string_view s, const char** p_parse_ended = nullptr);
21ORCUS_DLLPUBLIC bool to_bool(std::string_view s);
22
34ORCUS_DLLPUBLIC length_t to_length(std::string_view str);
35
36ORCUS_DLLPUBLIC double convert(double value, length_unit_t unit_from, length_unit_t unit_to);
37
38}
39
40#endif
41/* vim:set shiftwidth=4 softtabstop=4 expandtab: */