-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update .gitignore * add missing iss string literals * add missing types * introduce undirected track element * add test case for de_export * make all_of constexpr * fix route iterator * skip faulty data * speed limits can now be placed on section elements * refactor make_piecwise into is_continuous * disable unnecessary resolve_overlaps for now * make it compile * skip test if file does not exist * update tiles and utl to silence catch2 errors * ignore some iss files for now * wip * add layout option * add warning message * wip * make sassert not constexpr due to stringstream * finish bitfield * add duration factory methods * kss parser wip * update gitignore * merge parse-iss into kss-parser * add interlocking option * fix resource filepath * merge parse-iss into kss-parser * rename test file path * kss wip * fix clang warning wrt signedness * cleanup * don't use source_location with clang for now * fix sassert for clangd * add tuple slice * wip * wip * wip * wip * wip * wip * wip * wip * fix format * fix windows error * disable cista build for now * fix windows build * fix windows build * fix windows build * don't use mmap on windows for now * fix format * fix constness * add msvc-relwithdebinfo * fix windows release build * fix format * dont use ternary in coroutines.? Co-authored-by: Julian Harbarth <[email protected]>
- Loading branch information
1 parent
2253ce9
commit 2f8df15
Showing
202 changed files
with
6,943 additions
and
10,214 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,7 +1,7 @@ | ||
[cista] | ||
[email protected]:felixguendling/cista.git | ||
branch=master | ||
commit=32e52a0082e89986bb86afad513654fa6a6c1412 | ||
branch=nigiri | ||
commit=47633d28d97b50bb128de9d0cc4c879031e5bb1c | ||
[utl] | ||
[email protected]:motis-project/utl.git | ||
branch=master | ||
|
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,30 +1,30 @@ | ||
# This file is responsible for building the soro-server, | ||
# which includes the soro-client build with emscripten | ||
|
||
# For this to work it is necessary that the environment variable | ||
# EMSDK=/path/to/emsdk/ | ||
# is set. | ||
# which includes the soro-client | ||
|
||
add_custom_target(soro-server-client) | ||
|
||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten") | ||
# Gets us the soro-client interface (using emscripten) | ||
add_subdirectory(web/client) | ||
else () | ||
# SERVER | ||
set(SORO_SERVER_DIR ${CMAKE_CURRENT_BINARY_DIR}) | ||
file(MAKE_DIRECTORY ${SORO_SERVER_DIR}) | ||
# SERVER | ||
set(SORO_SERVER_DIR ${CMAKE_CURRENT_BINARY_DIR}) | ||
file(MAKE_DIRECTORY ${SORO_SERVER_DIR}) | ||
|
||
add_subdirectory(web/server/) | ||
add_dependencies(soro-server-client soro-server) | ||
|
||
add_subdirectory(web/server/) | ||
add_dependencies(soro-server-client soro-server) | ||
# CLIENT | ||
file(GLOB_RECURSE soro-client-files | ||
web/client/*.html | ||
web/client/*.css | ||
web/client/*.js | ||
web/client/*.ico | ||
web/client/*.png | ||
web/client/*.svg | ||
web/client/*.map) | ||
|
||
file(GLOB_RECURSE soro-client-files web/client/ *.html *.css *.js *.ico *.png *.svg *.map) | ||
foreach (file ${soro-client-files}) | ||
set(path ${file}) | ||
cmake_path(RELATIVE_PATH path BASE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/web/client OUTPUT_VARIABLE relative-path) | ||
configure_file(${file} ${SORO_SERVER_DIR}/server_resources/${relative-path} COPYONLY) | ||
endforeach () | ||
endif () | ||
foreach (file ${soro-client-files}) | ||
set(path ${file}) | ||
cmake_path(RELATIVE_PATH path BASE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/web/client/ OUTPUT_VARIABLE relative-path) | ||
configure_file(${file} ${SORO_SERVER_DIR}/server_resources/${relative-path} COPYONLY) | ||
endforeach () |
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#pragma once | ||
|
||
#include <chrono> | ||
|
||
#include "date/date.h" | ||
#include "fmt/format.h" | ||
|
||
#include "soro/utls/concepts/is_any_of.h" | ||
|
||
namespace soro { | ||
|
||
namespace sc = std::chrono; | ||
|
||
using i32_seconds = sc::duration<uint32_t, sc::seconds::period>; | ||
using i64_seconds = sc::duration<uint64_t, sc::seconds::period>; | ||
using seconds = i32_seconds; | ||
using minutes = sc::duration<uint32_t, sc::minutes::period>; | ||
using hours = sc::duration<uint32_t, sc::hours::period>; | ||
using days = sc::duration<uint32_t, sc::days::period>; | ||
|
||
// an absolute point in time, given as a count of non-leap seconds | ||
// since unix epoch (1970/01/01/ 00:00:00) | ||
// same as sc::time_point<sc::system_clock, sc::seconds> | ||
using absolute_time = date::sys_time<i32_seconds>; | ||
|
||
// relative point in time wrt to an anchor point | ||
// given as a count of non-leap seconds since an absolute time (the anchor) | ||
using relative_time = i32_seconds; | ||
|
||
using duration2 = i32_seconds; | ||
|
||
constexpr absolute_time relative_to_absolute(absolute_time const anchor, | ||
relative_time const relative) { | ||
return sc::time_point_cast<absolute_time::duration>(anchor) + relative; | ||
} | ||
|
||
template <typename T> | ||
concept soro_time = utls::is_any_of<T, absolute_time, relative_time, duration2>; | ||
|
||
template <soro_time T> | ||
constexpr T const INVALID = T::max(); | ||
|
||
template <soro_time T> | ||
constexpr bool valid(T const t) { | ||
return t != INVALID<T>; | ||
} | ||
|
||
} // namespace soro | ||
|
||
template <> | ||
struct fmt::formatter<soro::absolute_time> { | ||
constexpr auto parse(format_parse_context& ctx) // NOLINT | ||
-> decltype(ctx.begin()) { | ||
if (ctx.begin() != ctx.end() && *ctx.begin() != '}') { | ||
throw format_error("invalid format for anchor time"); | ||
} | ||
|
||
return ctx.begin(); | ||
} | ||
|
||
template <typename FormatContext> | ||
auto format(soro::absolute_time const at, FormatContext& ctx) const | ||
-> decltype(ctx.out()) { | ||
return fmt::format_to(ctx.out(), "{}", at); | ||
} | ||
}; |
Oops, something went wrong.