From 795b825dc1afcbe571ae5b1b6e29ed17eed144e6 Mon Sep 17 00:00:00 2001 From: Anusha Gugale Date: Wed, 20 Jan 2021 09:03:26 +0530 Subject: remove src/include dir It is duplication of include dir. Signed-off-by: Anusha Gugale Change-Id: I761e0245b69b8bdba1755010e69a3257d1d03758 --- src/include/rba/RBAArbitrationPolicy.hpp | 63 --- src/include/rba/RBAArbitrator.hpp | 615 ---------------------- src/include/rba/RBAArea.hpp | 107 ---- src/include/rba/RBABasePoint.hpp | 90 ---- src/include/rba/RBAContentLoserType.hpp | 51 -- src/include/rba/RBADisplay.hpp | 71 --- src/include/rba/RBAJsonParser.hpp | 100 ---- src/include/rba/RBAModel.hpp | 256 --------- src/include/rba/RBAPositionContainer.hpp | 87 --- src/include/rba/RBAResult.hpp | 878 ------------------------------- src/include/rba/RBAResultStatusType.hpp | 57 -- src/include/rba/RBAScene.hpp | 89 ---- src/include/rba/RBASize.hpp | 89 ---- src/include/rba/RBASoundContent.hpp | 98 ---- src/include/rba/RBASoundContentState.hpp | 134 ----- src/include/rba/RBAViewAction.hpp | 162 ------ src/include/rba/RBAViewActionType.hpp | 56 -- src/include/rba/RBAViewContent.hpp | 104 ---- src/include/rba/RBAViewContentState.hpp | 134 ----- src/include/rba/RBAZone.hpp | 87 --- 20 files changed, 3328 deletions(-) delete mode 100644 src/include/rba/RBAArbitrationPolicy.hpp delete mode 100644 src/include/rba/RBAArbitrator.hpp delete mode 100644 src/include/rba/RBAArea.hpp delete mode 100644 src/include/rba/RBABasePoint.hpp delete mode 100644 src/include/rba/RBAContentLoserType.hpp delete mode 100644 src/include/rba/RBADisplay.hpp delete mode 100644 src/include/rba/RBAJsonParser.hpp delete mode 100644 src/include/rba/RBAModel.hpp delete mode 100644 src/include/rba/RBAPositionContainer.hpp delete mode 100644 src/include/rba/RBAResult.hpp delete mode 100644 src/include/rba/RBAResultStatusType.hpp delete mode 100644 src/include/rba/RBAScene.hpp delete mode 100644 src/include/rba/RBASize.hpp delete mode 100644 src/include/rba/RBASoundContent.hpp delete mode 100644 src/include/rba/RBASoundContentState.hpp delete mode 100644 src/include/rba/RBAViewAction.hpp delete mode 100644 src/include/rba/RBAViewActionType.hpp delete mode 100644 src/include/rba/RBAViewContent.hpp delete mode 100644 src/include/rba/RBAViewContentState.hpp delete mode 100644 src/include/rba/RBAZone.hpp (limited to 'src') diff --git a/src/include/rba/RBAArbitrationPolicy.hpp b/src/include/rba/RBAArbitrationPolicy.hpp deleted file mode 100644 index fdd0f9b..0000000 --- a/src/include/rba/RBAArbitrationPolicy.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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. - */ - -/** - * Arbitration policy class - */ - -#ifndef RBAARBITRATIONPOLICY_HPP -#define RBAARBITRATIONPOLICY_HPP - -namespace rba -{ - -/** - * @enum RBAArbitrationPolicy - * Type of arbitration policy. - */ -enum class RBAArbitrationPolicy : std::uint8_t -{ - /** - * @brief Same PRIORITY_LAST_COME_FIRST. - */ - DEFAULT, - /** - * @brief First Come First Arbitration. - * @details give priority to first come request. - */ - FIRST_COME_FIRST, - /** - * @brief Last Come First Arbitration. - * @details give priority to last come request. - */ - LAST_COME_FIRST, - /** - * @brief Priority and First Come First Arbitration. - * @details Follow the Priority of Contents. - * If same priority then give priority to first come request. - */ - PRIORITY_FIRST_COME_FIRST, - /** - * @brief Priority and Last Come First Arbitration. - * @details Follow the Priority of Contents. - * If same priority then give priority to last come request. - */ - PRIORITY_LAST_COME_FIRST -}; - -} - -#endif diff --git a/src/include/rba/RBAArbitrator.hpp b/src/include/rba/RBAArbitrator.hpp deleted file mode 100644 index 017db1a..0000000 --- a/src/include/rba/RBAArbitrator.hpp +++ /dev/null @@ -1,615 +0,0 @@ -/** - * 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. - */ - -/** - * Arbitrator Logic class - */ - -#ifndef RBAARBITORATOR_HPP -#define RBAARBITORATOR_HPP - -#ifdef _MSC_VER -#ifdef _WINDLL -#define DLL_EXPORT __declspec(dllexport) -#else -#define DLL_EXPORT __declspec(dllimport) -#endif -#else -#define DLL_EXPORT -#endif - -#include -#include -#include -#include -#include -#include "RBAModel.hpp" -#include "RBAResult.hpp" -#include "RBARequestQueMember.hpp" -#include "RBAResultSet.hpp" -#include "RBAResultImpl.hpp" - -/** - * @namespace rba - * @brief The namespace defined by Rule Based Arbitration Framework. - */ -namespace rba -{ - -// internal { -#ifdef RBA_USE_LOG -class RBALogManager; -#endif - -class RBARuleObject; -class RBAExpression; -class RBAModelImpl; -class RBAAffectInfo; -class RBARollbacker; -class RBAWindowRouter; -class RBAConstraintImpl; -// } - -/** - * @class RBAArbitrator - * An object that performs arbitration processing based on rules - * generated from a model.
- * Set the model generated using rba::RBAJsonParser in the constructor. - */ -class DLL_EXPORT RBAArbitrator -{ -public: - /** - * @brief Arbitrator logic constractor. - * @param newModel Processing model. - * The model is generated by rba::RBAJsonParser. - */ - RBAArbitrator()=default; - RBAArbitrator(RBAModel* newModel); - - /** - * @brief Arbitrator logic destractor. - */ - RBAArbitrator(const RBAArbitrator&)=delete; - RBAArbitrator(const RBAArbitrator&&)=delete; - RBAArbitrator& operator=(const RBAArbitrator&)=delete; - RBAArbitrator& operator=(const RBAArbitrator&&)=delete; - virtual ~RBAArbitrator() noexcept; - -public: - - /** - * @brief Sets the model for arbitration - * The model is generated by rba::RBAJsonParser. - * @param newModel The model for arbitration - * @details Replace the model with newModel. An arbitrator has only one model at all times. - * Model can be generated by using rba::RBAJsonParser. - * nullptr can not be set. - */ - void setModel(RBAModel* newModel); - - /** - * @brief Returns the model for arbitration - * @return model The model for arbitration - * @details Because the arbitrator always has a model, this API never returns nullptr. - */ - const RBAModel* getModel() const; - - /** - * @brief Set initial requirements of contents and scenes - * @param contexts Context list of contents and scenes requests. - * - * Following is the structure of context name.\n - * ** / ** \n\n - * Example of context name: \n - * TEL/Calling\n - * TPMS/NORMAL\n - * AutoDriveScene\n\n - * You can omit "/ " if content has only one state. - * @details After arbitrator creation or calling clearArbitration(), - * you can set initial state of contents and scenes for first arbitration. - * This API does not execute arbitration. - * The information of arbitration result will be empty. - * Don't call this API after starting arbitration until calling clearArbitration(). - * @details - * **Example** - * - * ``` - * RBAJsonParser parser; - * rba::RBAModel* model = parser.parse(JSONFILE_PATH); - * rba::RBAArbitrator* arb = new rba::RBAArbitrator(model); - * - * std::list defaultContents = { - * "CONTENT_A/NORMAL", - * "CONTENT_B/NORMAL", - * "CONTENT_C/NORMAL", - * "CONTENT_D/NORMAL", - * }; - * arb->initialize(defaultContents); - * std::unique_ptr result = arb->execute(); - * ``` - */ - void initialize(std::list& contexts); - - /** - * @brief Executes arbitration with one requirement\n - * @param contextName - * Context string of arbitration request.\n - * Display request or sound request : "/"\n - * If the content has only one state, the can be omitted.\n - * \n - * Scene request : "" - * @param require - * true : request displaying / outputting content or scene on (default)\n - * false : withdraw a request or scene off. - * - * @return The result of arbitration. - * @details - * Execute Arbitration with one requirement of a content or scene without properties. \n - * The arbitration result as the return value will be generated at every arbitration and - * will not be changed by another arbitration. - * \n - * Context indicates a content state or a scene. - * If the content or scene is not defined in the model, the arbitration will not executed - * and the state of the arbitration result will be UNKNWON_CONTENT_STATE. - * In this case, other property values are undefined.\n - * If the context is empty, this API just execute arbitration. - * \n - * **Exapmle** - * - * ``` - * RBAJsonParser parser; - * rba::RBAModel* model = parser.parse(JSONFILE_PATH); - * rba::RBAArbitrator* arb = new rba::RBAArbitrator(model); - * std::unique_ptr result = arb->execute("CONTENT_A/NORMAL", true); - * - * if(result->getStatusType() != rba::RBAResultStatusType::SUCCESS) { - * std::cout << "ERROR: Unknown context" << std::endl; - * } - * ``` - * - */ - std::unique_ptr execute(const std::string& contextName="", - bool require=true); - - /** - * @brief Executes arbitration with multiple requirements\n - * @param contexts List of contexts. - * @param require - * true : request displaying / outputting content or scene on (default)\n - * false : withdraw a request or scene off. - * @return The result of arbitration. - * @details - * \n - * Execute Arbitration with multiple requirements of contents or scenes. \n - * Contents and Scenes can be mixed in the list. - * Display / Outputting request and withdraw request, scene on and scene off request can not be mixed. - * The arbitration result as the return value will be generated at every arbitration and - * will not be changed by another arbitration. - * \n - * Context indicates a content state or a scene. - * If the content or scene is not defined in the model, the arbitration will not executed - * and the state of the arbitration result will be UNKNWON_CONTENT_STATE.\n - * In this case, other property values are undefined.\n - * If the context is empty, this API just execute arbitration. - * \n - * Request order is the with the list. Beginning of the list will be treated as the first coming request. - * \n - * **Exapmle** - * - * ``` - * RBAJsonParser parser; - * rba::RBAModel* model = parser.parse(JSONFILE_PATH); - * rba::RBAArbitrator* arb = new rba::RBAArbitrator(model); - * std::list contents = { - * "CONTENT_A/NORMAL", - * "CONTENT_B/NORMAL", - * "CONTENT_C/NORMAL", - * "CONTENT_D/NORMAL", - * }; - * std::unique_ptr result = arb->execute(contents, true); - * - * if(result->getStatusType() != rba::RBAResultStatusType::SUCCESS) { - * std::cout << "ERROR: Unknown context" << std::endl; - * } - * ``` - * - */ - std::unique_ptr execute(std::list& contexts, - bool require=true); - - /** - * @brief Executes arbitration with a requirement of scene and scene properties. - * @param sceneName The Scene name of arbitration reauest.\n - * @param properties The list of pairs of property name and value. - * @return The result of arbitration. - * @details - * \n - * Sets the scene indicated by sceneName to the property specified - * by properties, and execute arbitration processing.\n - * If sceneName is empty, this API just execute arbitration. - * If the required scene is not defined in the model, the arbitration will not executed - * and the state of the arbitration result will be UNKNWON_CONTENT_STATE.\n - * Even If there is a property not defined in the model, the arbitration will be executed. - * \n - * @note - * You cannot set scene off and property at the same time, by this API.\n - * Use setScene() to set scene off and properties, - * and then call execute(const std::string&,bool) without specifying arguments.\n - * Or Use setScene() to set properties, - * and then call execute(scene name,false).\n - * \n - * @details - * **Example** - * - * ``` - * RBAJsonParser parser; - * rba::RBAModel* model = parser.parse(JSONFILE_PATH); - * rba::RBAArbitrator* arb = new rba::RBAArbitrator(model); - * std::list> properties; - * properties.push_back(std::make_pair("Prop1", 10)); - * properties.push_back(std::make_pair("Prop2", 20)); - * std::unique_ptr result = arb->execute("Scene1", properties); - * - * if(result->getStatusType() != rba::RBAResultStatusType::SUCCESS) { - * std::cout << "ERROR: Unknown context" << std::endl; - * } - * ``` - */ - std::unique_ptr execute(const std::string& sceneName, - std::list>& properties); - - /** - * @brief Replaces the result of arbitration - * @param allocatableName area or zone name - * @param contextName Context string of arbitration request. - * @return The result of arbitration. - * @details - * \n - * Replace allocated a content state to area or zone of the last arbitration result.\n - * If the allocatableName or contextName is undefined, return the errror - * code from the method getStatusType() of result.\n - * If the contextName is non-active, activate the content request. - * This API execute the "Request handling on lost" process and the - * "Execution expression" process, and doesn't execute the check of - * constraint expression process. - * Therefore, this API can lead the result that does not satisfy the constraints\n - * If the specified area or zone by allocatableName is hidden, mute or - * attenuated, these statuses will be kept. - * @deprecated Because there is a possibility that the result does not satisfy - * the constraints, please use execute() - * instead of this API.\n - * \n - * @details - * **Example** - * - * ``` - * RBAJsonParser parser; - * rba::RBAModel* model = parser.parse(JSONFILE_PATH); - * rba::RBAArbitrator* arb = new rba::RBAArbitrator(model); - * std::unique_ptr result = arb->execute("CONTENT_A/NORMAL", true); - * std::unique_ptr result_replaced = arb->setResultContentState("AREA_A", "CONTENT_B/NORMAL"); - * - * if(result_replaced->getStatusType() != rba::RBAResultStatusType::SUCCESS) { - * std::cout << "ERROR" << std::endl; - * } - * ``` - */ - std::unique_ptr - setResultContentState(const std::string& allocatableName, - const std::string& contextName); - - /** - * @brief Cancel last arbitration - * @return The result of arbitration. - * @details - * \n - * Cancel last arbitration and restore internal state immediately.\n - * This API returns the restored result but the ViewActions will be empty.\n - * Do not execute this function more than once continuously. In that case, - * an error occurs.\n - * Even when executed without performing arbitration processing, - * an error occurs.\n - * In case of error, the status of the arbitration result is set to - * CANCEL_ERROR.\n - * \n - * @details - * **Example** - * - * ``` - * RBAJsonParser parser; - * rba::RBAModel* model = parser.parse(JSONFILE_PATH); - * rba::RBAArbitrator* arb = new rba::RBAArbitrator(model); - * std::unique_ptr result = arb->execute("CONTENT_A/NORMAL", true); - * std::unique_ptr result_back = arb->cancelArbitration() - * - * if(result_replaced->getStatusType() != rba::RBAResultStatusType::SUCCESS) { - * std::cout << "ERROR" << std::endl; - * } - * ``` - */ - std::unique_ptr cancelArbitration(); - - /** - * @brief Clear internal states of arbitration. - * @details - * \n - * Initialize internal states of arbitration (ex. Previous arbitration - * result, request of content states, etc...) and set to the initial state.\n - * \n - * @note - * This API is intended for setting up initial state of unit tests.\n - * \n - * @details - * **Example** - * - * ``` - * std::unique_ptr result1 = arb->execute("CONTENT_A/NORMAL", true); - * std::unique_ptr result2 = arb->execute("CONTENT_B/NORMAL", true); - * // reset display requests - * arb->clearArbitration(); - * std::unique_ptr result2 = arb->execute("CONTENT_C/NORMAL", true); - * std::unique_ptr result3 = arb->execute("CONTENT_D/NORMAL", true); - - * - * ``` - */ - void clearArbitration(); - - /** - * @brief Sets scene ON/OFF requests and properties. - * @param sceneName The Scene name of arbitration reauest.\n - * @param require true : Valid request.\n - * false : Invalid request. - * @param properties The pair of property name and value.\n - * @return true: Success\n - * @return false: Unknown scene\n - * @details - * \n - * Sets the scene indicated by sceneName to the property specified - * by properties, and without execute arbitration processing.\n - * Returns true if the scene set succeeded. If an unknown scene name is - * specified, false is returned.\n - * \n - * @note - * This API is intended for setting up initial state of unit tests\n - * or setting global scene and scene properties.\n - * \n - * @details - * **Example** - * - * ``` - * std::list> props; - * props.push_back(std::make_pair("PropertyA", 10); - * props.push_back(std::make_pair("PropertyB", -3); - * res = arb->setScene("SCENE_A", true, props); - * if(res == false) { - * // Unknwon scene - * } - * ``` - */ - bool setScene(const std::string& sceneName, bool require, - std::list>& properties); - - /** - * @brief Sets content requests or scene ON/OFF request. - * @param contextName Context string of arbitration request.\n - * @param require - * true : request displaying / outputting content or scene on (default)\n - * false : withdraw a request or scene off. - * @return true: Success\n - * @return false: Unknown context\n - * @details - * \n - * Sets a display request for the context without arbitration.\n - * Returns true if the request setting is succeeded. If an unknown context - * name is specified, false is returned.\n - * \n - * @note - * This API is intended for setting up initial state of unit tests.\n - * While initialize() has only the function to turn on the request, - * this API can turn off the request. It is used for switch of each - * requests when initialization setting of unit test.\n - * \n - * @details - * **Example** - * - * ``` - * res = arb->setContentState("ContentA/NORMAL", true); - * if(res == false) { - * // Unknwon context - * } - * ``` - */ - bool setContentState(const std::string& contextName, bool require); - - /** - * @brief Allocates content state to area or zone. - * @param allocatableName Name of area or zone - * @param contextName Context string of content state.\n - * contextName : "/"\n - * If the content has only one state, the can be omitted.\n - * \n - * @return true: Success\n - * @return false: Unknown area, zone or context\n - * @details - * \n - * Allocates the content state to the area or zone. Arbitration and - * post arbitration will not be executed.\n - * The display / outputting request of the specified content state will be active. - * The statuses of hidden, mute and attenuated will not be changed.\n - * Returns true if the request setting is succeeded. If an unknown context - * name is specified, false is returned.\n - * - * @note - * This API is intended for setting up initial state of unit tests.\n - * In setResultContentState(), in addition to content state assignment, - * evaluation of the action determination process at the time of arbitration - * losing and control execution expression is performed, whereas in this - * API only content state assignment is performed.\n - * \n - * @deprecated - * Since there is a possibility of contradiction with the - * constraint, it is recommended not to use it except unit test. - * \n - * @details - * **Example** - * - * ``` - * res = arb->setAllocatableResult("AreaA", "ContentA/NORMAL"); - * if(res == false) { - * // Unknwon area, zone or context - * } - * ``` - */ - bool setAllocatableResult(const std::string& allocatableName, - const std::string& contextName); - // internal { -#ifdef RBA_USE_LOG - RBAArbitrator(RBAModel* newModel, RBALogManager* logManager); -#endif - bool evaluate(RBAExpression* expression); - const RBARuleObject* evaluateObject(RBAExpression* expression); - int32_t evaluateValue(RBAExpression* expression); - - // } - -private: -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable:4251) -#endif -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -private: - bool isValidContext(const std::string& context); - bool isValidContext(std::list& contexts); - bool setRequestData( - const std::string& context, bool require, - std::list>* const properties = nullptr, - std::uint32_t syncIndex = 0xFFFFU); - void setRequestData(const RBAContentState* state, bool require); - void setRequestData(const RBAContent* const content, bool require); - void setActive(const RBASceneImpl* const scene, const bool require); - void setSceneProperty(const RBAAbstractProperty* const prop, const std::int32_t value); - void setRequestData(std::list& contexts, const bool require); - -#ifdef RBA_USE_LOG - void checkAllConstraints(); -#endif - void updateResult(); - void checkCancelContent() const; - void createResultData(); - -public: - bool satisfiesConstraints() const; - -private: - std::unique_ptr arbitrateMain(); - void arbitrate(std::list& allocatables); - void arbitrateAllocatable(RBAAllocatable* allocatable, - std::set& revisited, - const std::int32_t nest, RBAAffectInfo* const affectInfo, - RBARollbacker* const parentRollbacker); - - bool sortContentStates(const RBAAllocatable* const allocatable, - std::list& states) const; - void postArbitrate(); - void changeContentStateCancelWithPolicy(const RBAContentState* const state); - void collectRevisitAllocatable( - std::list* const totalRevisitAllocatables, - RBAAllocatable*& allocatable, - std::list& falseConstraints, - std::set& revisited); - - static std::int32_t getViewActionPriority(const RBAViewActionType viewActionType); - static bool compareViewAction(const std::unique_ptr& lhs, - const std::unique_ptr& rhs); - -public: - RBAResultImpl* getResult() const; /// Used by rba_tool - bool isCancel(const RBAContentState* const state) const; - -private: - void differenceArbitrate(); - bool checkConstraints(std::list& constraints, - std::list& falseConstraints, - const RBAAllocatable* const allocatable); - bool checkConstraintAndReArbitrate(RBAAllocatable* allocatable, - std::set& revisited, - const std::int32_t nest, - RBAAffectInfo* const affectInfo, - RBARollbacker* const parentRollbacker, - std::list& constraints, - bool * const isSkipped, const bool isFinal); - void setCancel(const RBAContentState* const state, const bool checked); - void getSortedContentStates( - const RBAAllocatable* const allocatable, - std::list& contentStates) const; - -#ifdef RBA_USE_LOG - void logRequestArbitration(); - void logPreResultArbitration(); - void logRequestForCoverage(); - void logResultArbitration(); - void logResultForCoverage(); - void setLogToResult(); -#endif - -public: - std::set& getCancelChecked(); - std::unique_ptr& getResultRef() const; - void setResult(std::unique_ptr result); - std::unique_ptr& getNextResultSet(); - void setNextResultSet(std::unique_ptr nextResultSet); - std::unique_ptr& getBackupResultSet(); - void setBackupResultSet(std::unique_ptr backupResultSet); - std::unique_ptr& getReservedResultSet(); - void setReservedResultSet(std::unique_ptr reservedResultSet); - std::recursive_mutex& getMutex() const; -#ifdef RBA_USE_LOG - void setSimulationMode(bool simulationMode); -#endif - std::deque>& getRequestQue(); - -private: - RBAModelImpl* model_ {nullptr}; - std::set cancelChecked_; - - mutable std::unique_ptr result_; - // ResultSet to use as CurrentResultSet in next arbitration - std::unique_ptr nextResultSet_; - // ResultSet to use as PreviousResultSet in next arbitration - std::unique_ptr backupResultSet_; - // ResultSet to be used as CurrentResultSet in cancelArbitration() - std::unique_ptr reservedResultSet_; - // ResultSet to use as CurrentResultSet in satisfiesConstraints() - std::unique_ptr resultSetForSatisfiesConstraints_; - mutable std::recursive_mutex mutex_; -#ifdef RBA_USE_LOG - bool simulationMode_ = false; -#endif - std::deque> requestQue_; - -public: - void setModel(RBAModelImpl* const newModel); -}; - -} - -#endif diff --git a/src/include/rba/RBAArea.hpp b/src/include/rba/RBAArea.hpp deleted file mode 100644 index 804a7e9..0000000 --- a/src/include/rba/RBAArea.hpp +++ /dev/null @@ -1,107 +0,0 @@ -/** - * 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. - */ - -/** - * Area class - */ - -#ifndef RBAAREA_HPP -#define RBAAREA_HPP - -#include -#include -#include "RBAArbitrationPolicy.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 RBASize; -class RBAViewContent; - -/** - * @class RBAArea - * Defines a Frame for displaying the view content.
- * At run time, at most one view content is allocated to one area. - */ -class DLL_EXPORT RBAArea -{ -protected: - RBAArea()=default; - RBAArea(const RBAArea&)=delete; - RBAArea(RBAArea&&)=delete; - RBAArea& operator=(const RBAArea&)=delete; - RBAArea& operator=(RBAArea&&)=delete; - ~RBAArea()=default; - -public: - /** - * @brief Returns the name of the area. - * @return Area name - */ - virtual std::string getName() const=0; - - /** - * @brief Returns the x-axis value of the base point of the area - * @return X-axis Value of the base point - */ - virtual std::int32_t getX() const=0; - - /** - * @brief Returns the y-axis value of the base point of the area - * @return Y-axis Value of the base point - */ - virtual std::int32_t getY() const=0; - - /** - * @brief Returns the z-order value. - * An area with a large z-order value is displayed on the front of an area with small z-order value. - * @return Z-order value - */ - virtual std::int32_t getZorder() const=0; - - /** - * @brief Returns the list of content which can be displayed on this area. - * @return list of content - */ - virtual const std::list& getContents() const=0; - - /** - * @brief Returns the list of size defined to this area . - * Since multiple size can be defined, returns a list of size. - * @return list of size - */ - virtual const std::list& getSizes() const=0; - - /** - * @brief Returns the arbitration policy value defined to this area. - * @return arbitration policy value - */ - virtual RBAArbitrationPolicy getArbitrationPolicy() const=0; -}; - -} - -#endif diff --git a/src/include/rba/RBABasePoint.hpp b/src/include/rba/RBABasePoint.hpp deleted file mode 100644 index de5eb9a..0000000 --- a/src/include/rba/RBABasePoint.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/** - * 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. - */ - -/** - * Base point class - */ - -#ifndef RBABASEPOINT_HPP -#define RBABASEPOINT_HPP - -namespace rba -{ - -/** - * @enum RBABasePoint - * Base point for object having size. For example Area. - */ -enum class RBABasePoint : std::uint8_t -{ - /** - * @brief Defines Left-Top coordinate as the base point of (x, y) - * The rectangle is represented by (x, y)-(x+width, y+height) - */ - LEFT_TOP, - - /** - * @brief Defines Left-Middle coordinate as the base point of (x, y) - * The rectangle is represented by (x, y-height/2)-(x+width, y+height/2) - */ - LEFT_MIDDLE, - - /** - * @brief Defines Left-Bottom coordinate as the base point of (x, y) - * The rectangle is represented by (x, y-height)-(x+width, y) - */ - LEFT_BOTTOM, - - /** - * @brief Defines Right-Top coordinate as the base point of (x, y) - * The rectangle is represented by (x-width, y)-(x, y+height) - */ - RIGHT_TOP, - - /** - * @brief Defines Right-Middle coordinate as the base point of (x, y) - * The rectangle is represented by (x-width, y-height/2)-(x, y+height/2) - */ - RIGHT_MIDDLE, - - /** - * @brief Defines Right-Bottom coordinate as the base point of (x, y) - * The rectangle is represented by (x-width, y-height)-(x, y) - */ - RIGHT_BOTTOM, - - /** - * @brief Defines Center-Top coordinate as the base point of (x, y) - * The rectangle is represented by (x-width/2, y)-(x+width/2, y+height) - */ - CENTER_TOP, - - /** - * @brief Defines Center-Middle coordinate as the base point of (x, y) - * The rectangle is represented by (x-width/2, y-height/2)-(x+width/2, y+height/2) - */ - CENTER_MIDDLE, - - /** - * @brief Defines Center-Bottom coordinate as the base point of (x, y) - * The rectangle is represented by (x-width/2, y-height)-(x+width/2, y) - */ - CENTER_BOTTOM -}; - -} - -#endif diff --git a/src/include/rba/RBAContentLoserType.hpp b/src/include/rba/RBAContentLoserType.hpp deleted file mode 100644 index b2c35e4..0000000 --- a/src/include/rba/RBAContentLoserType.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/** - * 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. - */ - -/** - * Good loser type class - */ - -#ifndef RBACONTENTLOSERTYPE_HPP -#define RBACONTENTLOSERTYPE_HPP - -namespace rba -{ - -/** - * @enum RBAContentLoserType - * Type of behavior when content loses the arbitration - */ -enum class RBAContentLoserType : std::uint8_t -{ - /** - * @brief Always cancels its request when losing arbitration. - */ - GOOD_LOSER=0, - - /** - * @brief Cancels its request only if it lost the arbitration in the displaying state. - */ - DO_NOT_GIVEUP_UNTIL_WIN, - - /** - * @brief Never cancels its request. - */ - NEVER_GIVEUP -}; - -} - -#endif diff --git a/src/include/rba/RBADisplay.hpp b/src/include/rba/RBADisplay.hpp deleted file mode 100644 index 85c2086..0000000 --- a/src/include/rba/RBADisplay.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 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. - */ - -/** - * Display class - */ - -#ifndef RBADISPLAY_HPP -#define RBADISPLAY_HPP - -#include -#include - -namespace rba { - -class RBAArea; -class RBASize; - -/** - * @class RBADisplay - * Defines a screen layout of the display.
- * You can define multiple displays for Multi-Display products. - * Display defines a set of areas which are laid out on it. - */ -class RBADisplay -{ -protected: - RBADisplay()=default; - RBADisplay(const RBADisplay&)=delete; - RBADisplay(RBADisplay&&)=delete; - RBADisplay& operator=(const RBADisplay&)=delete; - RBADisplay& operator=(RBADisplay&&)=delete; - ~RBADisplay()=default; - -public: - /** - * @brief Returns the name of display - * @return Display name - */ - virtual std::string getName() const=0; - - /** - * @brief Returns the size of display - * @return Size - */ - virtual const RBASize* getSize() const=0; - - /** - * @brief Returns areas which are allocated to the display - * @return List of area - */ - virtual const std::list& getAreas() const=0; - -}; - -} - -#endif diff --git a/src/include/rba/RBAJsonParser.hpp b/src/include/rba/RBAJsonParser.hpp deleted file mode 100644 index 2f9404a..0000000 --- a/src/include/rba/RBAJsonParser.hpp +++ /dev/null @@ -1,100 +0,0 @@ -/** - * 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. - */ - -/** - * JSON parser class - */ - -#ifndef RBAJSONPARSER_HPP -#define RBAJSONPARSER_HPP - -#ifdef _MSC_VER -#ifdef _WINDLL -#define DLL_EXPORT __declspec(dllexport) -#else -#define DLL_EXPORT __declspec(dllimport) -#endif -#else -#define DLL_EXPORT -#endif - -#include -#include "RBAModel.hpp" - -namespace rba -{ - -class RBAModel; -// internal { -class RBAExpression; -class RBAModelFactory; -// } - -/** - * @class RBAJsonParser - * Provides the facility that loads a model file in JSON format and generate a Model object. - */ -class DLL_EXPORT RBAJsonParser -{ -public: - RBAJsonParser(); - RBAJsonParser(const RBAJsonParser&)=delete; - RBAJsonParser(const RBAJsonParser&&)=delete; - RBAJsonParser& operator=(const RBAJsonParser&)=delete; - RBAJsonParser& operator=(const RBAJsonParser&&)=delete; - virtual ~RBAJsonParser() noexcept; - -public: - /** - * @brief Loads a JSON file and generates a model object. - * @param filename Path of JSON file - * @return Model - * If the file is not found, returns nullptr. - * - * **Example** - * - * ``` - * rba::RBAJsonParser parser; - * rba::RBAModel* model = parser.parse("RBAModel.json"); - * if(model == nullptr) { - * std::cout << "ERRROR: Could not read JSON file" << std::endl; - * return 1; - * } - * rba::RBAArbitrator* arb = new rba::RBAArbitrator(model); - * ``` - */ - RBAModel* parse(const std::string& filename); - - // internal { - RBAJsonParser(RBAModelFactory* factory); - // } - -private: - class Impl; -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable:4251) -#endif - std::unique_ptr impl_; -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -}; - -} - -#endif diff --git a/src/include/rba/RBAModel.hpp b/src/include/rba/RBAModel.hpp deleted file mode 100644 index 276201f..0000000 --- a/src/include/rba/RBAModel.hpp +++ /dev/null @@ -1,256 +0,0 @@ -/** - * 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 -#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.
- * 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: - * / - * In the case of the size linked to the content: - * / - * \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& getAreas() const=0; - - /** - * @brief Returns all the view contents. - * @return List of contents - */ - virtual const std::list& getViewContents() const=0; - - /** - * @brief Returns all the view content states. - * @return List of view content states - */ - virtual const std::list& getViewContentStates() const=0; - - /** - * @brief Returns all the sizes. - * @return List of sizes - */ - virtual const std::list& getSizes() const=0; - - /** - * @brief Returns all the zones. - * @return List of zones - */ - virtual const std::list& getZones() const=0; - - /** - * @brief Returns all the sound contents. - * @return List of sound contents - */ - virtual const std::list& getSoundContents() const=0; - - /** - * @brief Returns all the sound content states. - * @return List of sound content states - */ - virtual const std::list& getSoundContentStates() const=0; - - /** - * @brief Returns all the scenes. - * @return List of scenes - */ - virtual const std::list& getScenes() const=0; - - /** - * @brief Returns all the displays. - * @return List of displays - */ - virtual const std::list& 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& getAreaSets() const=0; - - /** - * @brief Returns all the sets of view contents. - * @return List of sets of view contents - */ - virtual const std::list& getViewContentSets() const=0; - - /** - * @brief Returns all the position containers. - * @return List of sets of position containers - */ - virtual const std::list& getPositionContainers() const=0; - - /** - * @brief Returns all the constraints. - * @return List of constraints - */ - virtual std::list& getConstraints()=0; - - // } - -}; - -} - -#endif diff --git a/src/include/rba/RBAPositionContainer.hpp b/src/include/rba/RBAPositionContainer.hpp deleted file mode 100644 index 7ab09c6..0000000 --- a/src/include/rba/RBAPositionContainer.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 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. - */ - -/** - * Position container class - */ - -#ifndef RBAPOSITIONCONTAINER_HPP -#define RBAPOSITIONCONTAINER_HPP - -#include -#include "RBABasePoint.hpp" - -namespace rba -{ - -class RBAArea; - -class RBAPositionContainer -{ -protected: - RBAPositionContainer()=default; - RBAPositionContainer(const RBAPositionContainer&)=delete; - RBAPositionContainer(RBAPositionContainer&&)=delete; - RBAPositionContainer& operator=(const RBAPositionContainer&)=delete; - RBAPositionContainer& operator=(RBAPositionContainer&&)=delete; - ~RBAPositionContainer()=default; - -public: - /** - * @brief Get X coordinate - * @return X coordinate - */ - virtual std::int32_t getX() const=0; - - /** - * @brief Get Y coordinate - * @return Y coordinate - */ - virtual std::int32_t getY() const=0; - - /** - * @brief Get base point - * @return Base point - */ - virtual RBABasePoint getBasePoint() const=0; - - /** - * @brief Get assigned area - * @return assigned area - */ - virtual const RBAArea* getArea() const=0; - -public: - /** - * @brief default X coordinate - */ - const static std::int32_t X_EDEFAULT=0; - - /** - * @brief default Y coordinate - */ - const static std::int32_t Y_EDEFAULT=0; - - /** - * @brief default base point - */ - const static RBABasePoint BASE_POINT_EDEFAULT=RBABasePoint::LEFT_TOP; - -}; - -} - -#endif diff --git a/src/include/rba/RBAResult.hpp b/src/include/rba/RBAResult.hpp deleted file mode 100644 index 53c2a35..0000000 --- a/src/include/rba/RBAResult.hpp +++ /dev/null @@ -1,878 +0,0 @@ -/** - * 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. - */ - -/** - * Arbitration result class - */ - -#ifndef RBARESULT_HPP -#define RBARESULT_HPP - -#ifdef _MSC_VER -#ifdef _WINDLL -#define DLL_EXPORT __declspec(dllexport) -#else -#define DLL_EXPORT __declspec(dllimport) -#endif -#else -#define DLL_EXPORT -#endif - -#include -#include -#include "RBAResultStatusType.hpp" -#include "RBAViewAction.hpp" -#include "RBAScene.hpp" - -namespace rba -{ - -class RBAArea; -class RBAViewContent; -class RBAViewContentState; -class RBAScene; -class RBASize; -class RBAZone; -class RBASoundContent; -class RBASoundContentState; -// internal { -class RBADisplay; -// } - -/** - * @class RBAResult - * Stores an arbitration result.
- * The Arbitrator allocates Contents to Areas. Related - * information of those can be acquired from RBAResult.\n - * The arbitration result indicates which content is allocated to each - * area / zone. - * Also, snapshot information and view action information (only display - * results) indicating the difference from the last arbitration are included. - */ -class DLL_EXPORT RBAResult -{ -public: - RBAResult()=default; - RBAResult(const RBAResult&)=delete; - RBAResult(RBAResult&&)=delete; - RBAResult& operator=(const RBAResult&)=delete; - RBAResult& operator=(RBAResult&&)=delete; - virtual ~RBAResult()=default; - -public: - - // [VisibleArea/SoundingZone] - - /** - * @brief Returns the displaying areas determined by the last arbitration. - * @return List of visible areas. - */ - virtual const std::list& getVisibleAreas() const=0; - - /** - * @brief Returns the outputting zones determined by the last arbitration. - * @return List of sounding zones. - */ - virtual const std::list& getSoundingZones() const=0; - - // [Visible/Sounding ContentStates] - - /** - * @brief Returns the view content states to be displayed determined by the last arbitration. - * @return List of visible view content states. - */ - virtual const std::list& getVisibleContentStates() const=0; - - /** - * @brief Returns the sound content states to be output determined by the last arbitration. - * @return List of sound content states to be output. - * @details The list contains sound contents to be attenuated. - */ - virtual const std::list& getSoundingContentStates() const=0; - - // [Active View/Sound ContentStates] - - /** - * @brief Returns the active view content states at the last arbitration - * result. - * @return List of active view content states. - * @details - * The active view content states are those that have been requested to - * display so far. They do not include the view content state whose request - * has been withdrawn or canceled. - */ - virtual const std::list& getActiveViewContentStates() const=0; - - /** - * @brief Returns the active sound content states at the last arbitration - * result. - * @return List of active sound content states. - * @details - * The active sound content states are those that have been requested to - * output so far. They do not include the sound content state whose request - * has been withdrawn or canceled. - */ - virtual const std::list& getActiveSoundContentStates() const=0; - - // [Active Scenes] - - /** - * @brief Returns the active scenes at the last arbitration. - * @return List of active scenes. - * @details - * The active scenes are those that have been requested for ON so far. - * They do not include scenes requested for OFF afterwards. - */ - virtual const std::list& getActiveScenes() const=0; - - // [InvisibleAreas/UnsoundingZone] - - /** - * @brief Returns the invisible areas determined by the last arbitration. - * @return List of invisible areas. - * @details - * Returns the areas which are not displayed out of all areas.\n - * The list contains areas to be hidden. - */ - virtual const std::list& getInvisibleAreas() const=0; - - /* - * @brief Returns the unsounding zones determined by the last arbitration. - * @return List of unsounding zones. - * @details - * Returns the zones which are not output out of all zones. - * The list contains zones to be muted. - */ - virtual const std::list& getUnsoundingZones() const=0; - - // [HiddenAreas/MuteZones] - - /** - * @brief Returns the area that is hidden state and content has been - * allocated.\n - * The hidden state is a state in which the area must be hidden by a - * constraint expression. - * @return List of areas. - * Returns the area which become to be invisible. - * The area invisible in the previous time is not included. - */ - virtual const std::list& getHiddenAreas() const=0; - - /** - * @brief Returns the zone that is muted state and content has been - * allocated.\n - * The muted state is a state in which the zone must be muted by a - * constraint expression. - * @return List of muted zones. - * - * Retuens the zones that is defeted and canceled sound contents. - */ - virtual const std::list& getMuteZones() const=0; - - // [get Attenuated] - - /** - * @brief Returns the attenuated zones determined by the last arbitration. - * @return List of attenuated zones. - */ - virtual const std::list& getAttenuatedZones() const=0; - - // [Canceled Contents] - - /** - * @brief Returns the canceled view contents determined by the last arbitration. - * @return List of canceled view contents. - * @details - * Reterns list of view contents which are canceled by Request handling on lost definition\n - * such as Loser Type and Post Constraints.\n - * The list does not contain contents which are withdrawn. - */ - virtual const std::list& getCanceledViewContents() const=0; - - /** - * @brief Returns the canceled sound contents determined by the last arbitration. - * @return List of canceled sound contents. - * @details - * Reterns list of sound contents which are canceled by Request handling on lost definition\n - * such as Loser Type and Post Constraints.\n - * The list does not contain contents which are withdrawn. - */ - virtual const std::list& getCanceledSoundContents() const=0; - - // [Standby Contents] - - /** - * @brief Returns the stand by view contents due to defeated at the last - * arbitration. - * @return List of stand by view contents. - * @details - * Returns list of view contents which are active but not allocated to any area. - * The list does not contains which are canceled contents or are allocated to hidden area. - */ - virtual const std::list& getStandbyViewContents() const=0; - - /** - * @brief Returns the stand by sound contents due to defeated at the last - * arbitration. - * @return List of stand by sound contents. - * @details - * Returns list of sound contents which are active but not allocated to any area. - * The list does not contains which are canceled contents or are allocated to muted area. - */ - virtual const std::list& getStandbySoundContents() const=0; - - // [ContentStates] - - /** - * @brief Returns the view content state assigned to the area of the last - * arbitration. - * @param area Area - * @return The view content state assign to the area. - * @details - * If no view content state is allocated to the area, nullptr is returnd.\n - * If area is not defined in the Model or nullptr, nullptr is returnd. - */ - virtual const RBAViewContentState* getContentState(const RBAArea* area) const=0; - - /** - * @brief Returns the sound content state assigned to the zone of the last - * arbitration. - * @param zone Zone - * @return The sound content state assign to the zone. - * @details - * If no sound content state is allocated to the zone, nullptr is returned.\n - * If zone is not defined in the Model or nullptr, nullptr is returnd. - */ - virtual const RBASoundContentState* getContentState(const RBAZone* zone) const=0; - - // [Areas/Zones by ConentState] - - /** - * @brief Returns the area to which the view content state is allocated at the - * last arbitration. - * @param state View content state - * @return The areas to which the view content state. - * @details - * If the view content state is not assigned to any area, empty list is returned.\n - * If state is not defined in the Model or nullptr, empty list is returned. - */ - virtual const std::list getArea(const RBAViewContentState* state) const=0; - - /** - * @brief Get the zone to which the sound content state is allocated of the - * last arbitration. - * @param state Sound content state - * @return The zones to which the sound content state is allocated. - * @details - * If the sound content state is not assigned to any zone, - * empty list is retuened.\n - * If state is not defined in the Model or nullptr, empty list is returned. - */ - virtual const std::list getZone(const RBASoundContentState* state) const=0; - - // [Areas/Zones by Content] - - /** - * @brief Returns the area to which the view content is allocated of the - * last arbitration. - * @param content View content - * @return The areas to which the view content is allocated. - * @details - * If the view content is not assigned to any area, empty list is returned.\n - * If content is not defined in the Model or nullptr, empty list is returned.\n - * This API is the same as getArea(RBAViewContentState*) \n - * except for the type of argument. - */ - virtual const std::list getArea(const RBAViewContent* content)const=0; - - /** - * @brief Returns the zone to which the sound content state is allocated of the - * last arbitration. - * @param content Sound content - * @return The zones to which the sound content is allocated. - * @details - * If the sound content is not assigned to any area, nullptr is returned.\n - * If content is not defined in the Model or nullptr, empty list is returned.\n - * This API is the same as getZone(RBASoundContentState*) \n - * except for the type of argument. - */ - virtual const std::list getZone(const RBASoundContent* content) const=0; - - // [Size] - - /** - * @brief Returns the size of the area determined in the last arbitration. - * @param area Area - * @return The size of the area. - * @details - * Area may have multiple sizes and its size will vary by the allocated content.\n - * This API returns the size which are matched with allocated content.\n - * If no content is allocated to the area, returns nullptr.\n - * If area is not defined in the Model or nullptr, returns nullptr. - */ - virtual const RBASize* getSize(const RBAArea* area) const=0; - - // [Active check Scene] - - /** - * @brief Returns true if the scene is ON at the last arbitration. - * @param scene Reference scene to be checked. - * @return true: the scene is ON - * @return false: the scene is OFF - * @details - * If scene is not defined in the Model or nullptr, returns false. - */ - virtual bool isActive(const RBAScene* scene) const=0; - - // [Active check ContentState] - - /** - * @brief Returns true if the view content is active. - * @param state Reference view content to be checked. - * @return true: Active - * @return false: Not active - * @details - * If content is not defined in the Model or nullptr, returns false. - */ - virtual bool isActive(const RBAViewContent* content) const=0; - - /** - * @brief Returns true if the sound content is active. - * @param state Reference sound content to be checked. - * @return true: Active - * @return false: Not active - * @details - * If content is not defined in the Model or nullptr, returns false. - */ - virtual bool isActive(const RBASoundContent* content) const=0; - - // [Visible/Sounding Area/Zonecheck] - - /** - * @brief Returns true if the area is visible of the last arbitration. - * @param area Reference area to be checked. - * @return true: Visible - * @return false: Not visible - * @details - * Returns false if the area is hidden.\n - * If area is not defined in the Model or nullptr, returns false. - */ - virtual bool isVisible(const RBAArea* area) const=0; - - /** - * @brief Returns true if the zone is sounding of the last arbitration. - * @param zone Reference zone to be checked. - * @return true: Sounding - * @return false: Not sounding - * @details - * Returns false if the zone is muted.\n - * If zone is not defined in the Model or nullptr, returns false. - */ - virtual bool isSounding(const RBAZone* zone) const=0; - - // [Visible/Sounding ContentState check] - - /** - * @brief Returns true if the view content state is visible - * of the last arbitration. - * @param state Reference view content state to be checked. - * @return true: state is allocated to visible area. - * @return false: state is not allocated to visible area. - * @details - * If all of the areas to which the content is allocated are hidden, returns false\n - * If state is not defined in the Model or nullptr, returns false. - */ - virtual bool isVisible(const RBAViewContentState* state) const=0; - - /** - * @brief Returns true if the sound content state is sounding - * of the last arbitration. - * @param state Reference sound content state to be check. - * @return true: state is allocated to outputting zone. - * @return false: state is not allocated to outputting zone. - * @details - * If all of the zones to which the content is allocated are muted, returns false\n - * If state is not defined in the Model or nullptr, returns false. - */ - virtual bool isSounding(const RBASoundContentState* state) const=0; - - // [View/Sound ContentState] - - /** - * @brief Returns the view content state allocated to the area - * of the last arbitration. - * @param area Area - * @return The view content state allocated to the area. - * @details - * Even if the area is hidden, Returns the allocated content state.\n - * If no visible view content state is allocated the area, nullptr is returnd.\n - * If area is not defined in the Model or nullptr, returns nullptr. - */ - virtual const RBAViewContentState* getViewContentState(const RBAArea* area) const=0; - - /** - * @brief Returns the sounding sound content state assigned to the zone - * of the last arbitration. - * @param zone Zone - * @return The sounding sound content state assign to the zone. - * @details - * Even if the zone is muted, Returns the allocated content state.\n - * If no sounding sound content state is allocated the area, - * nullptr is returnd.\n - * If zone is not defined in the Model or nullptr, returns nullptr. - */ - virtual const RBASoundContentState* getSoundContentState(const RBAZone* zone) const=0; - - // [Hidden/Mute check] - - /** - * @brief Returns true if the area is hidden state of the last arbitration.\n - * The hidden state is a state in which the area must be hidden by a - * constraint expression.\n - * In the hidden state, it returns true even if the content is not assigned. - * @param area Reference area to be checked. - * @return true: Hidden - * @return false: Not hidden - * @details - * If area is not defined in the Model or nullptr, returns nullptr. - */ - virtual bool isHidden(const RBAArea* area) const=0; - - /** - * @brief Returns true if the zone is muted state of the last arbitration.\n - * The muted state is a state in which the zone must be muted by a - * constraint expression.\n - * In the muted state, it returns true even if the content is not assigned. - * @param zone Reference zone to be checked. - * @return true: Muted - * @return false: Not muted - * @details - * If zone is not defined in the Model or nullptr, returns nullptr. - */ - virtual bool isMute(const RBAZone* zone) const=0; - - // [Check Attenuated] - - /** - * @brief Returns true if the zone is attenuated - * of the last arbitration. - * @param zone Reference zone to be check. - * @return true: Attenuated - * @return false: Not attenuated - * @details - * If zone is not defined in the Model or nullptr, returns nullptr. - */ - virtual bool isAttenuated(const RBAZone* zone) const=0; - - // [Cancel check] - - /** - * @brief Returns true if the view content state is canceled - * at the last arbitration. - * @param state Reference view content state to be checked. - * @return true: Canceled - * @return false: Not canceled or Not request view content state - * @details - * If state is not active, returns false.\n - * If state is not defined in the Model or nullptr, returns false. - */ - virtual bool isCancel(const RBAViewContentState* state) const=0; - - /** - * @brief Returns true if the sound content state is canceled - * at the last arbitration. - * @param state Reference view content state to be checked. - * @return true: Canceled - * @return false: Not canceled - * @details - * If state is not active, returns false.\n - * If state is not defined in the Model or nullptr, returns false. - */ - virtual bool isCancel(const RBASoundContentState* state) const=0; - - // common - - /** - * @brief Returns information of view status changes - * (the view actions) of the last arbitration. - * @return List of view actions. - * @details - * ViewAction is an information of differences \n - * between the last arbitration result and its previous result.\ - * There is no difference between hidden and not displayed for visible status.\n - */ - virtual const std::list& getViewActions() const=0; - - /** - * @brief Returns the result status type of the last arbitration. - * @return SUCCESS: Success - * @return UNKNOWN_CONTENT_STATE: Failed (The reuqest is unknown) - * @return CANCEL_ERROR: Cancel arbitrration error - * @endcond - */ - virtual RBAResultStatusType getStatusType() const=0; - - /** - * @brief Returns satisfied status of all online constraints. - * @return true:All online constraints check result is OK, and arbitration finished. - * @return false:All online constraints check result is NG, and arbitration finished. - */ - virtual bool satisfiesConstraints() const=0; - - /** - * @brief Returns the property value of scene. - * @return Property value - * @details - * If the scene or propertyName is not defined in the Model, returns -99.\n - * @endcond - */ - virtual std::int32_t getSceneProperty(const RBAScene* scene, const std::string& propertyName) const=0; - - // internal { - /** - * @brief Returns the displaying areas of the previous arbitration. - * @return List of visible areas. - */ - virtual const std::list& getPreVisibleAreas() const=0; - - /** - * @brief Returns the outputting sounding zones of the previous arbitration. - * @return List of sounding zones. - */ - virtual const std::list& getPreSoundingZones() const=0; - - /** - * @brief Returns the view content states to be displayed of the previous arbitration. - * @return List of visible view content states. - */ - virtual const std::list& getPreVisibleContentStates() const=0; - - /** - * @brief Returns the sound content states to be outputted of the previous arbitration. - * @return List of sounding sound content states. - * @details The list contains attenuated content states. - */ - virtual const std::list& getPreSoundingContentStates() const=0; - - /** - * @brief Returns the active view content states of the previous arbitration - * result. - * @return List of active view content states. - * @details - * The active view content states are those that have been requested to - * display so far. They do not include the view content state whose request - * has been withdrawn or canceled. - */ - virtual const std::list& getPreActiveViewContentStates() const=0; - - /** - * @brief Returns the active sound content states of the previous arbitration - * result. - * @return List of active sound content states. - * @details - * The active sound content states are those that have been requested to - * output so far. They do not include the sound content state whose request - * has been withdrawn or canceled. - */ - virtual const std::list& getPreActiveSoundContentStates() const=0; - - /** - * @brief Returns the active scenes of the previous arbitration. - * @return List of active scenes. - * @details - * The active scenes are those that have been requested for ON so far. - * They do not include scenes requested for OFF afterwards. - */ - virtual const std::list& getPreActiveScenes() const=0; - - /** - * @brief Returns the invisible areas of the previous arbitration. - * @return List of invisible areas. - * @details - * Returns the areas which are not displayed out of all areas. - */ - virtual const std::list& getPreInvisibleAreas() const=0; - - /* - * @brief Returns the unsounding zones of the previous arbitration. - * @return List of unsounding zones. - * @details - * Returns the zones which are not outputted out of all zones. - */ - virtual const std::list& getPreUnsoundingZones() const=0; - - /** - * @brief Returns the areas which have become invisible at the previous arbitration. - * @return List of areas. - * - * Returns the area which become to be invisible. - */ - virtual const std::list& getPreHiddenAreas() const=0; - - /** - * @brief Get the muted zones of the previous arbitration. - * @return List of muted zones. - * - * Retuens the zones that is defeted and canceled sound contents. - */ - virtual const std::list& getPreMuteZones() const=0; - - /** - * @brief Returns the attenuated zones of the previous arbitration. - * @return List of attenuated zones. - */ - virtual const std::list& getPreAttenuatedZones() const=0; - - /** - * @brief Returns the canceled view contents of the previous arbitration. - * @return List of canceled view contents. - */ - virtual const std::list& getPreCanceledViewContents() const=0; - - /** - * @brief Returns the canceled sound contents of the previous arbitration. - * @return List of canceled sound contents. - */ - virtual const std::list& getPreCanceledSoundContents() const=0; - - /** - * @brief Returns the stand by view contents due to defeated at the previous - * arbitration. - * @return List of stand by view contents. - */ - virtual const std::list& getPreStandbyViewContents() const=0; - - /** - * @brief Returns the stand by sound contents due to defeated at previous - * arbitration. - * @return List of stand by sound contents. - */ - virtual const std::list& getPreStandbySoundContents() const=0; - - /** - * @brief Returns the view content state assigned to the area of the previous - * arbitration. - * @param area Area - * @return The view content state assign to the area. - * - * If no view content state is allocated to the area, nullptr is returnd. - */ - virtual const RBAViewContentState* getPreContentState(const RBAArea* area) const=0; - - /** - * @brief Returns the sound content state assigned to the zone of the previous - * arbitration. - * @param zone Zone - * @return The sound content state assign to the zone. - * - * If no sound content state is allocated to the zone, nullptr is returned. - */ - virtual const RBASoundContentState* getPreContentState(const RBAZone* zone) const=0; - - /** - * @brief Returns the area to which the view content state is allocated of the - * previous arbitration. - * @param state View content state - * @return The areas to which the view content state. - * - * If the view content state is not assigned to any area, nullptr is returned. - */ - virtual const std::list getPreArea(const RBAViewContentState* state) const=0; - - /** - * @brief Get the zone to which the sound content state is allocated of the - * previous arbitration. - * @param state Sound content state - * @return The zones to which the sound content state is allocated. - * - * If the sound content state is not assigned to any zone, - * null ptr is retuened. - */ - virtual const std::list getPreZone(const RBASoundContentState* state) const=0; - - /** - * @brief Returns the area to which the view content is allocated of the - * previous arbitration. - * @param content View content - * @return The areas to which the view content is allocated. - * - * If the view content is not assigned to any area, nullptr is returned. - */ - virtual const std::list getPreArea(const RBAViewContent* content) const=0; - - /** - * @brief Returns the zone to which the sound content state is allocated of the - * previous arbitration. - * @param content Sound content - * @return The zones to which the sound content is allocated. - * - * If the sound content is not assigned to any area, nullptr is returned. - */ - virtual const std::list getPreZone(const RBASoundContent* content) const=0; - - /** - * @brief Returns the size of the area - * determined in the previous arbitration. - * @param area Area - * @return The size of the area. - */ - virtual const RBASize* getPreSize(const RBAArea* area) const=0; - - /** - * @brief Returns true if the scene is active - * of the previous arbitration. - * @param scene Reference scene to be checked. - * @return true: Active - * @return false: Not active - * - * The active scene is the scene requested to ON. - */ - virtual bool isPreActive(const RBAScene* scene) const=0; - - /** - * @brief Returns true if the view content is active - * of the previous arbitration. - * @param state Reference view content to be checked. - * @return true: Active - * @return false: Not active - * - * The active view content is the content requested to be displayed. - */ - virtual bool isPreActive(const RBAViewContent* content) const=0; - - /** - * @brief Returns true if the sound content is active - * of the previous arbitration. - * @param state Reference sound content to be checked. - * @return true: Active - * @return false: Not active - * - * The active sound content is the content requested to be outputted. - */ - virtual bool isPreActive(const RBASoundContent* content) const=0; - - /** - * @brief Returns true if the area is visible - * of the previous arbitration. - * @param area Reference area to be checked. - * @return true: Visible - * @return false: Not visible - */ - virtual bool isPreVisible(const RBAArea* area) const=0; - - /** - * @brief Returns true if the zone is sounding - * of the previous arbitration. - * @param zone Reference zone to be checked. - * @return true: Sounding - * @return false: Not sounding - */ - virtual bool isPreSounding(const RBAZone* zone) const=0; - - /** - * @brief Returns true if the view content state is visible - * of the previous arbitration. - * @param state Reference view content state to be checked. - * @return true: state is allocated to visible area. - * @return false: state is not allocated to visible area. - */ - virtual bool isPreVisible(const RBAViewContentState* state) const=0; - - /** - * @brief Returns true if the sound content state is sounding - * of the previous arbitration. - * @param state Reference sound content state to check. - * @return true: state is allocated to outputting zone. - * @return false: state is not allocated to outputting zone. - */ - virtual bool isPreSounding(const RBASoundContentState* state) const=0; - - /** - * @brief Returns the sounding sound content state assigned to the zone - * of the previous arbitration. - * @param zone Zone - * @return The sounding sound content state assign to the zone. - * - * When a zone is muted, Returns the content state. - * If no sounding sound content state is allocated the area, - * nullptr is returnd. - */ - virtual const RBASoundContentState* getPreSoundContentState(const RBAZone* zone) const=0; - - /** - * @brief Returns true if the area is hidden - * of the previous arbitration. - * @param area Reference area to be checked. - * @return true: Hidden - * @return false: Not hidden - */ - virtual bool isPreHidden(const RBAArea* area) const=0; - - /** - * @brief Returns true if the zone is muted of the previous arbitration. - * @param zone Reference zone to be checked. - * @return true: Muted - * @return false: Not muted - */ - virtual bool isPreMute(const RBAZone* zone) const=0; - - /** - * @brief Returns true if the zone is attenuated - * of the previous arbitration. - * @param zone Reference zone to be checked. - * @return true: Attenuated - * @return false: Not attenuated - */ - virtual bool isPreAttenuated(const RBAZone* zone) const=0; - - /** - * @brief Returns true if the view content state is canceled - * of the previous arbitration. - * @param state Reference view content state to be checked. - * @return true: Canceled - * @return false: Not canceled or Not request view content state - */ - virtual bool isPreCancel(const RBAViewContentState* state) const=0; - - /** - * @brief Returns true if the sound content state is canceled - * of the previous arbitration. - * @param state Reference view content state to be checked. - * @return true: Canceled - * @return false: Not canceled - */ - virtual bool isPreCancel(const RBASoundContentState* state) const=0; - - /** - * @brief Returns the log of the last arbitration. - * @return Log string - */ - virtual std::string getLog() const=0; - - /** - * @brief Returns displaying status - * @param display to be checked display - * @return true: something is displayed - * @return false: nothing is displayed - */ - virtual bool hasDisplayingArea(const RBADisplay* display) const=0; - // } - -}; - -} - -#endif diff --git a/src/include/rba/RBAResultStatusType.hpp b/src/include/rba/RBAResultStatusType.hpp deleted file mode 100644 index 6287993..0000000 --- a/src/include/rba/RBAResultStatusType.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/** - * 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. - */ - -/** - * Result status type cluss - */ - -#ifndef RBARESULTSTATUSTYPE_HPP -#define RBARESULTSTATUSTYPE_HPP - -namespace rba -{ - -/** - * @enum RBAResultStatusType - * Status of the arbitration result. - */ -enum class RBAResultStatusType : std::uint8_t -{ - /** - * @brief Success - */ - SUCCESS, - - /** - * @brief Failed - */ - FAILED, - - /** - * @brief Unknown context or content state - */ - UNKNOWN_CONTENT_STATE, - - /** - * @brief Cancel arbitration error - */ - CANCEL_ERROR - -}; - -} - -#endif diff --git a/src/include/rba/RBAScene.hpp b/src/include/rba/RBAScene.hpp deleted file mode 100644 index db13d2e..0000000 --- a/src/include/rba/RBAScene.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/** - * 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. - */ - -/** - * Scene class - */ - -#ifndef RBASCENE_HPP -#define RBASCENE_HPP - -#include -#include -#include - -#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 RBAScene - * Express the state(Including system state) at that time comprehensively.
- * Used scene for switch area/zone and view/sound content state. - * And plural RBA model(project) can share arbitration result by definitions global scene. - */ -class RBAScene -{ -protected: - RBAScene()=default; - RBAScene(const RBAScene&)=delete; - RBAScene(RBAScene&&)=delete; - RBAScene& operator=(const RBAScene&)=delete; - RBAScene& operator=(RBAScene&&)=delete; - -public: - virtual ~RBAScene()=default; - -public: - /** - * @brief Returns the scene name - * @return Scene name - */ - virtual std::string getName() const=0; - - /** - * @brief Returns the global scene status. - * @return global scene status. - */ - virtual bool isGlobal() const=0; - - /** - * @brief Returns List of the scene property name. - * @return List of the scene property name - */ - virtual const std::list& getPropertyNames() const=0; - - /** - * @brief Returns Default value of the scene property. - * @param propertyName Scene property name - * @return Default value of the scene property - */ - virtual std::int32_t getPropertyValue(const std::string& propertyName) const=0; - -}; - -} - -#endif diff --git a/src/include/rba/RBASize.hpp b/src/include/rba/RBASize.hpp deleted file mode 100644 index b44c546..0000000 --- a/src/include/rba/RBASize.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/** - * 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. - */ - -/** - * Size class - */ - -#ifndef RBASIZE_HPP -#define RBASIZE_HPP - -#include - -#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 RBASize - * Size definitions for object such as areas or view contents.
- * Each object can define plural size. - * Can refer to size from object. - */ -class DLL_EXPORT RBASize -{ -protected: - RBASize()=default; - RBASize(const RBASize&)=delete; - RBASize(RBASize&&)=delete; - RBASize& operator=(const RBASize&)=delete; - RBASize& operator=(RBASize&&)=delete; - ~RBASize()=default; - -public: - /** - * @brief Returns the name of the size. - * @return Size name - */ - virtual std::string getName() const=0; - - /** - * @brief Returns the width of the size. - * @return Width of the size - */ - virtual std::int32_t getWidth() const=0; - - /** - * @brief Returns the height of the size. - * @return Height of the size - */ - virtual std::int32_t getHeight() const=0; - -public: - /** - * @brief Default width of size - */ - const static std::int32_t WIDTH_EDEFAULT = 0; - - /** - * @brief Default height of size - */ - const static std::int32_t HEIGHT_EDEFAULT = 0; - -}; - -} - -#endif diff --git a/src/include/rba/RBASoundContent.hpp b/src/include/rba/RBASoundContent.hpp deleted file mode 100644 index b438328..0000000 --- a/src/include/rba/RBASoundContent.hpp +++ /dev/null @@ -1,98 +0,0 @@ -/** - * 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. - */ - -/** - * Sound content class - */ - -#ifndef RBASOUNDCONTENT_HPP -#define RBASOUNDCONTENT_HPP - -#ifdef _MSC_VER -#ifdef _WINDLL -#define DLL_EXPORT __declspec(dllexport) -#else -#define DLL_EXPORT __declspec(dllimport) -#endif -#else -#define DLL_EXPORT -#endif - -#include -#include -#include "RBAContentLoserType.hpp" - -namespace rba -{ - -class RBASoundContentState; -class RBAZone; - -/** - * @class RBASoundContent - * Define the object of sound content.
- * Sound content has plural status. - * When sound contents connected to a zone, active status is output. - * Object has zone definitions, that can output itself. - * Each object can define plural zone which can output sound contents. - */ -class DLL_EXPORT RBASoundContent -{ -protected: - RBASoundContent()=default; - RBASoundContent(const RBASoundContent&)=delete; - RBASoundContent(RBASoundContent&&)=delete; - RBASoundContent& operator=(const RBASoundContent&)=delete; - RBASoundContent& operator=(RBASoundContent&&)=delete; - ~RBASoundContent()=default; - -public: - /** - * @brief Returns the name of the sound content. - * @return Sound content name - */ - virtual std::string getName() const=0; - - /** - * @brief Returns the state of the sound content. - * @return List of the sound content state - */ - virtual const std::list& getContentStates() const=0; - - /** - * @brief Returns the zone of the sound content. - * @return List of the zone - */ - virtual const std::list& getZones() const=0; - - /** - * @brief Returns the loser type. - * @return Loser type - */ - virtual RBAContentLoserType getLoserType() const=0; - -public: - /** - * @brief Defines the default loser type. - */ - const static RBAContentLoserType LOSER_TYPE_EDEFAULT = - RBAContentLoserType::NEVER_GIVEUP; - -}; - -} - -#endif diff --git a/src/include/rba/RBASoundContentState.hpp b/src/include/rba/RBASoundContentState.hpp deleted file mode 100644 index f2fd61e..0000000 --- a/src/include/rba/RBASoundContentState.hpp +++ /dev/null @@ -1,134 +0,0 @@ -/** - * 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. - */ - -/** - * Sound content state class - */ - -#ifndef RBASOUNDCONTENTSTATE_HPP -#define RBASOUNDCONTENTSTATE_HPP - -#include - -#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 RBASoundContent; - -/** - * @class RBASoundContentState - * Define the state of sound contents. - */ -class DLL_EXPORT RBASoundContentState -{ -protected: - RBASoundContentState()=default; - RBASoundContentState(const RBASoundContentState&)=delete; - RBASoundContentState(RBASoundContentState&&)=delete; - RBASoundContentState& operator=(const RBASoundContentState&)=delete; - RBASoundContentState& operator=(RBASoundContentState&&)=delete; - ~RBASoundContentState()=default; - -public: - /** - * @brief Returns the name of the sound contents state. - * @return sound contents state name. - */ - virtual std::string getName() const=0; - - /** - * @brief Returns the priority. - * @return priority value - */ - virtual std::int32_t getPriority() const=0; - - /** - * @brief Returns the sound content. - * @return sound content - */ - virtual const RBASoundContent* getOwner() const=0; - - /** - * @brief Returns the order. - * @return order value - * @detail The order is a number of sequence of the entry sound content state - * by request. The order value is an integer value starting from 1 and - * incremented in order, and the order value of the sound content state - * without sound request is set to 0.\n - * The order of the sound content state does not include the output request - * of the view content state. - */ - virtual std::int32_t getOrder() const=0; - - /** - * @brief Returns the unique character string of the sound contents state. - * @return Unique character string of the sound contents state. - * - * Unique character string is - * sound content name + CONTEXT_SEPARATER + sound content state name. - * Use the unique character string as a context name. - */ - virtual std::string getUniqueName() const=0; - - /** - * @brief Returns the name of the sound content from context name. - * @param context the context name - * @return name of the sound content - */ - static std::string getContentNameByContext(const std::string& context); - - /** - * @brief Returns the state of the sound content from context name. - * @param context the context name - * @return state of the sound content - */ - static std::string getContentStateNameByContext(const std::string& context); - - /** - * @brief Check if argument is The unique character string(context name). - * @param context the context name - * @return true: unique character string(context name) - * @return false: Not unique character string(context name) - */ - static bool isUniqueName(const std::string& context); - -public: - /** - * @brief Defines the default priority value. - */ - const static std::int32_t PRIORITY_EDEFAULT = 0; - - /** - * @brief Defines the separator for separating sound content name and sound content state name. - * And be the character to connect it. - */ - const static char CONTEXT_SEPARATER = '/'; - -}; - -} - -#endif diff --git a/src/include/rba/RBAViewAction.hpp b/src/include/rba/RBAViewAction.hpp deleted file mode 100644 index 6fac1e0..0000000 --- a/src/include/rba/RBAViewAction.hpp +++ /dev/null @@ -1,162 +0,0 @@ -/** - * 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. - */ - -/** - * View action class - */ - -#ifndef RBAVIEWACTION_HPP -#define RBAVIEWACTION_HPP - -#include "RBAViewActionType.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 RBAArea; -class RBAViewContent; -class RBAViewContentState; - -/** - * @class RBAViewAction - * Define the change information of view contents.
- * Change information has 2 type. - * The contents transition, that view contents change for an area. - * The contents move, that the view content displayed area changes. - */ -class DLL_EXPORT RBAViewAction -{ -public: - RBAViewAction()=default; - RBAViewAction(RBAViewAction&&)=delete; - RBAViewAction& operator=(const RBAViewAction&)=delete; - RBAViewAction& operator=(RBAViewAction&&)=delete; - virtual ~RBAViewAction()=default; - -protected: - // Copy constructor is defined in default because it is used in another class - RBAViewAction(const RBAViewAction&)=default; - -public: - /** - * @brief Returns the area of the contents transition. - * @return Area of the contents transition - */ - virtual const RBAArea* getArea() const; - - /** - * @brief Returns previously displayed the view content. - * Used when change information type is the contents transition(TRANSITION_REPLACE). - * @return Previously displayed the view content - * - * * If the change information type is not the contents transition(TRANSITION_REPLACE), returns nullptr. - */ - virtual const RBAViewContent* getFromContent() const; - - /** - * @brief Returns subsequently displayed the view content. - * Used when change information type is the contents transition(TRANSITION_REPLACE). - * @return Subsequently displayed the view content. - * - * * If the change information type is not the contents transition(TRANSITION_REPLACE), returns nullptr. - */ - virtual const RBAViewContent* getToContent() const; - - /** - * @brief Returns previously displayed the view content state. - * Used when change information type is the contents transition(TRANSITION_REPLACE). - * @return Previously displayed the view content state - * - * * If the change information type is not the contents transition(TRANSITION_REPLACE), returns nullptr. - */ - virtual const RBAViewContentState* getFromContentState() const; - - /** - * @brief Returns subsequently displayed the view content state. - * Used when change information type is the contents transition(TRANSITION_REPLACE). - * @return Subsequently displayed the view content state. - * - * * If the change information type is not the contents transition(TRANSITION_REPLACE), returns nullptr. - */ - virtual const RBAViewContentState* getToContentState() const; - - /** - * @brief Returns previously displayed the area. - * Used when change information type is the contents move(MOVE). - * @return Previously displayed the area - * - * * If the change information type is not the contents move(MOVE), returns nullptr. - */ - virtual const RBAArea* getFromArea() const; - - /** - * @brief Returns subsequently displayed the area. - * Used when change information type is the contents move(MOVE). - * @return Subsequently displayed the area - * - * * If the change information type is not the contents move(MOVE), returns nullptr. - */ - virtual const RBAArea* getToArea() const; - - /** - * @brief Returns view content of change information. - * @return View content of change information - * - * * If getViewActionType() == TRANSITION_ADD, returns display view content. - * * If getViewActionType() == TRANSITION_REMOVE, returns hide view content. - * * If getViewActionType() == TRANSITION_REPLACE, returns nullptr. - * * If getViewActionType() == MOVE, returns view content which changes the area. - */ - virtual const RBAViewContent* getContent() const; - - /** - * @brief Returns view content state of change information. - * @return View content state of change information - * - * * If getViewActionType() == TRANSITION_ADD, returns display view content state. - * * If getViewActionType() == TRANSITION_REMOVE, returns hide view content state. - * * If getViewActionType() == TRANSITION_REPLACE, returns nullptr. - * * If getViewActionType() == MOVE, returns view content state which changes the area. - */ - virtual const RBAViewContentState* getContentState() const; - - /** - * @brief Returns view action type. - * @return View action type - */ - virtual RBAViewActionType getViewActionType() const=0; - - /** - * @brief Equal operator - * @return true: equal - * @return false: not equal - */ - virtual bool operator==(const RBAViewAction& viewAction)=0; - -}; - -} - -#endif diff --git a/src/include/rba/RBAViewActionType.hpp b/src/include/rba/RBAViewActionType.hpp deleted file mode 100644 index 7ceb088..0000000 --- a/src/include/rba/RBAViewActionType.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/** - * 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. - */ - -/** - * View action type class - */ - -#ifndef RBAVIEWACTIONTYPE_HPP -#define RBAVIEWACTIONTYPE_HPP - -namespace rba -{ - -/** - * @enum RBAViewActionType - * type of view action - */ -enum class RBAViewActionType : std::uint8_t -{ - /** - * @brief The content transition(ADD) : content is displayed in the area. - */ - TRANSITION_ADD, - - /** - * @brief The content transition(REMOVE) : content is deleted from the area. - */ - TRANSITION_REMOVE, - - /** - * @brief The content transition(REPLACE) : content is replaced on the area. - */ - TRANSITION_REPLACE, - - /** - * @brief The content move(MOVE) : The display of content changes to another area. - */ - MOVE -}; - -} - -#endif diff --git a/src/include/rba/RBAViewContent.hpp b/src/include/rba/RBAViewContent.hpp deleted file mode 100644 index 5ea74d9..0000000 --- a/src/include/rba/RBAViewContent.hpp +++ /dev/null @@ -1,104 +0,0 @@ -/** - * 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. - */ - -/** - * View content class - */ - -#ifndef RBAVIEWCONTENT_HPP -#define RBAVIEWCONTENT_HPP - -#include -#include -#include "RBAContentLoserType.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 RBAViewContentState; -class RBAArea; -class RBASize; - -/** - * @class RBAViewContent - * Define the object of view content.
- * View content has plural status. - * When view contents connected to a area, active status is displayed. - * Each object can define plural area which can displayed view contents. - */ -class DLL_EXPORT RBAViewContent -{ -protected: - RBAViewContent()=default; - RBAViewContent(const RBAViewContent&)=delete; - RBAViewContent(RBAViewContent&&)=delete; - RBAViewContent& operator=(const RBAViewContent&)=delete; - RBAViewContent& operator=(RBAViewContent&&)=delete; - ~RBAViewContent()=default; - -public: - /** - * @brief Returns the name of the view content. - * @return View content name - */ - virtual std::string getName() const=0; - - /** - * @brief Returns the state of the view content. - * @return List of view content state - */ - virtual const std::list& getContentStates() const=0; - - /** - * @brief Returns the area of the view content. - * @return List of the area - */ - virtual const std::list& getAreas() const=0; - - /** - * @brief Returns the list of size assignment to this content. - * @return List of size - */ - virtual const std::list& getSizes() const=0; - - /** - * @brief Returns the loser type. - * @return Loser type - */ - virtual RBAContentLoserType getLoserType() const=0; - -public: - /** - * @brief Defines the default loser type. - */ - const static RBAContentLoserType LOSER_TYPE_EDEFAULT = - RBAContentLoserType::NEVER_GIVEUP; - -}; - -} - -#endif diff --git a/src/include/rba/RBAViewContentState.hpp b/src/include/rba/RBAViewContentState.hpp deleted file mode 100644 index 2b0184a..0000000 --- a/src/include/rba/RBAViewContentState.hpp +++ /dev/null @@ -1,134 +0,0 @@ -/** - * 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. - */ - -/** - * View content state class - */ - -#ifndef RBAVIEWCONTENTSTATE_HPP -#define RBAVIEWCONTENTSTATE_HPP - -#include - -#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 RBAViewContent; - -/** - * @class RBAViewContentState - * Define the state of view contents. - */ -class DLL_EXPORT RBAViewContentState -{ -protected: - RBAViewContentState()=default; - RBAViewContentState(const RBAViewContentState&)=delete; - RBAViewContentState(RBAViewContentState&&)=delete; - RBAViewContentState& operator=(const RBAViewContentState&)=delete; - RBAViewContentState& operator=(RBAViewContentState&&)=delete; - ~RBAViewContentState()=default; - -public: - /** - * @brief Returns the name of the view contents state. - * @return view contents state name. - */ - virtual std::string getName() const=0; - - /** - * @brief Returns the priority. - * @return priority value - */ - virtual std::int32_t getPriority() const=0; - - /** - * @brief Returns the view content. - * @return view content - */ - virtual const RBAViewContent* getOwner() const=0; - - /** - * @brief Returns the order. - * @return order value - * @detail The order is a number of sequence of the entry view content state - * by request. The order value is an integer value starting from 1 and - * incremented in order, and the order value of the view content state - * without view request is set to 0.\n - * The order of the view content state does not include the output request - * of the sound content state. - */ - virtual std::int32_t getOrder() const=0; - - /** - * @brief Returns the unique character string of the view contents state. - * @return Unique character string of the view contents state. - * - * Unique character string is - * view content name + CONTEXT_SEPARATER + view content state name. - * Use the unique character string as a context name. - */ - virtual std::string getUniqueName() const=0; - - /** - * @brief Returns the name of the view content from context name. - * @param context the context name - * @return name of the view content - */ - static std::string getContentNameByContext(const std::string& context); - - /** - * @brief Returns the state of the view content from context name. - * @param context the context name - * @return state of the view content - */ - static std::string getContentStateNameByContext(const std::string& context); - - /** - * @brief Check if argument is The unique character string(context name). - * @param context the context name - * @return true: unique character string(context name) - * @return false: Not unique character string(context name) - */ - static bool isUniqueName(const std::string& context); - -public: - /** - * @brief Defines the default priority value. - */ - const static std::int32_t PRIORITY_EDEFAULT = 0; - - /** - * @brief Defines the separator for separating view content name and view content state name. - * And be the character to connect it. - */ - const static char CONTEXT_SEPARATER = '/'; - -}; - -} - -#endif diff --git a/src/include/rba/RBAZone.hpp b/src/include/rba/RBAZone.hpp deleted file mode 100644 index bee2d46..0000000 --- a/src/include/rba/RBAZone.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 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. - */ - -/** - * Zone class - */ - -#ifndef RBAZONE_HPP -#define RBAZONE_HPP - -#ifdef _MSC_VER -#ifdef _WINDLL -#define DLL_EXPORT __declspec(dllexport) -#else -#define DLL_EXPORT __declspec(dllimport) -#endif -#else -#define DLL_EXPORT -#endif - -#include -#include -#include "RBAArbitrationPolicy.hpp" - -namespace rba -{ - -class RBASoundContent; - -/** - * @class RBAZone - * Defines a Frame for outputting sound content.
- * At run time, at most one sound content is allocated to one zone. - * This class has arbitration policy definitions, because it is executed for each zone. - */ -class DLL_EXPORT RBAZone -{ -protected: - RBAZone()=default; - RBAZone(const RBAZone&)=delete; - RBAZone(RBAZone&&)=delete; - RBAZone& operator=(const RBAZone&)=delete; - RBAZone& operator=(RBAZone&&)=delete; - ~RBAZone()=default; - -public: - /** - * @brief Returns the name of the zone. - * @return Zone name - */ - virtual std::string getName() const=0; - - /** - * @brief Returns the priority. - * @return Priority value - */ - virtual std::int32_t getPriority() const=0; - - /** - * @brief Returns the list of content which can be output in this zone. - * @return List of content - */ - virtual const std::list& getContents() const=0; - - /** - * @brief Returns the arbitration policy value defined to this zone. - * @return arbitration policy value - */ - virtual RBAArbitrationPolicy getArbitrationPolicy() const=0; -}; - -} - -#endif -- cgit 1.2.3-korg