2025-11-19 22:20:27 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
2025-11-24 22:11:26 +01:00
|
|
|
#include <algorithm>
|
2025-11-24 14:25:35 +01:00
|
|
|
#include <amethyst/maths/vec.hpp>
|
2025-11-26 13:46:46 +01:00
|
|
|
#include <chrono>
|
2025-11-24 14:25:35 +01:00
|
|
|
#include <cinttypes>
|
2025-12-01 22:10:18 +01:00
|
|
|
#include <format>
|
2025-12-07 18:08:36 +01:00
|
|
|
#include <functional>
|
2025-11-19 22:20:27 +01:00
|
|
|
#include <map>
|
2025-11-24 14:25:35 +01:00
|
|
|
#include <memory>
|
2025-11-24 22:11:26 +01:00
|
|
|
#include <numbers>
|
|
|
|
|
#include <stack>
|
2025-11-19 22:20:27 +01:00
|
|
|
#include <stdexcept>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
2025-12-07 18:08:36 +01:00
|
|
|
#define AMY_SHARED(x) \
|
|
|
|
|
using Ref = std::shared_ptr<x>; \
|
|
|
|
|
template <typename... Args> \
|
|
|
|
|
static Ref New(Args&&... args) { \
|
|
|
|
|
return std::make_shared<x>(std::forward<Args>(args)...); \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#define AMY_UNIQUE(x) \
|
|
|
|
|
using Ref = std::unique_ptr<x>; \
|
|
|
|
|
template <typename... Args> \
|
|
|
|
|
static Ref New(Args&&... args) { \
|
|
|
|
|
return std::make_unique<x>(std::forward<Args>(args)...); \
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-26 13:46:46 +01:00
|
|
|
namespace Amy {
|
2025-11-19 22:20:27 +01:00
|
|
|
using uc = unsigned char;
|
|
|
|
|
using us = unsigned short;
|
|
|
|
|
using ui = unsigned int;
|
|
|
|
|
using ull = unsigned long long;
|
2025-11-26 13:46:46 +01:00
|
|
|
// string
|
2025-11-19 22:20:27 +01:00
|
|
|
using str = std::string;
|
2025-11-26 13:46:46 +01:00
|
|
|
// const string
|
|
|
|
|
using kstr = const std::string;
|
|
|
|
|
// const string reference
|
2025-11-24 10:02:22 +01:00
|
|
|
using ksr = const std::string&;
|
2025-11-26 13:46:46 +01:00
|
|
|
// vector
|
2025-11-24 10:02:22 +01:00
|
|
|
template <typename T>
|
|
|
|
|
using vec = std::vector<T>;
|
2025-11-26 13:46:46 +01:00
|
|
|
// const vector reference
|
2025-11-19 22:20:27 +01:00
|
|
|
template <typename T>
|
2025-11-26 13:46:46 +01:00
|
|
|
using kvr = const std::vector<T>&;
|
|
|
|
|
// const vector
|
|
|
|
|
template <typename T>
|
|
|
|
|
using kvec = const std::vector<T>;
|
|
|
|
|
// unique pointer
|
2025-11-24 10:02:22 +01:00
|
|
|
template <typename T>
|
|
|
|
|
using up = std::unique_ptr<T>;
|
2025-11-26 13:46:46 +01:00
|
|
|
// shared pointer
|
|
|
|
|
template <typename T>
|
|
|
|
|
using sp = std::shared_ptr<T>;
|
|
|
|
|
} // namespace Amy
|