diff options
author | rtk0c <[email protected]> | 2023-10-19 22:50:07 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2023-10-19 22:50:07 -0700 |
commit | 2c92e07f337e42cf58970443f9de678f85a9b2a4 (patch) | |
tree | 075d5407e1e12a9d35cbee6e4c20ad34e0765c42 /source/20-codegen-runtime | |
parent | 615809c036f604bce4582cea8ad49c64693f4f45 (diff) |
The great renaming: switch to "module style"
Diffstat (limited to 'source/20-codegen-runtime')
-rw-r--r-- | source/20-codegen-runtime/MacrosCodegen.hpp | 10 | ||||
-rw-r--r-- | source/20-codegen-runtime/Metadata.cpp | 45 | ||||
-rw-r--r-- | source/20-codegen-runtime/Metadata.hpp | 33 | ||||
-rw-r--r-- | source/20-codegen-runtime/MetadataBase.cpp | 5 | ||||
-rw-r--r-- | source/20-codegen-runtime/MetadataBase.hpp | 53 | ||||
-rw-r--r-- | source/20-codegen-runtime/MetadataDetails.hpp | 7 |
6 files changed, 0 insertions, 153 deletions
diff --git a/source/20-codegen-runtime/MacrosCodegen.hpp b/source/20-codegen-runtime/MacrosCodegen.hpp deleted file mode 100644 index 43ae99c..0000000 --- a/source/20-codegen-runtime/MacrosCodegen.hpp +++ /dev/null @@ -1,10 +0,0 @@ -// NOTE: Contents of this file is coupled with the codegen compiler. -// When updating, change both sides at the same time. - -#pragma once - -#define BRUSSEL_CLASS(...) -#define BRUSSEL_PROPERTY(...) -#define BRUSSEL_METHOD(...) - -#define BRUSSEL_ENUM(...) diff --git a/source/20-codegen-runtime/Metadata.cpp b/source/20-codegen-runtime/Metadata.cpp deleted file mode 100644 index 0d640da..0000000 --- a/source/20-codegen-runtime/Metadata.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "Metadata.hpp" - -auto Metadata::TypeInfoList::Iterator::operator*() const -> const TypeInfo& { - // TODO -} - -auto Metadata::TypeInfoList::Iterator::operator++() -> Iterator& { - // TODO -} - -auto Metadata::TypeInfoList::Iterator::operator++(int) -> Iterator { - auto copy = *this; - ++copy; - return copy; -} - -bool Metadata::TypeInfoList::Iterator::operator==(const Iterator& that) const { - return this->data == that.data; -} - -bool Metadata::TypeInfoList::Iterator::operator==(const Sentinel&) const { - // TODO -} - -auto Metadata::TypeInfoList::begin() const -> Iterator { - return Iterator(); -} - -auto Metadata::TypeInfoList::end() const -> Sentinel { - return Sentinel(); -} - -auto Metadata::GetTypeInfoList() -> const TypeInfoList& { - // TODO -} - -auto Metadata::QueryTypeInfo(TypeId id) -> const TypeInfo* { - // TODO - return nullptr; -} - -auto Metadata::QueryTypeInfo(std::string_view id) -> const TypeInfo* { - // TODO - return nullptr; -} diff --git a/source/20-codegen-runtime/Metadata.hpp b/source/20-codegen-runtime/Metadata.hpp deleted file mode 100644 index e89fd8f..0000000 --- a/source/20-codegen-runtime/Metadata.hpp +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once - -#include "MacrosCodegen.hpp" -#include "MetadataBase.hpp" - -namespace Metadata { - -struct TypeInfoList { - struct Sentinel { - }; - - struct Iterator { - void* data; - - const TypeInfo& operator*() const; - Iterator& operator++(); - Iterator operator++(int); - - bool operator==(const Iterator&) const; - bool operator==(const Sentinel&) const; - }; - - Iterator begin() const; - Sentinel end() const; -}; - -/// Get a list of all type infos present. -const TypeInfoList& GetTypeInfoList(); - -const TypeInfo* QueryTypeInfo(TypeId id); -const TypeInfo* QueryTypeInfo(std::string_view name); - -} // namespace Metadata diff --git a/source/20-codegen-runtime/MetadataBase.cpp b/source/20-codegen-runtime/MetadataBase.cpp deleted file mode 100644 index 2f2ef94..0000000 --- a/source/20-codegen-runtime/MetadataBase.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include "MetadataBase.hpp" - -bool Metadata::TypePropertyInfo::IsDirectAccess() const { - return getterName.empty() && setterName.empty(); -} diff --git a/source/20-codegen-runtime/MetadataBase.hpp b/source/20-codegen-runtime/MetadataBase.hpp deleted file mode 100644 index f84a152..0000000 --- a/source/20-codegen-runtime/MetadataBase.hpp +++ /dev/null @@ -1,53 +0,0 @@ -#pragma once - -#include <cstddef> -#include <optional> -#include <span> -#include <string_view> - -namespace Metadata { - -struct TypeId { - size_t id; -}; - -struct TypeInfo; - -struct TypePropertyInfo { - std::string_view name; - const TypeInfo* type; - std::string_view getterName; - std::string_view setterName; - - bool IsDirectAccess() const; -}; - -struct TypeMethodInfo { - std::string_view name; - // TODO -}; - -struct TypeInfo { - TypeId typeId; - std::string_view name; - std::span<const TypeInfo* const> parents; - std::span<const TypePropertyInfo> properties; - std::span<const TypeMethodInfo> methods; - - /// Whether this object is registered at runtime or statically compiled - bool dynamic = false; -}; - -// NOTE: implemented by generating specializations; not-generated ones should generated an error in the linking phase -template <typename T> -const TypeInfo* GetTypeInfo(); - -// NOTE: implemented by generating specializations -template <typename TEnum> -std::string_view EnumToString(TEnum value) = delete; - -// NOTE: implemented by generating specializations -template <typename TEnum> -std::optional<TEnum> EnumFromString(std::string_view str) = delete; - -} // namespace Metadata diff --git a/source/20-codegen-runtime/MetadataDetails.hpp b/source/20-codegen-runtime/MetadataDetails.hpp deleted file mode 100644 index 09b71ff..0000000 --- a/source/20-codegen-runtime/MetadataDetails.hpp +++ /dev/null @@ -1,7 +0,0 @@ -// This file contains implementation details used by the outputs of the code generaetor. Consumers do not use. -#pragma once - -#include "MetadataBase.hpp" - -namespace Metadata::Details { -} // namespace Metadata::Details |