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 #ifndef META_SRC_OBJECT_FLAT_CONTAINER_H
16 #define META_SRC_OBJECT_FLAT_CONTAINER_H
17 
18 #include "flat_container.h"
19 
META_BEGIN_NAMESPACE()20 META_BEGIN_NAMESPACE()
21 
22 class ObjectFlatContainer
23     : public Internal::ObjectFwd<ObjectFlatContainer, ClassId::ObjectFlatContainer, FlatContainer> {
24     using Super = Internal::ObjectFwd<ObjectFlatContainer, ClassId::ObjectFlatContainer, FlatContainer>;
25 
26 protected:
27     bool Build(const IMetadata::Ptr& data) override;
28     void Destroy() override;
29 
30 protected:
31     META_IMPLEMENT_INTERFACE_EVENT(IContainer, IOnChildChanged, OnAdded)
32     META_IMPLEMENT_INTERFACE_EVENT(IContainer, IOnChildChanged, OnRemoved)
33     META_IMPLEMENT_INTERFACE_EVENT(IContainer, IOnChildMoved, OnMoved)
34 
35     META_IMPLEMENT_INTERFACE_EVENT(IContainerPreTransaction, IOnChildChanging, OnAdding);
36     META_IMPLEMENT_INTERFACE_EVENT(IContainerPreTransaction, IOnChildChanging, OnRemoving);
37 };
38 
39 META_END_NAMESPACE()
40 
41 #endif // META_SRC_OBJECT_CONTAINER_H
42