X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fstoresession.hpp;h=f0c8de778d5723e957a7035f19f8bf21e66511f7;hp=e89b3fd209da4e488ae208cd5d47820e0a085692;hb=f4ab4b5c657e5613caba82feaa81a8a400e4f331;hpb=5ccfc97e20bbea19b9bc37905dd4cf63ee1f6303 diff --git a/pv/storesession.hpp b/pv/storesession.hpp index e89b3fd..f0c8de7 100644 --- a/pv/storesession.hpp +++ b/pv/storesession.hpp @@ -20,9 +20,8 @@ #ifndef PULSEVIEW_PV_STORESESSION_HPP #define PULSEVIEW_PV_STORESESSION_HPP -#include - #include +#include #include #include #include @@ -34,6 +33,16 @@ #include +using std::atomic; +using std::string; +using std::shared_ptr; +using std::pair; +using std::map; +using std::vector; +using std::thread; +using std::mutex; +using std::ofstream; + namespace sigrok { class Output; class OutputFormat; @@ -57,15 +66,15 @@ private: static const size_t BlockSize; public: - StoreSession(const std::string &file_name, - const std::shared_ptr &output_format, - const std::map &options, - const std::pair sample_range, + StoreSession(const string &file_name, + const shared_ptr &output_format, + const map &options, + const pair sample_range, const Session &session); ~StoreSession(); - std::pair progress() const; + pair progress() const; const QString& error() const; @@ -76,9 +85,9 @@ public: void cancel(); private: - void store_proc(std::vector< std::shared_ptr > achannel_list, - std::vector< std::shared_ptr > asegment_list, - std::shared_ptr lsegment); + void store_proc(vector< shared_ptr > achannel_list, + vector< shared_ptr > asegment_list, + shared_ptr lsegment); Q_SIGNALS: void progress_updated(); @@ -86,27 +95,27 @@ Q_SIGNALS: void store_successful(); private: - const std::string file_name_; - const std::shared_ptr output_format_; - const std::map options_; - const std::pair sample_range_; + const string file_name_; + const shared_ptr output_format_; + const map options_; + const pair sample_range_; const Session &session_; - std::shared_ptr output_; - std::ofstream output_stream_; + shared_ptr output_; + ofstream output_stream_; std::thread thread_; - std::atomic interrupt_; + atomic interrupt_; - std::atomic units_stored_, unit_count_; + atomic units_stored_, unit_count_; - mutable std::mutex mutex_; + mutable mutex mutex_; QString error_; uint64_t start_sample_, sample_count_; }; -} // pv +} // namespace pv #endif // PULSEVIEW_PV_STORESESSION_HPP