-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
80 changed files
with
1,077 additions
and
1,062 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
message(STATUS "config @PROJECT_NAME@ @PROJECT_VERSION@...") | ||
message(STATUS "config @PROJECT_NAME@ @PROJECT_VERSION@ ...") | ||
|
||
@PACKAGE_INIT@ | ||
|
||
@UBPA_PACKAGE_INIT@ | ||
|
||
include ( "${CMAKE_CURRENT_LIST_DIR}/@[email protected]" ) | ||
if(@Ubpa_USRefl_Build_AutoRefl@) | ||
include("${CMAKE_CURRENT_LIST_DIR}/UbpaUSReflAutoRefl.cmake") | ||
endif() | ||
|
||
if(NOT @Ubpa_USRefl_UseNameof@) | ||
CPMAddPackage( | ||
NAME nameof | ||
GITHUB_REPOSITORY Neargye/nameof | ||
GIT_TAG 0e8bec0 | ||
) | ||
endif() | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]") | ||
|
||
message(STATUS "config @PROJECT_NAME@ @PROJECT_VERSION@ done") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#pragma once | ||
|
||
#include "CmptTag.h" | ||
|
||
#include "detail/Util.h" | ||
|
||
#include <UTemplate/TypeID.h> | ||
|
||
#include <set> | ||
|
||
namespace Ubpa::UECS { | ||
// TypeID with AccessMode | ||
class AccessTypeID : public TypeID { | ||
public: | ||
using TypeID::TypeID; // AccessMode::WRITE | ||
|
||
constexpr AccessTypeID(std::size_t ID, AccessMode mode) noexcept : TypeID{ ID }, mode{ mode } {} | ||
constexpr AccessTypeID(std::string_view type_name, AccessMode mode) noexcept : TypeID{ type_name }, mode{ mode } {} | ||
constexpr AccessTypeID(TypeID ID, AccessMode mode = AccessMode::WRITE) noexcept : TypeID{ ID }, mode{ mode } {} | ||
template<std::size_t N> | ||
constexpr AccessTypeID(const char(&str)[N], AccessMode mode) noexcept : TypeID{ str }, mode{ mode } {} | ||
|
||
constexpr AccessMode GetAccessMode() const noexcept { return mode; } | ||
private: | ||
AccessMode mode{ AccessMode::WRITE }; | ||
}; | ||
|
||
template<typename Cmpt> | ||
static constexpr AccessTypeID AccessTypeID_of = { TypeID_of<RemoveTag_t<Cmpt>>, AccessMode_of<Cmpt> }; | ||
|
||
using AccessTypeIDSet = std::set<AccessTypeID, std::less<>>; | ||
} | ||
|
||
#include "detail/AccessTypeID.inl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.