From: Martin Ling Date: Sun, 12 Oct 2014 16:48:44 +0000 (+0100) Subject: bindings: Add accessor to obtain parent object. X-Git-Tag: libsigrok-0.4.0~858 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=73a1eb017be9369597f404e61ed8b79767a58383;p=libsigrok.git bindings: Add accessor to obtain parent object. --- diff --git a/bindings/cxx/include/libsigrok/libsigrok.hpp b/bindings/cxx/include/libsigrok/libsigrok.hpp index 0bd27f3a..1936d4d5 100644 --- a/bindings/cxx/include/libsigrok/libsigrok.hpp +++ b/bindings/cxx/include/libsigrok/libsigrok.hpp @@ -149,6 +149,12 @@ protected: weak_ptr _weak_this; public: + /* Get parent object that owns this object. */ + shared_ptr parent() + { + return _parent; + } + /* Note, this implementation will create a new smart_ptr if none exists. */ shared_ptr shared_from_this() {