Zao SDK for Jetson / libzep API Reference
Loading...
Searching...
No Matches
RoomGroupList.hpp
1/*
2 * Copyright (c) 2022-2023, Soliton Systems K.K. All rights reserved.
3 * Use in source and binary forms, with or without modification,
4 * is permitted provided that the following a condition is met:
5 *
6 * Use is permitted only in accordance with the terms and
7 * conditions set forth in the Software License Agreement available
8 * at https://zao-sdk.org/license-agreement/.
9 */
10#ifndef ZEP_CONTROL_ROOM_GROUP_LIST_HPP
11#define ZEP_CONTROL_ROOM_GROUP_LIST_HPP
12
13#include <string>
14#include <vector>
15
16namespace zep {
17namespace control {
18
22class RoomGroupEntry {
23 public:
28 RoomGroupEntry() noexcept {}
29
38 RoomGroupEntry(const std::uint32_t id,
39 const std::string& name,
40 const std::string& nickname) noexcept {
41 SetId(id);
42 SetName(name);
43 SetNickname(nickname);
44 }
45
49 std::uint32_t GetId() const noexcept { return id_; }
50
56 void SetId(std::uint32_t id) noexcept { id_ = id; }
57
61 std::string GetName() const noexcept { return name_; }
62
68 void SetName(const std::string& name) noexcept { name_ = name; }
69
73 std::string GetNickname() const noexcept { return nickname_; }
74
80 void SetNickname(const std::string& nickname) noexcept { nickname_ = nickname; }
81
89 bool operator==(const RoomGroupEntry& other) const noexcept {
90 return id_ == other.id_ &&
91 name_ == other.name_ &&
92 nickname_ == other.nickname_;
93 }
94
102 bool operator!=(const RoomGroupEntry& other) const noexcept {
103 return !(*this == other);
104 }
105
106 private:
110 std::uint32_t id_ = 0;
111
115 std::string name_;
116
120 std::string nickname_;
121
122};
123
127class RoomGroupList {
128 public:
133 RoomGroupList() noexcept {}
134
138 std::vector<RoomGroupEntry> GetRoomGroups() const noexcept { return room_groups_; }
139
145 void SetRoomGroup(RoomGroupEntry& room_group) noexcept {
146 room_groups_.push_back(room_group);
147 }
148
152 std::uint32_t GetSelectedId() const noexcept { return selected_id_; }
153
159 void SetSelectedId(std::uint32_t id) noexcept { selected_id_ = id; }
160
161 private:
165 std::vector<RoomGroupEntry> room_groups_;
166
170 std::uint32_t selected_id_;
171
172};
173
174} // namespace control
175} // namespace zep
176
177#endif // ZEP_CONTROL_ROOM_GROUP_LIST_HPP
Room group format.
Definition RoomGroupList.hpp:22
std::string GetName() const noexcept
ルームグループのネームを取得する。
Definition RoomGroupList.hpp:61
RoomGroupEntry() noexcept
RoomGroupEntry オブジェクトをデフォルト構築する。
Definition RoomGroupList.hpp:28
void SetName(const std::string &name) noexcept
ルームグループのネームを設定する。
Definition RoomGroupList.hpp:68
bool operator!=(const RoomGroupEntry &other) const noexcept
ルームグループ同士を非等値比較する
Definition RoomGroupList.hpp:102
void SetId(std::uint32_t id) noexcept
ルームグループのIDを設定する。
Definition RoomGroupList.hpp:56
void SetNickname(const std::string &nickname) noexcept
ルームグループのニックネームを設定する。
Definition RoomGroupList.hpp:80
bool operator==(const RoomGroupEntry &other) const noexcept
ルームグループ同士を等値比較する
Definition RoomGroupList.hpp:89
std::string GetNickname() const noexcept
ルームグループのニックネームを取得する。
Definition RoomGroupList.hpp:73
RoomGroupEntry(const std::uint32_t id, const std::string &name, const std::string &nickname) noexcept
RoomGroupEntry オブジェクトを初期値付きで構築する。
Definition RoomGroupList.hpp:38
std::uint32_t GetId() const noexcept
ルームグループのIDを取得する。
Definition RoomGroupList.hpp:49
Namespace for ZEP SDK.
Definition FactoryInterface.hpp:19