From: Martin Ling Date: Sun, 12 Oct 2014 16:57:27 +0000 (+0100) Subject: bindings: Remove Device::description(). X-Git-Tag: libsigrok-0.4.0~856 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=d3a401c15be9a4e798678fe557b655977d960b72 bindings: Remove Device::description(). --- diff --git a/bindings/cxx/classes.cpp b/bindings/cxx/classes.cpp index 1747bdff..41ded852 100644 --- a/bindings/cxx/classes.cpp +++ b/bindings/cxx/classes.cpp @@ -437,29 +437,6 @@ Device::~Device() delete entry.second; } -string Device::description() -{ - ostringstream s; - - vector parts = - {vendor(), model(), version(), serial_number()}; - - for (size_t i = 0; i < parts.size(); i++) - { - if (parts[i].length() > 0) - { - if (i != 0) - s << " "; - s << parts[i]; - } - } - - if (serial_number().length() == 0 && connection_id().length() > 0) - s << " " << connection_id(); - - return s.str(); -} - string Device::vendor() { return valid_string(_structure->vendor); @@ -789,11 +766,6 @@ SessionDevice::~SessionDevice() { } -string SessionDevice::description() -{ - return _parent->_filename; -} - shared_ptr SessionDevice::get_shared_from_this() { return static_pointer_cast(shared_from_this()); @@ -1365,11 +1337,6 @@ InputDevice::~InputDevice() { } -string InputDevice::description() -{ - return ""; -} - shared_ptr InputDevice::get_shared_from_this() { return static_pointer_cast(shared_from_this()); diff --git a/bindings/cxx/include/libsigrok/libsigrok.hpp b/bindings/cxx/include/libsigrok/libsigrok.hpp index 3e49bd59..0fcc59d0 100644 --- a/bindings/cxx/include/libsigrok/libsigrok.hpp +++ b/bindings/cxx/include/libsigrok/libsigrok.hpp @@ -352,8 +352,6 @@ protected: class SR_API Device : public Configurable { public: - /** Description identifying this device. */ - virtual string description(); /** Vendor name for this device. */ string vendor(); /** Model name for this device. */ @@ -615,8 +613,6 @@ class SR_API SessionDevice : public ParentOwned, public Device { - /** Description identifying this device. */ - string description(); protected: SessionDevice(struct sr_dev_inst *sdi); ~SessionDevice(); @@ -863,9 +859,6 @@ class SR_API InputDevice : public ParentOwned, public Device { -public: - /** Description identifying this device. */ - string description(); protected: InputDevice(shared_ptr input, struct sr_dev_inst *sdi); ~InputDevice(); diff --git a/bindings/swig/classes.i b/bindings/swig/classes.i index b688a857..ce96c9d9 100644 --- a/bindings/swig/classes.i +++ b/bindings/swig/classes.i @@ -208,7 +208,6 @@ typedef std::map %attributeval(sigrok::OutputFormat, map_string_Option, options, options); -%attributestring(sigrok::Device, std::string, description, description); %attributestring(sigrok::Device, std::string, vendor, vendor); %attributestring(sigrok::Device, std::string, model, model); %attributestring(sigrok::Device, std::string, version, version);