Skip to content
Snippets Groups Projects

API: Introduce value and datatype structs to Extern C

Merged Florian Spreckelsen requested to merge f-value-data-structs into dev
15 files
+ 1126
688
Compare changes
  • Side-by-side
  • Inline
Files
15
@@ -179,14 +179,14 @@ public:
@@ -179,14 +179,14 @@ public:
[[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;
}
}
[[nodiscard]] inline auto AsAtomic() const noexcept -> AtomicDataType {
[[nodiscard]] inline auto GetAsAtomic() const noexcept -> AtomicDataType {
return static_cast<AtomicDataType>(this->wrapped->atomic_data_type());
return static_cast<AtomicDataType>(this->wrapped->atomic_data_type());
}
}
[[nodiscard]] inline auto IsReference() const noexcept -> bool {
[[nodiscard]] inline auto IsReference() const noexcept -> bool {
return this->wrapped->data_type_case() == DataTypeCase::kReferenceDataType;
return this->wrapped->data_type_case() == DataTypeCase::kReferenceDataType;
}
}
[[nodiscard]] inline auto AsReference() const noexcept -> const ReferenceDataType & {
[[nodiscard]] inline auto GetAsReference() const noexcept -> const ReferenceDataType & {
if (!IsReference()) {
if (!IsReference()) {
return ReferenceDataType::GetEmptyInstance();
return ReferenceDataType::GetEmptyInstance();
} else if (reference_data_type == nullptr) {
} else if (reference_data_type == nullptr) {
@@ -200,7 +200,7 @@ public:
@@ -200,7 +200,7 @@ public:
return this->wrapped->data_type_case() == DataTypeCase::kListDataType;
return this->wrapped->data_type_case() == DataTypeCase::kListDataType;
}
}
[[nodiscard]] inline auto AsList() const noexcept -> const ListDataType & {
[[nodiscard]] inline auto GetAsList() const noexcept -> const ListDataType & {
if (!IsList()) {
if (!IsList()) {
return ListDataType::GetEmptyInstance();
return ListDataType::GetEmptyInstance();
} else if (list_data_type == nullptr) {
} else if (list_data_type == nullptr) {
Loading