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::Segment Class Reference

#include <Segment.h>

Public Types

enum  Type {
  Pending , Initial , Continue , NextMain ,
  NextMacro
}
 
enum  State { Planned , Crafting , Crafted , Failed }
 

Public Member Functions

 Segment ()=default
 
bool equals (const Segment &segment) 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

int id {}
 
UUID chainId {}
 
Type type {}
 
State state {}
 
long beginAtChainMicros {}
 
std::optional< long > durationMicros {}
 
std::string key {}
 
int total {}
 
float intensity {}
 
float tempo {}
 
std::string storageKey {}
 
float waveformPreroll {}
 
float waveformPostroll {}
 
int delta {}
 
long long createdAt {EntityUtils::currentTimeMillis()}
 
long long updatedAt {EntityUtils::currentTimeMillis()}
 

Friends

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

Member Enumeration Documentation

◆ State

Enumerator
Planned 
Crafting 
Crafted 
Failed 

◆ Type

Enumerator
Pending 
Initial 
Continue 
NextMain 
NextMacro 

Constructor & Destructor Documentation

◆ Segment()

XJ::Segment::Segment ( )
default

Member Function Documentation

◆ equals()

bool Segment::equals ( const Segment segment) const

Assert equality with another Segment

Parameters
segmentThe Segment to compare
Returns
true if equal

◆ hashCode()

unsigned long long Segment::hashCode ( ) const

Determine a unique hash code for the Segment

Returns
hash code

◆ parseState()

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

Parse the Segment State enum value from a string

Parameters
valueThe string to parse
Returns
The Segment State enum value

◆ parseType()

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

Parse the Segment Type enum value from a string

Parameters
valueThe string to parse
Returns
The Segment Type enum value

◆ toString() [1/2]

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

Convert an Segment State enum value to a string

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

◆ toString() [2/2]

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

Convert an Segment Type enum value to a string

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

Friends And Related Function Documentation

◆ operator<

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

Compare two Segments

Parameters
lhssegment
rhssegment
Returns
true if lhs < rhs

Member Data Documentation

◆ beginAtChainMicros

long XJ::Segment::beginAtChainMicros {}

◆ chainId

UUID XJ::Segment::chainId {}

◆ createdAt

long long XJ::Segment::createdAt {EntityUtils::currentTimeMillis()}

◆ delta

int XJ::Segment::delta {}

◆ durationMicros

std::optional<long> XJ::Segment::durationMicros {}

◆ id

int XJ::Segment::id {}

◆ intensity

float XJ::Segment::intensity {}

◆ key

std::string XJ::Segment::key {}

◆ state

State XJ::Segment::state {}

◆ storageKey

std::string XJ::Segment::storageKey {}

◆ tempo

float XJ::Segment::tempo {}

◆ total

int XJ::Segment::total {}

◆ type

Type XJ::Segment::type {}

◆ updatedAt

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

◆ waveformPostroll

float XJ::Segment::waveformPostroll {}

◆ waveformPreroll

float XJ::Segment::waveformPreroll {}

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