Add IsEmpty() method
[platform/core/base/bundle.git] / src / bundle_cpp_implementation.h
1 /*
2  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
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 #ifndef BUNDLE_CPP_IMPLEMENTATION_H_
18 #define BUNDLE_CPP_IMPLEMENTATION_H_
19
20 #include <string>
21 #include <memory>
22 #include <list>
23
24 #include "bundle_cpp.h"
25
26 namespace tizen_base {
27
28 class Bundle::KeyInfo::Impl {
29  public:
30   virtual ~Impl();
31
32  private:
33   Impl(Bundle::KeyInfo* parent, const bundle_keyval_t* handle,
34        std::string name);
35   explicit Impl(Bundle::KeyInfo* parent);
36
37  private:
38   friend class Bundle::KeyInfo;
39
40  private:
41   const bundle_keyval_t* handle_;
42   std::string name_;
43   Bundle::KeyInfo* parent_;
44 };
45
46 class Bundle::Impl {
47  public:
48   virtual ~Impl();
49
50  private:
51   explicit Impl(Bundle* parent);
52   Impl(Bundle* parent, bool copy, bool own);
53
54  private:
55   friend class Bundle;
56
57   bundle* handle_ = nullptr;
58   bool copy_ = true;
59   bool own_ = true;
60   Bundle* parent_ = nullptr;
61 };
62
63 }  // namespace tizen_base
64
65 #endif  // BUNDLE_CPP_IMPLEMENTATION_H_