aboutsummaryrefslogtreecommitdiffstats
path: root/include/rba/RBAModel.hpp
blob: eb5133868d2a35e30d627d6d7b51f85b5bb7e0a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
/**
 * Copyright (c) 2019 DENSO CORPORATION.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * Model class
 */

#ifndef RBAMODEL_HPP
#define RBAMODEL_HPP

#include <string>
#include "RBAArea.hpp"
#include "RBAViewContent.hpp"
#include "RBAViewContentState.hpp"
#include "RBASize.hpp"
#include "RBAZone.hpp"
#include "RBASoundContent.hpp"
#include "RBASoundContentState.hpp"
#include "RBAScene.hpp"
#include "RBADisplay.hpp"
#include "RBAPositionContainer.hpp"
#include "RBAJsonParser.hpp"

#ifdef _MSC_VER
#ifdef _WINDLL
#define DLL_EXPORT __declspec(dllexport)
#else
#define DLL_EXPORT __declspec(dllimport)
#endif
#else
#define DLL_EXPORT
#endif

namespace rba
{
  
/**
 * @class RBAModel
 * Defines the arbitration rule model which is used by Arbitrator.<br>
 * The model consists of model elements such as areas, zones, contens, scenes,
 * constraint expressions, and so on.
 * Elements can be searched by name, and the list of elements for each type can be retrieved.
 */
class DLL_EXPORT RBAModel
{
public:
  RBAModel()=default;
  RBAModel(const RBAModel&)=delete;
  RBAModel(RBAModel&&)=delete;
  RBAModel& operator=(const RBAModel&)=delete;
  RBAModel& operator=(RBAModel&&)=delete;
  virtual ~RBAModel()=default;

public:
  /**
   * @brief Search for area with a name
   * @param areaName Area name
   * @return Area
   *
   * If the area name does not exist, returns nullptr.
   */
  virtual const RBAArea* findArea(const std::string& areaName) const=0;

  /**
   * @brief Search for view content with a name.
   * @param contName Content name
   * @return Content
   *
   * If the content name does not exist, returns nullptr.
   */
  virtual const RBAViewContent* findViewContent(const std::string& contName) const=0;

  /**
   * @brief Search for view content state with a name.
   * @param stateName Content state name
   * @return State of view content
   *
   * If the content state name does not exist, returns nullptr.
   */
  virtual const RBAViewContentState* findViewContentState(const std::string& stateName) const=0;

  /**
   * @brief Search for size with a name.
   * @param sizeName Name of the search size
   * @return Size
   *
   * Specify the name of the search size as follows.\n
   * In the case of the size linked to the area:
   * <area_name>/<size_name>
   * In the case of the size linked to the content:
   * <content_name>/<size_name>
   * \n
   * If the name of the search size does not exist, returns nullptr.
   */
  virtual const RBASize* findSize(const std::string& sizeName) const=0;

  /**
   * @brief Search for zone with a name.
   * @param zoneName Zone name
   * @return Zone
   *
   * If the zone name does not exist, returns nullptr.
   */
  virtual const RBAZone* findZone(const std::string& zoneName) const=0;

  /**
   * @brief Search for sound content with a name.
   * @param contName Content name
   * @return Sound content
   *
   * If the content name does not exist, returns nullptr.
   */
  virtual const RBASoundContent* findSoundContent(const std::string& contName) const=0;

  /**
   * @brief Search for sound content state with a name.
   * @param stateName Content state name
   * @return Sound content state
   *
   * If the content state name does not exist, returns nullptr.
   */
  virtual const RBASoundContentState* findSoundContentState(const std::string& stateName) const=0;

  /**
   * @brief Search for scene with a name.
   * @param sceneName Scene name
   * @return Scene
   *
   * If the scene name does not exist, returns nullptr.
   */
  virtual const RBAScene* findScene(const std::string& sceneName) const=0;

  /**
   * @brief Search for display with a name.
   * @param displayName Display name.
   * @return Display
   *
   * If the display name does not exist, returns nullptr.
   */
  virtual const RBADisplay* findDisplay(const std::string& displayName) const=0;

  /**
   * @brief Returns all the areas.
   * @return List of areas
   */
  virtual const std::list<const RBAArea*>& getAreas() const=0;

  /**
   * @brief Returns all the view contents.
   * @return List of contents
   */
  virtual const std::list<const RBAViewContent*>& getViewContents() const=0;

  /**
   * @brief Returns all the view content states.
   * @return List of view content states
   */
  virtual const std::list<const RBAViewContentState*>& getViewContentStates() const=0;

  /**
   * @brief Returns all the sizes.
   * @return List of sizes
   */
  virtual const std::list<const RBASize*>& getSizes() const=0;

  /**
   * @brief Returns all the zones.
   * @return List of zones
   */
  virtual const std::list<const RBAZone*>& getZones() const=0;

  /**
   * @brief Returns all the sound contents.
   * @return List of sound contents
   */
  virtual const std::list<const RBASoundContent*>& getSoundContents() const=0;

  /**
   * @brief Returns all the sound content states.
   * @return List of sound content states
   */
  virtual const std::list<const RBASoundContentState*>& getSoundContentStates() const=0;

  /**
   * @brief Returns all the scenes.
   * @return List of scenes
   */
  virtual const std::list<const RBAScene*>& getScenes() const=0;

  /**
   * @brief Returns all the displays.
   * @return List of displays
   */
  virtual const std::list<const RBADisplay*>& getDisplays() const=0;

  // internal {
  /**
   * @brief Returns all the position containers.
   * @return List of sets of position containers
   */
  virtual const std::list<const RBAPositionContainer*>& getPositionContainers() const=0;
 // }

};

}

#endif