예제 #1
0
const Part* Chain::getPart (const string& label) const
{
	for (int i=0; i <listOfParts.size (); i++)
	{
		Part* p = listOfParts[i];
		if (label == p->getPartLabel ()) return p;
	}
	return NULL;
}
예제 #2
0
파일: chain.cpp 프로젝트: liaochen/igame
int Chain::getPartIndex (
    const string& label
) const
{
    for (int i=0; i < listOfParts.size (); i++)
    {
        Part* p = listOfParts[i];
        if (p->getPartLabel () == label) return i;
    }
    return -1;
}
예제 #3
0
파일: chain.cpp 프로젝트: liaochen/igame
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'";
}
예제 #4
0
void Chain::Output (ostream& os) const 
{
	os << "\n5'	---- ";

	int numP = listOfParts.size ();
	for (int cnt =0; cnt < numP; cnt++)
	{
		Part* p = listOfParts[cnt];
		os << "\n			" <<  p->getPartRef ();

	    if (p->isBinded) os << "*";

		os << "(" << p->getPartType () 
		   << "," << p->getPartLabel () 
		   << ")  " ;
	}
	os << "\n----	3'";
}