Symmetri
Loading...
Searching...
No Matches
colors.hpp File Reference
#include <algorithm>
#include <array>
#include <cassert>
#include <functional>
#include <string_view>
#include <type_traits>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

class  symmetri::Token
 Tokens are elements that can reside in places. Tokens can have a color which makes them distinguishable from other tokens. Tokens that have the same color are not distinguishable. Users can create their own token-colors by either using the CREATE_CUSTOM_TOKEN-macro (compile-time) or by calling Token's public constructor which takes a token-name. More...
 
struct  symmetri::Scheduled
 
struct  symmetri::Started
 
struct  symmetri::Success
 
struct  symmetri::Deadlocked
 
struct  symmetri::Canceled
 
struct  symmetri::Paused
 
struct  symmetri::Failed
 

Macros

#define CREATE_CUSTOM_TOKEN(name)
 A macro from which we can create token-colors. Colors ceated this way end up in the symmetri namespace.
 

Variables

static Scheduled symmetri::Scheduled
 
static Started symmetri::Started
 
static Success symmetri::Success
 
static Deadlocked symmetri::Deadlocked
 
static Canceled symmetri::Canceled
 
static Paused symmetri::Paused
 
static Failed symmetri::Failed
 

Macro Definition Documentation

◆ CREATE_CUSTOM_TOKEN

#define CREATE_CUSTOM_TOKEN ( name)
Value:
namespace symmetri { \
struct name : public Token { \
constexpr name() : Token(this) {} \
constexpr bool operator==(const Token& c) const { \
return toIndex() == c.toIndex(); \
} \
}; \
static inline name name; \
}

A macro from which we can create token-colors. Colors ceated this way end up in the symmetri namespace.