00001 // Block.cpp 00002 00003 #include "Block.h" 00004 00005 using namespace Yosokumo; 00006 00007 Block::Block() : type(EMPTY), studyIdentifier("") 00008 { 00009 cellSequence.clear(); 00010 predictorSequence.clear(); 00011 specimenSequence.clear(); 00012 } 00013 00014 Block::Block(std::string id) : type(EMPTY), studyIdentifier(id) 00015 { 00016 cellSequence.clear(); 00017 predictorSequence.clear(); 00018 specimenSequence.clear(); 00019 } 00020 00021 Block::~Block() 00022 {} 00023 00024 void Block::setType(Type t) 00025 { 00026 type = t; 00027 } 00028 00029 Block::Type Block::getType() const 00030 { 00031 return type; 00032 } 00033 00034 void Block::setStudyIdentifier(std::string id) 00035 { 00036 studyIdentifier = id; 00037 } 00038 00039 std::string Block::getStudyIdentifier() const 00040 { 00041 return studyIdentifier; 00042 } 00043 00044 std::string Block::toString() 00045 { 00046 std::stringstream s; 00047 00048 s << 00049 "Block:" << '\n' << 00050 " type = " << getType() << '\n' << 00051 " studyIdentifier = " << getStudyIdentifier() << '\n'; 00052 00053 return s.str(); 00054 } 00055 00056 // end Block.cpp