XJ music engine
1.9.6
In-game runtime engine for XJ music.
include
xjmusic
content
InstrumentMeme.h
Go to the documentation of this file.
1
// Copyright (c) XJ Music Inc. (https://xjmusic.com) All Rights Reserved.
2
3
#ifndef XJMUSIC_INSTRUMENT_MEME_H
4
#define XJMUSIC_INSTRUMENT_MEME_H
5
6
#include <string>
7
#include <set>
8
9
#include "
xjmusic/util/EntityUtils.h
"
10
#include "
ContentEntity.h
"
11
12
namespace
XJ
{
13
14
class
InstrumentMeme
:
public
ContentEntity
{
15
public
:
16
17
InstrumentMeme
() =
default
;
18
19
UUID
instrumentId
;
20
std::string
name
;
21
27
static
std::set<std::string>
getNames
(
const
std::set<const InstrumentMeme *>& instrumentMemes);
28
29
};
30
36
inline
void
from_json
(
const
json
&
json
,
InstrumentMeme
&entity) {
37
EntityUtils::setRequired
(
json
,
"id"
, entity.
id
);
38
EntityUtils::setRequired
(
json
,
"instrumentId"
, entity.
instrumentId
);
39
EntityUtils::setIfNotNull
(
json
,
"name"
, entity.
name
);
40
}
41
42
}
// namespace XJ
43
44
#endif
//XJMUSIC_INSTRUMENT_MEME_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::InstrumentMeme
Definition:
InstrumentMeme.h:14
XJ::InstrumentMeme::instrumentId
UUID instrumentId
Definition:
InstrumentMeme.h:19
XJ::InstrumentMeme::name
std::string name
Definition:
InstrumentMeme.h:20
XJ::InstrumentMeme::getNames
static std::set< std::string > getNames(const std::set< const InstrumentMeme * > &instrumentMemes)
Definition:
InstrumentMeme.cpp:7
XJ::InstrumentMeme::InstrumentMeme
InstrumentMeme()=default
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