XJ music engine
1.9.6
In-game runtime engine for XJ music.
include
xjmusic
content
Project.h
Go to the documentation of this file.
1
// Copyright (c) XJ Music Inc. (https://xjmusic.com) All Rights Reserved.
2
3
#ifndef XJMUSIC_PROJECT_H
4
#define XJMUSIC_PROJECT_H
5
6
#include <string>
7
8
#include "
xjmusic/util/EntityUtils.h
"
9
#include "
ContentEntity.h
"
10
11
namespace
XJ
{
12
13
class
Project
:
public
ContentEntity
{
14
public
:
15
16
Project
() =
default
;
17
18
std::string
name
;
19
std::string
platformVersion
;
20
bool
isDeleted
{
false
};
21
long
long
updatedAt
{
EntityUtils::currentTimeMillis
()};
22
};
23
29
inline
void
from_json
(
const
json
&
json
,
Project
&entity) {
30
EntityUtils::setRequired
(
json
,
"id"
, entity.
id
);
31
EntityUtils::setIfNotNull
(
json
,
"name"
, entity.
name
);
32
EntityUtils::setIfNotNull
(
json
,
"platformVersion"
, entity.
platformVersion
);
33
EntityUtils::setIfNotNull
(
json
,
"isDeleted"
, entity.
isDeleted
);
34
EntityUtils::setIfNotNull
(
json
,
"updatedAt"
, entity.
updatedAt
);
35
}
36
37
}
// namespace XJ
38
39
#endif
//XJMUSIC_PROJECT_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::currentTimeMillis
static long long currentTimeMillis()
Definition:
EntityUtils.h:62
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::Project
Definition:
Project.h:13
XJ::Project::platformVersion
std::string platformVersion
Definition:
Project.h:19
XJ::Project::Project
Project()=default
XJ::Project::updatedAt
long long updatedAt
Definition:
Project.h:21
XJ::Project::name
std::string name
Definition:
Project.h:18
XJ::Project::isDeleted
bool isDeleted
Definition:
Project.h:20
XJ
Definition:
ActiveAudio.h:11
XJ::from_json
void from_json(const json &json, Instrument &entity)
Definition:
Instrument.h:106
Generated by
1.9.1