File: logaa.cpp

package info (click to toggle)
pilercr 1.06%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 844 kB
  • sloc: cpp: 14,339; makefile: 67; sh: 36
file content (30 lines) | stat: -rwxr-xr-x 763 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "pilercr.h"

static void LogStdStr(const std::string &s)
	{
	for (size_t i = 0; i < s.size(); ++i)
		Log("%c", s[i]);
	}

void LogAA(const ArrayAln &AA)
	{
	const int RepeatCount = (int) AA.LeftFlanks.size();
	assert(RepeatCount == AA.Repeats.size());
	assert(RepeatCount == AA.Spacers.size());

	Log("AA Id=%d Pos=%d RepeatCount=%d\n", AA.Id, AA.Pos, RepeatCount);

	for (int RepeatIndex = 0; RepeatIndex < RepeatCount; ++RepeatIndex)
		{
		const std::string &LeftFlank = AA.LeftFlanks[RepeatIndex];
		const std::string &Repeat = AA.Repeats[RepeatIndex];
		const std::string &Spacer = AA.Spacers[RepeatIndex];

		LogStdStr(LeftFlank);
		Log("  ");
		LogStdStr(Repeat);
		Log("  ");
		LogStdStr(Spacer);
		Log("\n");
		}
	}