aboutsummaryrefslogtreecommitdiffstats
path: root/eval/src/vespa/eval/eval/value_type_spec.h
blob: a9e6b9ad1a46502efc3218285e339f7197c30a24 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include "value_type.h"
#include <optional>

namespace vespalib::eval::value_type {

std::optional<CellType> cell_type_from_name(const vespalib::string &name);
vespalib::string cell_type_to_name(CellType cell_type);

ValueType parse_spec(const char *pos_in, const char *end_in, const char *&pos_out,
                     std::vector<ValueType::Dimension> *unsorted = nullptr);

ValueType from_spec(const vespalib::string &spec);
ValueType from_spec(const vespalib::string &spec, std::vector<ValueType::Dimension> &unsorted);
vespalib::string to_spec(const ValueType &type);

}