1 // ***************************************************************************
2 // SamFormatPrinter.h (c) 2010 Derek Barnett
3 // Marth Lab, Department of Biology, Boston College
4 // All rights reserved.
5 // ---------------------------------------------------------------------------
6 // Last modified: 23 December 2010 (DB)
7 // ---------------------------------------------------------------------------
8 // Provides functionality for printing formatted SAM header to string
9 // ***************************************************************************
11 #ifndef SAM_FORMAT_PRINTER_H
12 #define SAM_FORMAT_PRINTER_H
18 // This file is not part of the BamTools API. It exists purely as an
19 // implementation detail. This header file may change from version to version
20 // without notice, or even be removed.
33 class SamFormatPrinter {
37 SamFormatPrinter(const BamTools::SamHeader& header);
38 ~SamFormatPrinter(void);
40 // generates SAM-formatted string from header data
42 const std::string ToString(void) const;
46 const std::string FormatTag(const std::string& tag, const std::string& value) const;
47 void PrintHD(std::stringstream& out) const;
48 void PrintSQ(std::stringstream& out) const;
49 void PrintRG(std::stringstream& out) const;
50 void PrintPG(std::stringstream& out) const;
51 void PrintCO(std::stringstream& out) const;
55 const SamHeader& m_header;
58 } // namespace Internal
59 } // namespace BamTools
61 #endif // SAM_FORMAT_PRINTER_H