XJ music engine  1.9.6
In-game runtime engine for XJ music.
ProgramSequenceBinding.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_BINDING_H
4 #define XJMUSIC_PROGRAM_SEQUENCE_BINDING_H
5 
6 #include <string>
7 
9 #include "ContentEntity.h"
10 
11 namespace XJ {
12 
14  public:
15 
17 
19  std::string programSequenceId;
20  int offset{};
21  };
22 
28  inline void from_json(const json &json, ProgramSequenceBinding &entity) {
29  EntityUtils::setRequired(json, "id", entity.id);
30  EntityUtils::setRequired(json, "programId", entity.programId);
31  EntityUtils::setRequired(json, "programSequenceId", entity.programSequenceId);
32  EntityUtils::setIfNotNull(json, "offset", entity.offset);
33  }
34 
35 }// namespace XJ
36 
37 #endif//XJMUSIC_PROGRAM_SEQUENCE_BINDING_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: ProgramSequenceBinding.h:13
UUID programId
Definition: ProgramSequenceBinding.h:18
std::string programSequenceId
Definition: ProgramSequenceBinding.h:19
int offset
Definition: ProgramSequenceBinding.h:20
Definition: ActiveAudio.h:11
std::string UUID
Definition: EntityUtils.h:28
void from_json(const json &json, Instrument &entity)
Definition: Instrument.h:106