void Chain::genUnicode () { //clear if (!unicode.empty ()) unicode.clear (); //initialize unicode = string (""); //traverse each part int numP = listOfParts.size (); for (int cnt =0; cnt < numP; cnt ++) { Part* p = listOfParts[cnt]; //each part contribute a [id:type:(*)]... //sub code to the whole //database id unicode += "[" + p->getDbId (); //database type unicode += ":" + p->getPartType (); //is binded? if (p->isBinded) unicode += ":*"; unicode += "]"; } }
void Chain::Output (ostream& os) const { os << "5' - "; int numP = listOfParts.size (); for (int cnt =0; cnt < numP; cnt++) { Part* p = listOfParts[cnt]; os << p->getDbId () << "(" << p->getPartType () << "," << p->getPartLabel () << ") - " ; } os << "3'"; }