aboutsummaryrefslogtreecommitdiffstats
path: root/include/rba/RBAModel.hpp
blob: ad3f97b70e8ef59f4f1e8c8018158b8de533358d (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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
// Copyright (c) 2018 DENSO CORPORATION. All rights reserved.
/**
 * 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"
// internal {
#include "RBAAreaSet.hpp"
#include "RBAViewContentSet.hpp"
#include "RBAZoneSet.hpp"
#include "RBASoundContentSet.hpp"
#include "RBAConstraint.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 Search for Model element with a name.
   * @param elementName Model element name.
   * @return Model element
   *
   * If the Model element name does not exist, returns nullptr.
   */
  virtual const RBAModelElement* findModelElement(const std::string& elementName) const=0;

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

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

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

  /**
   * @brief Returns all the constraints.
   * @return List of constraints
   */
  virtual std::list<RBAConstraint*>& getConstraints()=0;

 // }

};

}

#endif