Line data Source code
1 : // 2 : // Copyright 2024 OpenModelViewer Authors 3 : // 4 : // Licensed under the Apache License, Version 2.0 (the "License"); 5 : // you may not use this file except in compliance with the License. 6 : // You may obtain a copy of the License at 7 : // 8 : // http://www.apache.org/licenses/LICENSE-2.0 9 : // 10 : // Unless required by applicable law or agreed to in writing, software 11 : // distributed under the License is distributed on an "AS IS" BASIS, 12 : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 : // See the License for the specific language governing permissions and 14 : // limitations under the License. 15 : // 16 : 17 : #pragma once 18 : 19 : namespace openmodelviewer::core::lifecycle 20 : { 21 : /** 22 : * @brief Interface for components that can be started. 23 : * 24 : * Represents the ability to initiate an active process or behavior. 25 : * Starting a component does not necessarily involve resource allocation � 26 : * it simply triggers the beginning of its runtime activity. 27 : * 28 : * This interface is typically used in systems where components 29 : * operate autonomously once started. 30 : */ 31 : class IStartable 32 : { 33 : public: 34 181 : virtual ~IStartable() = default; 35 : 36 : /** 37 : * @brief Starts the component. 38 : * 39 : * @return true if the component started successfully. 40 : */ 41 : virtual bool start() = 0; 42 : }; 43 : } // namespace openmodelviewer::core::lifecycle