XJ music engine  1.9.6
In-game runtime engine for XJ music.
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
XJ::Chain Class Reference

#include <Chain.h>

Public Types

enum  Type { Preview , Production }
 
enum  State { Draft , Ready , Fabricate , Failed }
 

Public Member Functions

 Chain ()=default
 
bool equals (const Chain &chain) const
 
unsigned long long hashCode () const
 

Static Public Member Functions

static Type parseType (const std::string &value)
 
static State parseState (const std::string &value)
 
static std::string toString (const Type &type)
 
static std::string toString (const State &state)
 

Public Attributes

UUID id
 
UUID templateId {}
 
Type type {}
 
State state {}
 
std::string shipKey {}
 
TemplateConfig config {}
 
std::string name {}
 
long long updatedAt {EntityUtils::currentTimeMillis()}
 

Friends

bool operator< (const Chain &lhs, const Chain &rhs)
 

Member Enumeration Documentation

◆ State

Enumerator
Draft 
Ready 
Fabricate 
Failed 

◆ Type

Enumerator
Preview 
Production 

Constructor & Destructor Documentation

◆ Chain()

XJ::Chain::Chain ( )
default

Member Function Documentation

◆ equals()

bool Chain::equals ( const Chain chain) const

Assert equality with another Chain

Parameters
chainThe Chain to compare
Returns
true if equal

◆ hashCode()

unsigned long long Chain::hashCode ( ) const

Determine a unique hash code for the Chain

Returns
hash code

◆ parseState()

Chain::State Chain::parseState ( const std::string &  value)
static

Parse the Chain State enum value from a string

Parameters
valueThe string to parse
Returns
The Chain State enum value

◆ parseType()

Chain::Type Chain::parseType ( const std::string &  value)
static

Parse the Chain Type enum value from a string

Parameters
valueThe string to parse
Returns
The Chain Type enum value

◆ toString() [1/2]

std::string Chain::toString ( const State state)
static

Convert an Chain State enum value to a string

Parameters
stateThe Chain State enum value
Returns
The string representation of the Chain State

◆ toString() [2/2]

std::string Chain::toString ( const Type type)
static

Convert an Chain Type enum value to a string

Parameters
typeThe Chain Type enum value
Returns
The string representation of the Chain Type

Friends And Related Function Documentation

◆ operator<

bool operator< ( const Chain lhs,
const Chain rhs 
)
friend

Compare two Chains

Parameters
lhschain
rhschain
Returns
true if lhs < rhs

Member Data Documentation

◆ config

TemplateConfig XJ::Chain::config {}

◆ id

UUID XJ::Chain::id

◆ name

std::string XJ::Chain::name {}

◆ shipKey

std::string XJ::Chain::shipKey {}

◆ state

State XJ::Chain::state {}

◆ templateId

UUID XJ::Chain::templateId {}

◆ type

Type XJ::Chain::type {}

◆ updatedAt

long long XJ::Chain::updatedAt {EntityUtils::currentTimeMillis()}

The documentation for this class was generated from the following files: