MCPcopy Create free account
hub / github.com/apache/arrow / UniquePtr

Class UniquePtr

cpp/gdb_arrow.py:404–427  ·  view source on GitHub ↗

A `std::unique_ptr ` value.

Source from the content-addressed store, hash-verified

402
403
404class UniquePtr:
405 """
406 A `std::unique_ptr<T>` value.
407 """
408
409 def __init__(self, val):
410 self.val = val
411 ty = self.val.type.template_argument(0)
412 # XXX This assumes that the embedded T* pointer lies at the start
413 # of std::unique_ptr<T>.
414 self._ptr = self.val.address.reinterpret_cast(ty.pointer().pointer())
415
416 def get(self):
417 """
418 Return the underlying pointer (a T*).
419 """
420 return self._ptr
421
422 @property
423 def value(self):
424 """
425 The underlying value (a T).
426 """
427 return self._ptr.dereference()
428
429
430class Variant:

Callers 1

derefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected