Exemple #1
0
string Chain::genUnicode (
		const int& start, const int& end, const bool& dir
		) const
{
	string _unicode ("");

	if (dir)
	{
		for (int i=start; i<= end; i++)
		{
			const Part* p = listOfParts[i];
			_unicode += "[" + p->getPartRef ()
					 +	":" + p->getPartType ();
			if (p->isBinded) _unicode += ":*";
			_unicode += "]";
		}
	}
	else
	{
		for (int i=end; i >= start; i--)
		{
			const Part* p = listOfParts[i];
			_unicode += "[" + p->getPartRef () + ":";
		   	
			if (p->getPartType () == "ForwardDNA") _unicode += "ReverseDNA";
			else if (p->getPartType () == "ReverseDNA") _unicode += "ForwardDNA";
			else _unicode += p->getPartType ();

			if (p->isBinded) _unicode += ":*]";
			else _unicode += "]";
		}
	}

	return _unicode;
}
Exemple #2
0
string Chain::genUnicode (
    const Part* ps,
    const Part* pe
) const
{
    string _unicode ("");
    for (const Part* p = ps; p != pe; p++)
    {
        //database id
        _unicode += "[" + p->getDbId ();

        //database type
        _unicode += ":" + p->getPartType ();

        //is binded?
        if (p->isBinded) _unicode += ":*";

        _unicode += "]";
    }
}