| THM1176InstrumentManager 1.2 Qt Object abstraction for Metrolab THM1176

Loading...
Searching...
No Matches
IEEE488InstrumentTypes.h
Go to the documentation of this file.
1// Copyright (c) 2020 Metrolab Technology S.A., Geneva, Switzerland (www.metrolab.com)
2// See the included file LICENSE.txt for the licensing conditions.
3
7
8#pragma once
9
10// Standard libraries
11#include <string>
12#include <vector>
13#include <iostream>
14
15 namespace MTL
16{
17 namespace Instrument
18 {
19 //----------------------------------------------------------------------//
20 // Resource names //
21 //----------------------------------------------------------------------//
22 typedef std::string tResourceName;
23
25 class CResourceList : public std::vector<tResourceName>
26 {
27 public:
28 std::string Dump() const
29 {
30 std::string l_RsrcList;
31 for (CResourceList::const_iterator it = this->begin(); it != this->end(); it++)
32 l_RsrcList += *it + '\n';
33 return l_RsrcList;
34 }
35 bool operator==(CResourceList const & other)
36 {
37 if (other.size() != size())
38 return false;
39 for (CResourceList::const_iterator thisit = begin(), otherit = other.begin(); thisit != end(); thisit++, otherit++)
40 {
41 if (*thisit != *otherit)
42 return false;
43 }
44 return true;
45 }
46 bool operator!=(CResourceList const & other)
47 {
48 if (other.size() != size())
49 return true;
50 for (CResourceList::const_iterator thisit = begin(), otherit = other.begin(); thisit != end(); thisit++, otherit++)
51 {
52 if (*thisit != *otherit)
53 return true;
54 }
55 return false;
56 }
57 };
58
59 }
60} // namespace MTL::Instrument
MTL::Instrument::CResourceList
List of VISA resource names.
Definition IEEE488InstrumentTypes.h:26
MTL::Instrument::CResourceList::operator!=
bool operator!=(CResourceList const &other)
Inequality operator.
Definition IEEE488InstrumentTypes.h:46
MTL::Instrument::CResourceList::Dump
std::string Dump() const
Dump the VISA resource list into a string.
Definition IEEE488InstrumentTypes.h:28
MTL::Instrument::CResourceList::operator==
bool operator==(CResourceList const &other)
Equality operator.
Definition IEEE488InstrumentTypes.h:35
MTL::Instrument
Definition THM1176.h:74
MTL::Instrument::tResourceName
std::string tResourceName
IEEE488 resource name.
Definition IEEE488InstrumentTypes.h:22
MTL
Definition CTHM1176InstrumentManager.h:179