MCPcopy Create free account
hub / github.com/TileDB-Inc/TileDB / CurrentDomain

Class CurrentDomain

tiledb/sm/cpp_api/current_domain.h:58–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57namespace tiledb {
58class CurrentDomain {
59 public:
60 /* ********************************* */
61 /* CONSTRUCTORS & DESTRUCTORS */
62 /* ********************************* */
63
64 /**
65 * Creates a TileDB current_domain object.
66 *
67 * @param ctx TileDB context
68 * @param type The TileDB currentDomain type
69 */
70 explicit CurrentDomain(const Context& ctx)
71 : ctx_(ctx) {
72 tiledb_current_domain_t* cd;
73 ctx.handle_error(tiledb_current_domain_create(ctx.ptr().get(), &cd));
74 current_domain_ = std::shared_ptr<tiledb_current_domain_t>(cd, deleter_);
75 }
76
77 /**
78 * Creates a TileDB current_domain object.
79 *
80 * @param ctx TileDB context
81 * @param cd The TileDB currentDomain C api pointer
82 */
83 CurrentDomain(const tiledb::Context& ctx, tiledb_current_domain_t* cd)
84 : ctx_(ctx) {
85 current_domain_ = std::shared_ptr<tiledb_current_domain_t>(cd, deleter_);
86 }
87
88 CurrentDomain(const CurrentDomain&) = default;
89 CurrentDomain(CurrentDomain&&) = default;
90 CurrentDomain& operator=(const CurrentDomain&) = default;
91 CurrentDomain& operator=(CurrentDomain&&) = default;
92
93 /* ********************************* */
94 /* API */
95 /* ********************************* */
96
97 /**
98 * Returns a shared pointer to the C TileDB currentDomain object.
99 *
100 * @return The C API pointer
101 */
102 std::shared_ptr<tiledb_current_domain_t> ptr() const {
103 return current_domain_;
104 }
105
106 /**
107 * Returns the currentDomain type.
108 *
109 * @return The currentDomain type.
110 */
111 tiledb_current_domain_type_t type() const {
112 tiledb_current_domain_type_t type;
113 auto& ctx = ctx_.get();
114 ctx.handle_error(tiledb_current_domain_get_type(
115 ctx.ptr().get(), current_domain_.get(), &type));

Callers 1

current_domainMethod · 0.70

Calls 4

handle_errorMethod · 0.80
getMethod · 0.45
ptrMethod · 0.45

Tested by

no test coverage detected