You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.0 KiB

7 months ago
/*
* Copyright 2023 Ingemar Hedvall
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <map>
#include <memory>
#include <string>
#include <cstdint>
#include <utility>
#include "a2l/a2lobject.h"
namespace a2l {
class CompuVtabRange : public A2lObject {
public:
void Rows(uint64_t rows) { rows_ = rows; }
[[nodiscard]] uint64_t Rows() const { return rows_; }
void KeyValueList(const std::map<std::pair<double, double>,
std::string>& list) {
value_list_ = list;
}
[[nodiscard]] const std::map<std::pair<double,double>,
std::string>& KeyValueList() const {
return value_list_;
}
void DefaultValue(const std::string& value) { default_value_ = value; }
[[nodiscard]] const std::string& DefaultValue() const {
return default_value_;
}
private:
uint64_t rows_ = 0;
std::map<std::pair<double, double>, std::string> value_list_;
std::string default_value_;
};
using CompuVtabRangeList = std::map<std::string,
std::unique_ptr<CompuVtabRange>>;
} // end namespace a2l