Re: [Seqan-dev] newbie question
Bernd,
You have just discovered tag-based dispatch. Actually, Fasta and Fastq are types in the seqan namespace.
When using a class name as an expression (as you are in the readRecord() function call, using "KlassName()" creates a new object. Now, there are various different template functions with the same name and slightly different signatures, similar to:
template <typename TString> int readRecord(TString & target, Fasta const &) { ... }
template <typename TStrng> int readRecord(TString & target, Fastq const &) { ... }
When you use the tag Fasta() then the first overload is used, with Fastq() the second one is used.
I assume that you could solve the original question from your other email.
Cheers, HTH!
Manuel
-----Original Message-----
From: Bernd Jagla [mailto:bernd.jagla@pasteur.fr]
Sent: Mittwoch, 7. März 2012 11:35
To: seqan-dev@lists.fu-berlin.de
Subject: [Seqan-dev] newbie question
Hi,
I am not very familiar with C++, nor templates etc so sorry for my ignorance...
Since I am not using Eclipse at the moment I am relying on the trac pages and tutorials to give me the information I am looking for.
Unfortunately this is not working as expected.
I would like to write a simple record reader for a fastq file. There is an example for a fasta file and it shouldn't be that difficult to translate this into a fastq reader. But when I search for fastq in the track pages (http://docs.seqan.de/seqan/dev/) I don't get any results. I can't even find function Fasta() that is mentioned in the tutorial (http://trac.seqan.de/wiki/Tutorial/ReadingSequenceFiles)...
Could you please enlighten me on what I am doing wrong?
Thanks a lot,
Bernd
_______________________________________________
seqan-dev mailing list
seqan-dev@lists.fu-berlin.de
https://lists.fu-berlin.de/listinfo/seqan-dev