00001 #include "PmtIdentifier.h"
00002
00003 PmtIdentifier::PmtIdentifier()
00004 : _serialPort(0),
00005 _softId(0),
00006 _module(0),
00007 _pmtBox(0),
00008 _position(0),
00009 _serial(0),
00010 _baseId(0)
00011 {}
00012
00013 PmtIdentifier::PmtIdentifier(int serialPort,
00014 int softId,
00015 int module,
00016 int pmtBox,
00017 int position,
00018 long int serial,
00019 long int baseId)
00020 : _serialPort(serialPort),
00021 _softId(softId),
00022 _module(module),
00023 _pmtBox(pmtBox),
00024 _position(position),
00025 _serial(serial),
00026 _baseId(baseId)
00027 {}
00028
00029 PmtIdentifier::~PmtIdentifier()
00030 {}
00031
00032 PmtIdentifier::PmtIdentifier(const PmtIdentifier & pi)
00033 : _serialPort(pi._serialPort),
00034 _softId(pi._softId),
00035 _module(pi._module),
00036 _pmtBox(pi._pmtBox),
00037 _position(pi._position),
00038 _serial(pi._serial),
00039 _baseId(pi._baseId)
00040 {}
00041
00042 const PmtIdentifier& PmtIdentifier::operator=(const PmtIdentifier &pi)
00043 {
00044 _serialPort = pi._serialPort;
00045 _softId = pi._softId;
00046 _module = pi._module;
00047 _pmtBox = pi._pmtBox;
00048 _position = pi._position;
00049 _serial = pi._serial;
00050 _baseId = pi._baseId;
00051 return *this;
00052 }
00053
00054 ostream& operator<<(ostream& os, const PmtIdentifier& object)
00055 {
00056 os << object._serialPort << "\t"
00057 << object._softId << "\t"
00058 << object._module << "\t"
00059 << object._pmtBox << "\t"
00060 << object._position << "\t"
00061 << object._serial << "\t"
00062 << object._baseId;
00063 return os;
00064 }
00065
00066 istream& operator>>(istream& is, PmtIdentifier& object)
00067 {
00068 is >> object._serialPort
00069 >> object._softId
00070 >> object._module
00071 >> object._pmtBox
00072 >> object._position
00073 >> object._serial
00074 >> object._baseId;
00075 return is;
00076 }