Realm C++ SDK Version v2.2.0

schema.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_BRIDGE_SCHEMA_HPP
20#define CPPREALM_BRIDGE_SCHEMA_HPP
21
22#include <string>
23#include <vector>
24#include <cpprealm/internal/bridge/utils.hpp>
25
26namespace realm {
27 class Schema;
28}
29namespace realm::internal::bridge {
30 struct object_schema;
31
32 struct schema {
33 schema();
34 schema(const schema& other) ;
35 schema& operator=(const schema& other) ;
36 schema(schema&& other);
37 schema& operator=(schema&& other);
38 ~schema();
39 schema(const std::vector<object_schema>&); //NOLINT(google-explicit-constructor)
40 schema(const Schema&); //NOLINT(google-explicit-constructor)
41 operator Schema() const; //NOLINT(google-explicit-constructor)
42 object_schema find(const std::string &name);
43 private:
44#ifdef CPPREALM_HAVE_GENERATED_BRIDGE_TYPES
45 storage::Schema m_schema[1];
46#else
47 std::shared_ptr<Schema> m_schema;
48#endif
49 };
50}
51
52#endif //CPPREALM_BRIDGE_SCHEMA_HPP
Definition: object_schema.hpp:33
Definition: schema.hpp:32