XJ music engine
1.9.6
In-game runtime engine for XJ music.
include
xjmusic
content
ProgramSequencePattern.h
Go to the documentation of this file.
1
// Copyright (c) XJ Music Inc. (https://xjmusic.com) All Rights Reserved.
2
3
#ifndef XJMUSIC_PROGRAM_SEQUENCE_PATTERN_H
4
#define XJMUSIC_PROGRAM_SEQUENCE_PATTERN_H
5
6
#include <string>
7
8
#include "
xjmusic/util/EntityUtils.h
"
9
#include "
ContentEntity.h
"
10
11
namespace
XJ
{
12
13
class
ProgramSequencePattern
:
public
ContentEntity
{
14
public
:
15
16
ProgramSequencePattern
() =
default
;
17
18
UUID
programId
;
19
std::string
programSequenceId
;
20
std::string
programVoiceId
;
21
std::string
name
;
22
int
total
{};
23
};
24
30
inline
void
from_json
(
const
json
&
json
,
ProgramSequencePattern
&entity) {
31
EntityUtils::setRequired
(
json
,
"id"
, entity.
id
);
32
EntityUtils::setRequired
(
json
,
"programId"
, entity.
programId
);
33
EntityUtils::setRequired
(
json
,
"programSequenceId"
, entity.
programSequenceId
);
34
EntityUtils::setRequired
(
json
,
"programVoiceId"
, entity.
programVoiceId
);
35
EntityUtils::setIfNotNull
(
json
,
"name"
, entity.
name
);
36
EntityUtils::setIfNotNull
(
json
,
"total"
, entity.
total
);
37
}
38
39
}
// namespace XJ
40
41
#endif
//XJMUSIC_PROGRAM_SEQUENCE_PATTERN_H
ContentEntity.h
EntityUtils.h
json
nlohmann::json json
Definition:
EntityUtils.h:14
XJ::ContentEntity
Definition:
ContentEntity.h:12
XJ::ContentEntity::id
UUID id
Definition:
ContentEntity.h:17
XJ::EntityUtils::setIfNotNull
static void setIfNotNull(const json &json, const std::string &key, std::string &value)
Definition:
EntityUtils.cpp:27
XJ::EntityUtils::setRequired
static void setRequired(const json &json, const std::string &key, UUID &value)
Definition:
EntityUtils.cpp:16
XJ::ProgramSequencePattern
Definition:
ProgramSequencePattern.h:13
XJ::ProgramSequencePattern::programVoiceId
std::string programVoiceId
Definition:
ProgramSequencePattern.h:20
XJ::ProgramSequencePattern::ProgramSequencePattern
ProgramSequencePattern()=default
XJ::ProgramSequencePattern::programId
UUID programId
Definition:
ProgramSequencePattern.h:18
XJ::ProgramSequencePattern::name
std::string name
Definition:
ProgramSequencePattern.h:21
XJ::ProgramSequencePattern::programSequenceId
std::string programSequenceId
Definition:
ProgramSequencePattern.h:19
XJ::ProgramSequencePattern::total
int total
Definition:
ProgramSequencePattern.h:22
XJ
Definition:
ActiveAudio.h:11
XJ::UUID
std::string UUID
Definition:
EntityUtils.h:28
XJ::from_json
void from_json(const json &json, Instrument &entity)
Definition:
Instrument.h:106
Generated by
1.9.1