Skip to content
Snippets Groups Projects

ENH: Add datatypes and value classes to Extern C interface

Merged Florian Spreckelsen requested to merge f-consolidate-c into dev
All threads resolved!
7 files
+ 172
16
Compare changes
  • Side-by-side
  • Inline
Files
7
+ 16
0
@@ -151,6 +151,22 @@ public:
@@ -151,6 +151,22 @@ public:
DataType(const std::string &data_type) : DataType() {
DataType(const std::string &data_type) : DataType() {
this->wrapped->mutable_reference_data_type()->set_name(data_type);
this->wrapped->mutable_reference_data_type()->set_name(data_type);
}
}
 
 
inline static auto ListOf(const AtomicDataType &atomic_data_type)
 
-> DataType {
 
DataType result;
 
result.wrapped->mutable_list_data_type()->set_atomic_data_type(
 
static_cast<ProtoAtomicDataType>(atomic_data_type));
 
return result;
 
}
 
inline static auto ListOf(const std::string reference_data_type) -> DataType {
 
DataType result;
 
result.wrapped->mutable_list_data_type()
 
->mutable_reference_data_type()
 
->set_name(reference_data_type);
 
return result;
 
}
 
[[nodiscard]] inline auto IsAtomic() const noexcept -> bool {
[[nodiscard]] inline auto IsAtomic() const noexcept -> bool {
return this->wrapped->data_type_case() == DataTypeCase::kAtomicDataType;
return this->wrapped->data_type_case() == DataTypeCase::kAtomicDataType;
}
}
Loading