-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <cpprealm/schema.hpp> | ||
|
||
namespace realm { | ||
namespace schemagen { | ||
|
||
std::mutex schema_mtx; | ||
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Linux Sync Release (gcc 8)
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Linux Sync Debug (gcc 8)
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (clang 15)
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (clang 15)
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 8.3)
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 12.1)
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 8.3)
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 11.1)
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 9.1)
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 10.1)
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 10.1)
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 11.1)
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 12.1)
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 9.1)
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Windows Sync Debug
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Windows Sync Debug
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Windows Sync Debug
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Windows Debug
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Windows Debug
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Windows Debug
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Windows Release
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Windows Release
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Windows Release
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Windows Sync Release
Check failure on line 6 in src/cpprealm/schema.cpp GitHub Actions / Windows Sync Release
|
||
|
||
std::vector<internal::bridge::object_schema> registered_schemas(const std::optional<internal::bridge::object_schema>& schema) { | ||
static std::vector<internal::bridge::object_schema> schemas; | ||
std::lock_guard<std::mutex> lock(schema_mtx); | ||
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Sync Release (gcc 8)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Sync Release (gcc 8)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Sync Release (gcc 8)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Sync Release (gcc 8)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Sync Debug (gcc 8)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Sync Debug (gcc 8)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Sync Debug (gcc 8)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Sync Debug (gcc 8)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (clang 15)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (clang 15)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (clang 15)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (clang 15)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 8.3)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 8.3)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 8.3)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 8.3)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 12.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 12.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 12.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 12.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 8.3)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 8.3)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 8.3)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 8.3)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 11.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 11.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 11.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 11.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 9.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 9.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 9.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 9.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 10.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 10.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 10.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Debug (gcc 10.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 10.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 10.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 10.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 10.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 11.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 11.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 11.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 11.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 12.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 12.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 12.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 12.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 9.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 9.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 9.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Linux Release (gcc 9.1)
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Sync Debug
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Sync Debug
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Sync Debug
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Sync Debug
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Sync Debug
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Debug
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Debug
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Debug
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Debug
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Debug
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Release
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Release
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Release
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Release
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Release
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Sync Release
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Sync Release
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Sync Release
Check failure on line 10 in src/cpprealm/schema.cpp GitHub Actions / Windows Sync Release
|
||
if (schema) { | ||
auto it = std::find(std::begin(schemas), std::end(schemas), *schema); | ||
if (it == std::end(schemas)) | ||
schemas.push_back(*schema); | ||
} | ||
return schemas; | ||
} | ||
|
||
} // namespace schemagen | ||
} // namespace realm |