Realm C++ SDK Version v2.2.0

lnklst.hpp

1
2//
3// Copyright 2024 Realm Inc.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing, software
12// distributed under the License is distributed on an "AS IS" BASIS,
13// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
18
19#ifndef CPPREALM_LNKLST_HPP
20#define CPPREALM_LNKLST_HPP
21
22#include <cstdlib>
23#include <memory>
24#include <cpprealm/internal/bridge/utils.hpp>
25
26namespace realm {
27 class LnkLst;
28}
29namespace realm::internal::bridge {
30 struct obj;
31 struct obj_key;
32
33 struct lnklst {
34 lnklst() ;
35 lnklst(const lnklst& other) ;
36 lnklst& operator=(const lnklst& other) ;
37 lnklst(lnklst&& other);
38 lnklst& operator=(lnklst&& other);
39 ~lnklst();
40 lnklst(const LnkLst&); // NOLINT
41 operator LnkLst() const; //NOLINT
42 obj create_and_insert_linked_object(size_t idx);
43 void add(const obj_key&);
44 private:
45#ifdef CPPREALM_HAVE_GENERATED_BRIDGE_TYPES
46 storage::LnkLst m_lnk_lst[1];
47#else
48 std::shared_ptr<LnkLst> m_lnk_lst;
49#endif
50 };
51
52}
53
54#endif //CPPREALM_LNKLST_HPP
Definition: lnklst.hpp:33
Definition: obj_key.hpp:33
Definition: obj.hpp:123