X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdevices%2Fdevice.hpp;h=fd78960c153f50917eb08fca0745e54186c104f2;hp=b4518fbee97091f1365c5589603f7ae6f251cf3f;hb=6f925ba9d6faf1077b73c5a5808259576081716a;hpb=00f6bae935837b38b0d03a5928ba8175d460413f diff --git a/pv/devices/device.hpp b/pv/devices/device.hpp index b4518fb..fd78960 100644 --- a/pv/devices/device.hpp +++ b/pv/devices/device.hpp @@ -23,6 +23,9 @@ #include #include +using std::shared_ptr; +using std::string; + namespace sigrok { class ConfigKey; class Device; @@ -43,9 +46,9 @@ protected: public: virtual ~Device(); - std::shared_ptr session() const; + shared_ptr session() const; - std::shared_ptr device() const; + shared_ptr device() const; template T read_config(const sigrok::ConfigKey *key, const T default_value = 0); @@ -53,14 +56,14 @@ public: /** * Builds the full name. It only contains all the fields. */ - virtual std::string full_name() const = 0; + virtual 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( + virtual string display_name( const DeviceManager &device_manager) const = 0; virtual void open() = 0; @@ -74,8 +77,8 @@ public: virtual void stop(); protected: - std::shared_ptr session_; - std::shared_ptr device_; + shared_ptr session_; + shared_ptr device_; }; } // namespace devices