ct_common  1.0.1
Common library for combinatorial testing
src/ct_common/common/pvpair.cpp
Go to the documentation of this file.
00001 //===----- ct_common/common/pvpair.cpp --------------------------*- C++ -*-===//
00002 //
00003 //                      The ct_common Library
00004 //
00005 // This file is distributed under the MIT license. See LICENSE for details.
00006 //
00007 //===----------------------------------------------------------------------===//
00008 //
00009 // This file contains the function definitions of class PVPair
00010 //
00011 //===----------------------------------------------------------------------===//
00012 
00013 #include <ct_common/common/pvpair.h>
00014 
00015 using namespace ct::common;
00016 
00017 PVPair::PVPair(std::size_t pid, std::size_t vid)
00018     : pid_(pid), vid_(vid) {
00019 }
00020 
00021 PVPair::PVPair(const PVPair &from)
00022     : pid_(from.pid_), vid_(from.vid_) {
00023 }
00024 
00025 PVPair &PVPair::operator = (const PVPair &right) {
00026   this->pid_ = right.pid_;
00027   this->vid_ = right.vid_;
00028   return *this;
00029 }
00030 
00031 PVPair::~PVPair(void) {
00032 }
00033 
00034 bool PVPair::operator < (const PVPair &right) const {
00035   return (this->pid_ < right.pid_ ||
00036           (this->pid_ == right.pid_ && this->vid_ < right.vid_));
00037 }
00038 
00039 bool PVPair::operator == (const PVPair &right) const {
00040   return (this->pid_ == right.pid_ && this->vid_ == right.vid_);
00041 }
00042 
00043 bool PVPair::operator != (const PVPair &right) const {
00044   return !this->operator==(right);
00045 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines