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

#include <Instrument.h>

Inheritance diagram for XJ::Instrument:
XJ::ContentEntity

Public Types

enum  Type {
  Background , Bass , Drum , Hook ,
  Pad , Percussion , Stab , Sticky ,
  Stripe , Transition
}
 
enum  Mode { Chord , Event , Loop }
 
enum  State { Draft , Published }
 

Public Member Functions

 Instrument ()=default
 
- Public Member Functions inherited from XJ::ContentEntity
 ContentEntity ()=default
 

Static Public Member Functions

static Type parseType (const std::string &value)
 
static Mode parseMode (const std::string &value)
 
static State parseState (const std::string &value)
 
static std::string toString (const Type &type)
 
static std::string toString (const Mode &mode)
 
static std::string toString (const State &state)
 
static const std::vector< std::string > & toStrings (std::vector< Type > types)
 

Public Attributes

UUID libraryId {}
 
State state {}
 
Type type {}
 
Mode mode {}
 
std::string name {}
 
InstrumentConfig config {}
 
float volume {0}
 
bool isDeleted {false}
 
long long updatedAt {EntityUtils::currentTimeMillis()}
 
- Public Attributes inherited from XJ::ContentEntity
UUID id
 

Member Enumeration Documentation

◆ Mode

Enumerator
Chord 
Event 
Loop 

◆ State

Enumerator
Draft 
Published 

◆ Type

Enumerator
Background 
Bass 
Drum 
Hook 
Pad 
Percussion 
Stab 
Sticky 
Stripe 
Transition 

Constructor & Destructor Documentation

◆ Instrument()

XJ::Instrument::Instrument ( )
default

Member Function Documentation

◆ parseMode()

Instrument::Mode Instrument::parseMode ( const std::string &  value)
static

Parse the Instrument Mode enum value from a string

Parameters
valueThe string to parse
Returns
The Instrument Mode enum value

◆ parseState()

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

Parse the Instrument State enum value from a string

Parameters
valueThe string to parse
Returns
The Instrument State enum value

◆ parseType()

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

Parse the Instrument Type enum value from a string

Parameters
valueThe string to parse
Returns
The Instrument Type enum value

◆ toString() [1/3]

std::string Instrument::toString ( const Mode mode)
static

Convert an Instrument Mode enum value to a string

Parameters
modeThe Instrument Mode enum value
Returns
The string representation of the Instrument Mode

◆ toString() [2/3]

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

Convert an Instrument State enum value to a string

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

◆ toString() [3/3]

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

Convert an Instrument Type enum value to a string

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

◆ toStrings()

const std::vector< std::string > & Instrument::toStrings ( std::vector< Type types)
static

Convert a set of Instrument Type enum values to a set of strings

Parameters
typesThe set of Instrument Type enum values
Returns
The set of strings

Member Data Documentation

◆ config

InstrumentConfig XJ::Instrument::config {}

◆ isDeleted

bool XJ::Instrument::isDeleted {false}

◆ libraryId

UUID XJ::Instrument::libraryId {}

◆ mode

Mode XJ::Instrument::mode {}

◆ name

std::string XJ::Instrument::name {}

◆ state

State XJ::Instrument::state {}

◆ type

Type XJ::Instrument::type {}

◆ updatedAt

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

◆ volume

float XJ::Instrument::volume {0}

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