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

Class UniquePtr

cpp/gdb_arrow.py:402–425  ·  view source on GitHub ↗

A `std::unique_ptr ` value.

Source from the content-addressed store, hash-verified

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

Callers 1

derefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected