]> sigrok.org Git - pulseview.git/blobdiff - pv/devices/device.hpp
devices::Device: Moved in full_name and display_name
[pulseview.git] / pv / devices / device.hpp
index 529fdd5b33c42e0bc52fc42bb1e49a5f72559c38..7e0b58ad065600bdc993751f343ff8eb348d4de1 100644 (file)
@@ -22,7 +22,7 @@
 #define PULSEVIEW_PV_DEVICES_DEVICE_HPP
 
 #include <memory>
-
+#include <string>
 
 namespace sigrok {
 class Device;
@@ -30,6 +30,9 @@ class Session;
 } // namespace sigrok
 
 namespace pv {
+
+class DeviceManager;
+
 namespace devices {
 
 class Device
@@ -44,6 +47,19 @@ public:
 
        std::shared_ptr<sigrok::Device> device() const;
 
+       /**
+        * Builds the full name. It only contains all the fields.
+        */
+       virtual std::string full_name() const = 0;
+
+       /**
+        * Builds the display name. It only contains fields as required.
+        * @param device_manager a reference to the device manager is needed
+        * so that other similarly titled devices can be detected.
+        */
+       virtual std::string display_name(
+               const DeviceManager &device_manager) const = 0;
+
        virtual void create() = 0;
 
        virtual void run();