PT-Cooling-Log 1.0
PTCoolingLogViewer
src/PtViewEntry.cc
00001 #include "PtViewEntry.hh"
00002 
00003 using namespace std;
00004 
00005 PtViewEntry::PtViewEntry() : 
00006   field_( "" ), name_( "" ), graph_(), color_( kBlack )
00007 {
00008   graph_.SetLineWidth( 2 );
00009   graph_.SetLineStyle( 1 );
00010   this->setColor();
00011 }
00012 
00013 PtViewEntry::PtViewEntry( const PtViewEntry& entry ) : 
00014   field_( entry.field_ ), name_( entry.name_ ), graph_( entry.graph_ ), color_( entry.color_ )
00015 {
00016 }
00017 
00018 PtViewEntry::~PtViewEntry() {
00019 }
00020 
00021 PtViewEntry& PtViewEntry::operator=( const PtViewEntry& entry ){
00022   if( this != &entry ){
00023     field_ = entry.field_;
00024     name_  = entry.name_;
00025     graph_ = entry.graph_;
00026     color_ = entry.color_;
00027   }
00028   return *this;
00029 }
00030 
00031 void PtViewEntry::set( const std::string& field,
00032                        const std::string& name,
00033                        const int& color ) {
00034   field_ = field;
00035   name_  = name;
00036   color_ = color;
00037   
00038   this->setColor();
00039   
00040 }
00041 
00042 void PtViewEntry::setColor(){
00043   graph_.SetLineColor( color_ );
00044   graph_.SetMarkerColor( color_ );
00045 }
 全て クラス ファイル 関数 変数