text
stringlengths
1
24.5M
/* * The MIT License (MIT) * * Copyright (c) 2015 Microsoft Corporation * * -=- Robust Distributed System Nucleus (rDSN) -=- * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software witho...
/* * The MIT License (MIT) * * Copyright (c) 2015 Microsoft Corporation * * -=- Robust Distributed System Nucleus (rDSN) -=- * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software witho...
/* * The MIT License (MIT) * * Copyright (c) 2015 Microsoft Corporation * * -=- Robust Distributed System Nucleus (rDSN) -=- * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software witho...
/* * The MIT License (MIT) * * Copyright (c) 2015 Microsoft Corporation * * -=- Robust Distributed System Nucleus (rDSN) -=- * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software witho...
/* * The MIT License (MIT) * * Copyright (c) 2015 Microsoft Corporation * * -=- Robust Distributed System Nucleus (rDSN) -=- * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software witho...
// apps # include "counter.app.example.h" # include <dsn/utility/module_init.cpp.h> // if replicated, please implement and use # include "counter.server.impl.h" void dsn_app_registration_counter() { // register all possible service apps // dsn::register_app< ::dsn::example::counter_server_app>("counter"); ...
/* * The MIT License (MIT) * * Copyright (c) 2015 Microsoft Corporation * * -=- Robust Distributed System Nucleus (rDSN) -=- * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restrict...
/* * The MIT License (MIT) * * Copyright (c) 2015 Microsoft Corporation * * -=- Robust Distributed System Nucleus(rDSN) -=- * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software withou...
#pragma once #include <unordered_map> #include <unordered_set> #include <Unreal/FFrame.hpp> #include <Unreal/UStruct.hpp> #include <Unreal/UObject.hpp> namespace RC::GUI::KismetDebuggerMod { using namespace RC::Unreal; auto expr_to_string(EExprToken expr) -> const char*; struct PausedContext { ...
#include <string> #include <GUI/GUITab.hpp> #include <Mod/CppUserModBase.hpp> #include <UE4SSProgram.hpp> #include <KismetDebugger.hpp> class KismetDebuggerMod : public RC::CppUserModBase { private: RC::GUI::KismetDebuggerMod::Debugger m_debugger{}; public: KismetDebuggerMod() : CppUserModBase() { ...
#include <KismetDebugger.hpp> #include <vector> #include <unordered_map> #include <iostream> #include <thread> #include <ranges> #include <DynamicOutput/DynamicOutput.hpp> #include <Helpers/String.hpp> #include <Unreal/UObjectGlobals.hpp> #include <Unreal/UClass.hpp> #include <Unreal/UFunction.hpp> #include <Unreal/F...
#pragma once #include <format> #include <unordered_map> #include <vector> namespace RC { class ArgsParser { struct Arg { std::string arg_name{}; std::string single_arg{}; std::vector<std::string> multi_arg{}; bool contains_multiple_arguments{}; ...
#include <iostream> #include <ArgsParser/ArgsParser.hpp> using namespace RC; auto main(int argc, char* argv[]) -> int { printf_s("ArgsParser Test\n"); try { ArgsParser args_parser{argc, argv, { "...
#pragma once #include <ASMHelper/Common.hpp> #include <Zydis/Zydis.h> namespace RC::ASM { struct Instruction { void* address{}; ZydisDecodedInstruction raw{}; ZydisDecodedOperand* operands{}; }; RC_ASM_API auto resolve_jmp(void* instruction_ptr) -> void*; RC_ASM_API auto r...
#pragma once #ifndef RC_ASM_HELPER_EXPORTS #ifndef RC_ASM_HELPER_BUILD_STATIC #ifndef RC_ASM_API #define RC_ASM_API __declspec(dllimport) #endif #else #ifndef RC_ASM_API #define RC_ASM_API #endif #endif #else #ifndef RC_ASM_API #define RC_ASM_API __declspec(dllexport) #endif #endif
#include <bit> #include <ASMHelper/ASMHelper.hpp> #include <DynamicOutput/DynamicOutput.hpp> #include <Zydis/Zydis.h> namespace RC::ASM { auto get_first_instruction_at_address(void* in_instruction_ptr) -> Instruction { auto instruction_ptr = static_cast<uint8_t*>(in_instruction_ptr); ZydisDeco...
#pragma once #include <concepts> #include <type_traits> #include <glaze/glaze.hpp> #include <Constructs/CompileTimeString.hpp> namespace RC { /* * @brief A type which allows for annotating other types with strings * * A type which allows for annotating other types with strings * This type is ...
#pragma once #include <cstdint> #include <algorithm> #include <array> #include <string_view> namespace RC { /* * A compile-time string * * @tparam N string size */ template <size_t N> struct ConstString { constexpr ConstString(const char (&str)[N]) { std:...
#pragma once #include <algorithm> #include <coroutine> #include <numeric> #include <ranges> #include <vector> namespace RC { template <typename T> struct Generator { struct promise_type; using handle_type = std::coroutine_handle<promise_type>; using iterator_category = std::input_i...
#ifndef UE4SS_REWRITTEN_LOOP_HPP #define UE4SS_REWRITTEN_LOOP_HPP namespace RC { enum class LoopAction { Continue, Break, }; } // namespace RC #endif // UE4SS_REWRITTEN_LOOP_HPP
#pragma once #include <ranges> #include <type_traits> namespace RC { template <std::ranges::input_range R> requires std::ranges::view<R> class EnumerateView : public std::ranges::view_interface<EnumerateView<R>> { public: struct iterator; struct iterator { ...
#pragma once #ifndef RC_DYNAMIC_OUTPUT_EXPORTS #ifndef RC_DYNAMIC_OUTPUT_BUILD_STATIC #ifndef RC_DYNOUT_API #define RC_DYNOUT_API __declspec(dllimport) #endif #else #ifndef RC_DYNOUT_API #define RC_DYNOUT_API #endif #endif #else #ifndef RC_DYNOUT_API #define RC_DYNOUT_API __declspec(dllexport) #endif #endif
#ifndef UE4SS_REWRITTEN_DEBUGCONSOLEDEVICE_HPP #define UE4SS_REWRITTEN_DEBUGCONSOLEDEVICE_HPP #include <DynamicOutput/Common.hpp> #include <DynamicOutput/Macros.hpp> #include <DynamicOutput/OutputDevice.hpp> namespace RC::Output { // Very simple class that outputs to stdout class RC_DYNOUT_API DebugConsoleDev...
#pragma once // Include this file when using the default output devices #include <source_location> // Line numbers etc... #include <tuple> #include <DynamicOutput/DebugConsoleDevice.hpp> // stdout #include <DynamicOutput/FileDevice.hpp> // File on drive #include <DynamicOutput/Macros.hpp> // Inte...
#ifndef UE4SS_REWRITTEN_FILEDEVICE_HPP #define UE4SS_REWRITTEN_FILEDEVICE_HPP #include <filesystem> #include <memory> #include <DynamicOutput/Common.hpp> #include <DynamicOutput/Macros.hpp> #include <DynamicOutput/OutputDevice.hpp> #include <File/File.hpp> namespace RC::Output { // Note: For FileDevice, 'Output:...
#ifndef DYNAMIC_OUTPUT_MACROS_HPP #define DYNAMIC_OUTPUT_MACROS_HPP #define ENABLE_OUTPUT_DEVICE_DEBUG_MODE 0 #define ASSERT_OUTPUT_DEVICE_IS_VALID(param_device) \ if (!param_device) ...
#ifndef UE4SS_REWRITTEN_NEWFILEDEVICE_HPP #define UE4SS_REWRITTEN_NEWFILEDEVICE_HPP namespace RC::Output { // Behavior defined as: // Identical to FileDevice except it deletes the file & re-creates it before outputting anything class NewFileDevice : public FileDevice { public: NewFileDev...
#ifndef UE4SS_REWRITTEN_OUTPUT_HPP #define UE4SS_REWRITTEN_OUTPUT_HPP #include <array> #include <format> #include <memory> #include <source_location> #include <stdexcept> #include <string> #include <tuple> #include <typeinfo> #include <vector> #include <fmt/core.h> #include <fmt/xchar.h> #include <fmt/chrono.h> #inclu...
#ifndef UE4SS_REWRITTEN_OUTPUTDEVICE_HPP #define UE4SS_REWRITTEN_OUTPUTDEVICE_HPP #include <DynamicOutput/Common.hpp> #include <DynamicOutput/Macros.hpp> #include <File/Macros.hpp> namespace RC { // Namespaced enums are used here to make them scoped // enum class is not used here because it gets rid of an imp...
#ifndef UE4SS_REWRITTEN_TESTDEVICE_HPP #define UE4SS_REWRITTEN_TESTDEVICE_HPP #include <DynamicOutput/Macros.hpp> #include <DynamicOutput/OutputDevice.hpp> namespace RC::Output { class TestDevice : public OutputDevice { public: enum class OptionalArgTest { ValueDefault, ...
#include <chrono> #include <locale> #include <DynamicOutput/DebugConsoleDevice.hpp> #include <DynamicOutput/Output.hpp> #define NOMINMAX #include <Windows.h> #ifdef TEXT #undef TEXT #endif namespace RC::Output { static auto log_level_to_color(Color::Color color) -> std::string { switch (color) ...
#include <DynamicOutput/Output.hpp> namespace RC::Output { auto has_internal_error() -> bool { return File::Internal::StaticStorage::internal_error; } auto DefaultTargets::set_default_log_level(int32_t log_level) -> void { default_log_level = log_level; } auto DefaultTarge...
#include <chrono> #include <format> #include <fmt/xchar.h> #include <fmt/chrono.h> #include <DynamicOutput/OutputDevice.hpp> #include <Helpers/Time.hpp> #if _WIN32 #define NOMINMAX #include <Windows.h> #ifdef TEXT #undef TEXT #endif #endif namespace RC::Output { auto OutputDevice::has_optional_arg() const -> bool...
#pragma once #ifndef RC_FILE_EXPORTS #ifndef RC_FILE_BUILD_STATIC #ifndef RC_FILE_API #define RC_FILE_API __declspec(dllimport) #endif #else #ifndef RC_FILE_API #define RC_FILE_API #endif #endif #else #ifndef RC_FILE_API #define RC_FILE_API __declspec(dllexport) #endif #endif
#pragma once namespace RC::File { enum class OpenFor { Writing, Appending, Reading, ReadWrite, }; enum class OverwriteExistingFile { Yes, No, }; enum class CreateIfNonExistent { Yes, No, }; enum class IsCachedHan...
#pragma once #include <stdexcept> namespace RC::File { class FileNotFoundException : public std::runtime_error { public: explicit FileNotFoundException(const char* msg) : std::runtime_error(msg) { } explicit FileNotFoundException(const std::string& msg) : std::runtime_err...
#pragma once #include <File/Common.hpp> #include <File/FileDef.hpp> #include <File/HandleTemplate.hpp> #include RC_OS_FILE_TYPE_INCLUDE_FILE namespace RC::File { RC_FILE_API auto open(const std::filesystem::path& file_path_and_name, OpenFor = OpenFor::Reading, O...
#pragma once namespace RC::File { #ifndef RC_DETECTED_OS #ifdef _WIN32 #define RC_DETECTED_OS _WIN32 #else static_assert(false, "Could not setup the 'Handle' typedef because a supported OS was not detected."); #endif #endif #if RC_DETECTED_OS == _WIN32 #ifndef RC_OS_FILE_TYPE_INCLUDE_FILE #define RC_OS_FILE_TYPE_...
#pragma once #include <filesystem> #include <memory> #include <span> #include <string> #include <File/Common.hpp> #include <File/Enums.hpp> #include <File/Exceptions.hpp> #include <File/FileType/FileBase.hpp> namespace RC::File { template <ImplementsFileInterface UnderlyingAbstraction> class HandleTemplate ...
#pragma once #include <File/Common.hpp> #include <File/Enums.hpp> namespace RC::File { namespace Internal { struct StaticStorage { static inline bool internal_error{}; }; } // namespace Internal struct RC_FILE_API OpenProperties { OpenFor open_for; ...
#pragma once #include <String/StringType.hpp> #define THROW_INTERNAL_FILE_ERROR(msg) \ RC::File::Internal::StaticStorage::internal_error = true; ...
#pragma once #include <File/FileType/WinFile.hpp>
#pragma once #include <span> #include <type_traits> #include <File/Enums.hpp> #include <File/InternalFile.hpp> #include <File/Macros.hpp> namespace RC::File { template <typename InternalFileType> class RC_FILE_API FileInterface { public: virtual ~FileInterface() = default; public: ...
#pragma once #include <filesystem> #include <format> #include <File/Common.hpp> #include <File/FileType/FileBase.hpp> #include <File/Macros.hpp> namespace RC::File { class WinFile : public FileInterface<WinFile> { private: using HANDLE = void*; struct IdentifyingProperties { ...
#include <File/File.hpp> namespace RC::File { auto construct_handle(const std::filesystem::path& file_name, const OpenProperties& open_properties) -> Handle { auto internal_handle = Handle::FileType::open_file(file_name, open_properties); return Handle{std::move(internal_handle)}; } au...
#include <fstream> #include <File/File.hpp> #include <File/FileType/WinFile.hpp> #include <File/HandleTemplate.hpp> #define NOMINMAX #include <Windows.h> #include <Helpers/String.hpp> #include <Helpers/SysError.hpp> #ifdef TEXT #undef TEXT #endif #include <fmt/core.h> namespace RC::File { auto WinFile::is_valid(...
#pragma once #include <Unreal/Common.hpp> #include <bit> #include <stdexcept> // Note: When we assign to 'm_function_address' from a function pointer, we're probably breaking some rules. // Though it's likely, a function is not guaranteed to be represented as a pointer. namespace RC { template <typename> ...
#pragma once #include <array> #include <cstdint> namespace RC::Helper::ASM { enum Instruction : int32_t { INSTR_LEA, INSTR_MOV, INSTR_CALL, INSTR_DIRECT_ADDR_CALL, INSTR_JMP, INSTR_INDIRECT_OFFSET_JMP, MAX_INSTRUCTIONS, }; inline auto operator>...
#pragma once #include <bit> #include <cstdint> namespace RC::Helper::Casting { template <typename To, typename From> auto ptr_cast(From ptr, int32_t offset = 0) -> To { static_assert(std::is_pointer_v<To> && std::is_pointer_v<From>, "ptr_cast can only be used on pointer types"); return st...
#pragma once #include <string> #include <String/StringType.hpp> namespace RC { template <typename... Args> auto static fmt(const char* fmt, Args... args) -> std::string { constexpr size_t out_string_length = 1000; char out_string[out_string_length]; size_t msg_len = strlen(fmt); ...
#pragma once #include <concepts> #include <cstdint> #include <limits> #include <stdexcept> namespace RC::Helper::Integer { template <std::integral IntTo, std::integral IntFrom> auto to(IntFrom from) -> IntTo { static constexpr const char* error_message{"Tried converting integer to another integral...
#pragma once #include <codecvt> #include <cwctype> #include <locale> #include <shared_mutex> #include <string> #include <unordered_map> #include <vector> #include <filesystem> #include <cassert> #include <String/StringType.hpp> namespace RC { /* explode_by_occurrence -> START FUNCTION: explode_by_occurrence...
#pragma once #include <system_error> namespace RC { inline const std::error_category& default_error_category() noexcept { #ifdef _WIN32 return std::system_category(); #else return std::generic_category(); #endif } #ifdef _WIN32 using PlatformResultCode = HRESULT; #else using Platf...
#pragma once #include <String/StringType.hpp> namespace RC { auto get_now_as_string(StringViewType format = STR("{:%Y_%m_%d_%H_%M_%S}")) -> StringType; } // namespace RC
#include <Helpers/Casting.hpp> #ifdef _WIN32 #define WINDOWS #define NOMINMAX #include "Windows.h" #endif namespace RC::Helper::Casting { #ifdef WINDOWS auto check_readable(void* handle, void* src_ptr) -> bool { uintptr_t is_valid_ptr_buffer; size_t bytes_read; return ReadProcessMemo...
#ifdef _WIN32 #include <windows.h> #endif #include <algorithm> #include <ranges> #include <format> #include <regex> #include <String/StringType.hpp> #include "Helpers/SysError.hpp" #include "Helpers/String.hpp" namespace RC { SysError::SysError(const int error_code, const std::error_category &category) ...
#include <chrono> #include <Helpers/Time.hpp> #include <fmt/xchar.h> #include <fmt/chrono.h> #if _WIN32 #define NOMINMAX #include <Windows.h> #ifdef TEXT #undef TEXT #endif #endif #if RC_IS_ANSI == 1 #define RC_STD_MAKE_FORMAT_ARGS fmt::make_format_args #else #define RC_STD_MAKE_FORMAT_ARGS fmt::make_format_args<fmt...
#pragma once #ifndef RC_INI_PARSER_EXPORTS #ifndef RC_INI_PARSER_BUILD_STATIC #ifndef RC_INI_PARSER_API #define RC_INI_PARSER_API __declspec(dllimport) #endif #else #ifndef RC_INI_PARSER_API #define RC_INI_PARSER_API #endif #endif #else #ifndef RC_INI_PARSER_API #define RC_INI_PARSER_API __declspec(dllexport) #endif #...
#pragma once #include <ProtoParser/Token.hpp> #include <ProtoParser/TokenParser.hpp> #include <ProtoParser/Tokenizer.hpp> #include <String/StringType.hpp> #include <String/StringType.hpp> namespace RC::Parser::Experimental { enum TokenType : int { EndOfFile = -1, // Special token, value of -1 is alwa...
#pragma once #include <unordered_map> #include <File/File.hpp> #include <IniParser/Common.hpp> #include <IniParser/Section.hpp> #include <ParserBase/Token.hpp> #include <ParserBase/TokenParser.hpp> #include <ParserBase/Tokenizer.hpp> namespace RC::Ini { class Value; class Parser { public: ...
#pragma once #include <memory> #include <vector> #include <File/File.hpp> #include <ProtoParser/TokenParser.hpp> namespace RC::Parser { namespace JSONInternal { enum TokenType : int { Default = -1, OpenCurlyBrace, CloseCurlyBrace, OpenSquareBrac...
#pragma once #include <unordered_map> #include <vector> #include "Value.hpp" namespace RC::Ini { struct Section { std::unordered_map<File::StringType, Value> key_value_pairs{}; std::vector<File::StringType> ordered_list{}; std::vector<std::pair<File::StringType, Value>> key_value_arra...
#pragma once #include <array> #include <unordered_map> #include <ParserBase/TokenParser.hpp> // NOTE: '#include <IniParser/Section.hpp>' does not work for some reason #include "Section.hpp" #include "Tokens.hpp" #include <String/StringType.hpp> namespace RC::Ini { class Value; enum class State { ...
#pragma once enum TokenType : int { CarriageReturn, NewLine, Space, Characters, Equals, ClosingSquareBracket, OpeningSquareBracket, SemiColon, EndOfFile, }; using IniTokenType = TokenType;
#pragma once #include <array> #include <cstdint> #include <File/File.hpp> #include <IniParser/Common.hpp> namespace RC::Ini { class Value { public: enum class Type { NoType, String, Int64, Float, Bool, Max, ...
#include <IniParser/Experimental.hpp> namespace RC::Parser::Experimental { auto ExperimentalTokenParser::find_variable_by_name(Section* section, const StringType& name) -> std::optional<std::reference_wrapper<Value>> { auto const& var = section->key_value_pairs.find(name); if (var != section->k...
#include <IniParser/Ini.hpp> #include <IniParser/TokenParser.hpp> #include <IniParser/Tokens.hpp> namespace RC::Ini { auto Parser::parse_internal(File::StringType& input) -> void { // Tokenize -> START ParserBase::Tokenizer tokenizer; tokenizer.set_available_tokens(create_available_toke...
#include <format> #include <IniParser/JSON.hpp> #include <ParserBase/Token.hpp> #include <ParserBase/Tokenizer.hpp> #include <Helpers/String.hpp> namespace RC::Parser { static auto has_only_spaces(const File::StringType& data) -> bool { if (std::all_of(data.begin(), data.end(), [](File::CharType c) {...
#include <cwctype> #include <format> #include <Helpers/String.hpp> #include <IniParser/TokenParser.hpp> #include <IniParser/Tokens.hpp> #include <IniParser/Value.hpp> #include <fmt/core.h> #include <ParserBase/Token.hpp> namespace RC::Ini { struct Int { int64_t value; int base{10}; boo...
#include <IniParser/Value.hpp> #include <Helpers/String.hpp> namespace RC::Ini { auto Value::get_ref() const -> const Value* { if (!m_ref) { throw std::runtime_error{"[Ini::Value::get_ref] Tried to access 'Value.ref' but it was nullptr"}; } else { ...
#pragma once #ifndef RC_INPUT_EXPORTS #ifndef RC_INPUT_BUILD_STATIC #ifndef RC_INPUT_API #define RC_INPUT_API __declspec(dllimport) #endif #else #ifndef RC_INPUT_API #define RC_INPUT_API #endif #endif #else #ifndef RC_INPUT_API #define RC_INPUT_API __declspec(dllexport) #endif #endif
#pragma once // TODO: Abstract more... need to get rid of Windows.h from InputHandler.cpp #include <cstdint> #include <functional> #include <unordered_map> #include <vector> #include <memory> #include <array> #include <mutex> #include <Input/Common.hpp> #include <Input/KeyDef.hpp> namespace RC::Input { using Ev...
#pragma once #include <stdexcept> #include <cstdint> #include <initializer_list> #include <Input/Common.hpp> #include <String/StringType.hpp> namespace RC::Input { static constexpr uint32_t max_callbacks_per_event = 30; static constexpr uint8_t max_keys = 0xFF; enum Key : uint8_t { RESERVED_...
#pragma once #include <optional> #include <vector> #include <Input/Handler.hpp> namespace RC::Input { class PlatformInputSource { public: /// Check if the input source is available virtual bool is_available() { return false; }; /// Initialize the in...
#pragma once #include <atomic> #include <optional> namespace RC::Input { /// SAFETY: This is ONLY a single producer, single consumer lock-free queue template <typename T, int max_buffer = 256> struct RingBufferSPSC { T m_queue[max_buffer]; std::atomic<unsigned int> m_head{0}; s...
#pragma once #include <vector> #include <Input/Platform/QueueInputSource.hpp> namespace RC::Input { class GLFW3InputSource : public QueueInputSource { public: auto begin_frame() -> void; auto receive_input(int key, int action, int mods) -> void; auto end_frame() -> void; ...
#pragma once #include <Input/PlatformInputSource.hpp> #include <Input/KeyDef.hpp> #include <Input/RingBuffer.hpp> namespace RC::Input { class QueueInputSource : public PlatformInputSource { private: static constexpr int max_inputs = 256; RingBufferSPSC<InputEvent, max_inputs> m_input_que...
#pragma once #include <vector> #include <unordered_map> #include <Input/KeyDef.hpp> #include <Input/Common.hpp> #include <Input/PlatformInputSource.hpp> namespace RC::Input { class Win32AsyncInputSource : public PlatformInputSource { private: std::vector<const wchar_t*> m_active_window_classes{...
#include <array> #include <climits> #include <cstring> #include <Input/Handler.hpp> #include <Input/PlatformInputSource.hpp> #include <DynamicOutput/DynamicOutput.hpp> namespace RC::Input { std::unordered_map<std::string, std::shared_ptr<PlatformInputSource>> Handler::m_input_sources_store; auto Handler::pro...
#include <algorithm> #include <cstdint> #include <unordered_map> #include <utility> #include <Input/KeyDef.hpp> #include <Helpers/String.hpp> #include <fmt/core.h> namespace RC::Input { static std::unordered_map<StringType, Key> lowercase_string_to_key{{STR("reserved_start_of_enum"), Key::RESERVED_START_OF_ENUM},...
#include <Input/PlatformInputSource.hpp> #include <Input/Platform/Win32AsyncInputSource.hpp> #include <Input/Platform/GLFW3InputSource.hpp> namespace RC::Input { auto Handler::init() -> void { register_input_source(std::make_shared<Win32AsyncInputSource>(L"ConsoleWindowClass", L"UnrealWindow")); ...
#include <Input/Platform/GLFW3InputSource.hpp> #define GLFW_KEY_SPACE 32 #define GLFW_KEY_APOSTROPHE 39 /* ' */ #define GLFW_KEY_COMMA 44 /* , */ #define GLFW_KEY_MINUS 45 /* - */ #define GLFW_KEY_PERIOD 46 /* . */ #define GLFW_KEY_SLASH 47 /* / */ #define GLFW_KEY_0 48 #define GLFW_KEY_1 49 #define GLFW_KEY_2...
#include <Input/PlatformInputSource.hpp> #include <Input/Platform/QueueInputSource.hpp> #include <DynamicOutput/Output.hpp> namespace RC::Input { auto QueueInputSource::push_input_event(const InputEvent& event) -> void { if (m_activated) { m_input_queue.push(event); Outp...
#include <Input/Handler.hpp> #include <Input/KeyDef.hpp> #include <Input/Common.hpp> #include <Input/Platform/Win32AsyncInputSource.hpp> #define NOMINMAX #include <Windows.h> namespace RC::Input { auto Win32AsyncInputSource::is_program_focused() -> bool { HWND hwnd = GetForegroundWindow(); if...
#pragma once #include <concepts> #include <memory> #include <string> #include <utility> #include <vector> #include <Constructs/Loop.hpp> #include <File/Macros.hpp> #include <JSON/Common.hpp> #include <JSON/Number.hpp> #include <JSON/Value.hpp> namespace RC::JSON { template <typename F> concept CallableWithIn...
#pragma once #include <JSON/Value.hpp> namespace RC::JSON { class RC_JSON_API Bool : public Value { public: constexpr static Type static_type = Type::Bool; private: bool m_underlying_value{}; public: explicit Bool(bool value); ~Bool() override = default; ...
#pragma once #ifndef RC_JSON_EXPORTS #ifndef RC_JSON_BUILD_STATIC #ifndef RC_JSON_API #define RC_JSON_API __declspec(dllimport) #endif #else #ifndef RC_JSON_API #define RC_JSON_API #endif #endif #else #ifndef RC_JSON_API #define RC_JSON_API __declspec(dllexport) #endif #endif #define JSON_DEPRECATED [[deprecated("JSO...
#pragma once #include <JSON/Array.hpp> #include <JSON/Bool.hpp> #include <JSON/Common.hpp> #include <JSON/Null.hpp> #include <JSON/Number.hpp> #include <JSON/Object.hpp> #include <JSON/String.hpp> namespace RC::JSON { /* JSON Help {} = an object [] = an array : = set value of ke...
#pragma once namespace RC::JSON { template <typename T> struct TypedKeyValuePair { const StringType& key; T* value{}; }; struct KeyValuePair { StringType key{}; std::unique_ptr<JSON::Value> value{}; template <typename JSONElementType> auto is() ...
#pragma once #include <JSON/Value.hpp> namespace RC::JSON { class RC_JSON_API Null : public Value { public: constexpr static Type static_type = Type::Null; public: ~Null() override = default; public: auto serialize([[maybe_unused]] ShouldFormat should_format = Shoul...
#pragma once #include <bit> #include <JSON/Value.hpp> namespace RC::JSON { class RC_JSON_API Number : public Value { public: constexpr static Type static_type = JSON::Type::Number; public: enum class Type { UInt32, UInt64, Int32, ...
#pragma once #include <format> #include <memory> #include <stdexcept> #include <unordered_map> #include <variant> #include <vector> #include <File/Macros.hpp> #include <Helpers/String.hpp> #include <JSON/Common.hpp> #include <JSON/KeyValuePair.hpp> #include <JSON/Number.hpp> #include <JSON/Value.hpp> #include <fmt/c...
#pragma once #include <format> #include <File/Macros.hpp> #include <JSON/Common.hpp> #include <JSON/Value.hpp> namespace RC::JSON { class String : public Value { public: RC_JSON_API constexpr static Type static_type = Type::String; private: StringType m_data{}; public: ...
#pragma once #include <JSON/Common.hpp> namespace RC::JSON { template <typename SupposedJSONNumber> concept JSONNumber = std::is_same_v<SupposedJSONNumber, int32_t> || std::is_same_v<SupposedJSONNumber, float> || std::is_same_v<SupposedJSONNumber, double>; enum class Type { Null, Obje...
#pragma once #include <memory> #include <File/File.hpp> #include <JSON/JSON.hpp> #include <JSON/Parser/TokenParser.hpp> #include <ParserBase/Tokenizer.hpp> // #include <JSON/Parser/Types.hpp> namespace RC::JSON::Parser { RC_JSON_API auto parse(StringType& input) -> std::unique_ptr<JSON::Object>; RC_JSON_API ...
#pragma once #include <variant> #include <vector> #include "Tokens.hpp" #include <JSON/JSON.hpp> #include <ParserBase/TokenParser.hpp> // #include "Types.hpp" #define RC_JSON_PARSER_SCOPED_ELEMENT_TYPES JSON::Object*, JSON::Array* namespace RC::JSON::Parser { class ScopeTypeVariant { private: ...
#pragma once namespace RC::JSON::Parser { enum TokenType : int { CarriageReturn, NewLine, DoubleQuote, Characters, ClosingCurlyBrace, OpeningCurlyBrace, ClosingSquareBracket, OpeningSquareBracket, Comma, Colon, True, ...
#include <JSON/Array.hpp> #include <JSON/Bool.hpp> #include <JSON/Null.hpp> #include <JSON/Object.hpp> #include <JSON/String.hpp> namespace RC::JSON { auto Array::new_object() -> Object& { return static_cast<Object&>(*m_members.emplace_back(std::make_unique<Object>())); } auto Array::new_array...
#include <JSON/Bool.hpp> namespace RC::JSON { Bool::Bool(bool value) : m_underlying_value(value) { } auto Bool::serialize(ShouldFormat should_format, int32_t* indent_level) -> StringType { (void)should_format; (void)indent_level; return m_underlying_value ? STR("true") : ST...
#include <JSON/Null.hpp> namespace RC::JSON { auto Null::serialize(ShouldFormat should_format, int32_t* indent_level) -> StringType { (void)should_format; (void)indent_level; return STR("null"); } } // namespace RC::JSON