Realm C++ SDK版本 v 2.2.0

object_schema.hpp

1
2//
3// 版权所有 2024 Realm Inc.
4//
5// 根据 Apache 许可证 2.0 版(“许可证”)获得许可;
6// 除非符合合规,否则不得使用此文件。
7// 您可以在以下网址获取许可证副本:
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// 除非适用法律要求或书面同意,否则软件
12// 根据许可证分发是按“原样”分发的,
13// 不提供任何类型的Express或暗示的保证或条件。
14// 请参阅管理权限的特定语言的许可证和
15// 许可证下的限制。
16//
18
19#ifndef CPPREALM_BRIDGE_OBJECT_SCHEMA_HPP
20#define CPPREALM_BRIDGE_OBJECT_SCHEMA_HPP
21
22#include <cstdint>
23#include <string>
24#include<vector>
25#include <cpprealm/internal/bridge/utils.hpp>
26
27命名空间域 {
28 class ObjectSchema;
29 }
30命名空间realm::internal::bridge {
31 struct属性;
32
34 枚举 class object_type : uint 8 _t { TopLevel = 0 , Embedded = 0 x 1 , TopLevelAsymmetric = 0 x 2 };
35
37
38 object_schema ( const object_schema & other) ;
39 object_schema & 操作符=( const object_schema & other) ;
40 object_schema ( object_schema && other);
41 object_schema & 操作符=( object_schema && other);
43
44
45 object_schema ( const std::string& name,
46 const std::vector<property>& properties,
47 const std::string& primary_key
48 object_type 类型);
49 object_schema ( const ObjectSchema&);
50 操作符 ObjectSchema() const ;
51 uint 32 _t Table_key();
52 void add_property( const 属性 &);
53
54 void set_name( const std::string& name);
55 std::string get_name() const
56 void set_primary_key( const std::string& primary_key );
57 void set_object_type(object_type);
58 属性 property_for_name( const std::string&);
59 bool 操作符==( const object_schema & rhs);
60 private :
61 ObjectSchema* get_object_schema();
62 const ObjectSchema* get_object_schema() const ;
63#ifdef CPPREALM_HAVE_GENERATED_BRIDGE_TYPES
64 存储::ObjectSchema m_schema[ 1 ];
65#else
66 std::shared_ptr<ObjectSchema> m_schema;
67#endif
68 };
69 }
70
71#endif //CPREALM_BRIDGE_OBJECT_SCHEMA_HPP
定义: object_schema.hpp: 33
定义:属性.hpp: 33
定义: managed_primary_key.hpp:30