X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Flogic.cpp;h=b7b6cace08287eff88be95d951cdfbe16823f4c2;hp=9bcfd0a382ac39c020d396007d07a4e1885fbef8;hb=8dbbc7f0b9ea59d0f0d62225772f8a56eee125f5;hpb=d9aecf1fcd9af471db3b59de7efc65b9632a6d79 diff --git a/pv/data/logic.cpp b/pv/data/logic.cpp index 9bcfd0a3..b7b6cace 100644 --- a/pv/data/logic.cpp +++ b/pv/data/logic.cpp @@ -18,48 +18,50 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + #include "logic.h" #include "logicsnapshot.h" -using boost::shared_ptr; using std::deque; using std::max; +using std::shared_ptr; namespace pv { namespace data { -Logic::Logic(unsigned int num_probes) : +Logic::Logic(unsigned int num_channels) : SignalData(), - _num_probes(num_probes) + num_channels_(num_channels) { - assert(_num_probes > 0); + assert(num_channels_ > 0); } -int Logic::get_num_probes() const +int Logic::get_num_channels() const { - return _num_probes; + return num_channels_; } void Logic::push_snapshot( shared_ptr &snapshot) { - _snapshots.push_front(snapshot); + snapshots_.push_front(snapshot); } deque< shared_ptr >& Logic::get_snapshots() { - return _snapshots; + return snapshots_; } void Logic::clear() { - _snapshots.clear(); + snapshots_.clear(); } uint64_t Logic::get_max_sample_count() const { uint64_t l = 0; - for (boost::shared_ptr s : _snapshots) { + for (std::shared_ptr s : snapshots_) { assert(s); l = max(l, s->get_sample_count()); }