XJ music engine  1.9.6
In-game runtime engine for XJ music.
ProgramMeme.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_MEME_H
4 #define XJMUSIC_PROGRAM_MEME_H
5 
6 #include <string>
7 #include <set>
8 
10 #include "ContentEntity.h"
11 
12 namespace XJ {
13 
14  class ProgramMeme : public ContentEntity {
15  public:
16 
17  ProgramMeme() = default;
18 
20  std::string name;
21 
27  static std::set<std::string> getNames(const std::set<const ProgramMeme *> &programMemes);
28 
29  };
30 
36  inline void from_json(const json &json, ProgramMeme &entity) {
37  EntityUtils::setRequired(json, "id", entity.id);
38  EntityUtils::setRequired(json, "programId", entity.programId);
39  EntityUtils::setIfNotNull(json, "name", entity.name);
40  }
41 
42 }// namespace XJ
43 
44 #endif//XJMUSIC_PROGRAM_MEME_H
nlohmann::json json
Definition: EntityUtils.h:14
Definition: ContentEntity.h:12
UUID id
Definition: ContentEntity.h:17
static void setIfNotNull(const json &json, const std::string &key, std::string &value)
Definition: EntityUtils.cpp:27
static void setRequired(const json &json, const std::string &key, UUID &value)
Definition: EntityUtils.cpp:16
Definition: ProgramMeme.h:14
std::string name
Definition: ProgramMeme.h:20
static std::set< std::string > getNames(const std::set< const ProgramMeme * > &programMemes)
Definition: ProgramMeme.cpp:7
UUID programId
Definition: ProgramMeme.h:19
ProgramMeme()=default
Definition: ActiveAudio.h:11
std::string UUID
Definition: EntityUtils.h:28
void from_json(const json &json, Instrument &entity)
Definition: Instrument.h:106