1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef META_INTERFACE_IDERIVED_H
17 #define META_INTERFACE_IDERIVED_H
18 
19 #include <meta/interface/intf_object.h>
20 
21 META_BEGIN_NAMESPACE()
22 
23 META_REGISTER_INTERFACE(IDerived, "d471a8d7-16fe-4b3e-9ff9-fa8787271e3f");
24 /**
25  * @brief Defines that the object type is derived from another object type.
26  *        This is part of the ObjectRegistry object construction machinery.
27  */
28 class IDerived : public CORE_NS::IInterface {
29     META_INTERFACE(CORE_NS::IInterface, IDerived)
30 public:
31     /**
32      * @brief Called by the framework. (part of the aggregate part creation). Implementer receives the actual object
33      * "aggr" and the requested superclass implementation "impl".
34      */
35     virtual void SetSuperInstance(const IObject::Ptr& aggr, const IObject::Ptr& impl) = 0;
36 
37     /**
38      * @brief Called by the framework. (part of the aggregate part creation), if implementer does not need a super class
39      * return "empty".
40      */
41     virtual BASE_NS::Uid GetSuperClassUid() const = 0;
42 };
43 
44 META_END_NAMESPACE()
45 
46 #endif
47