// ***************************************************************************
// SamFormatPrinter.cpp (c) 2010 Derek Barnett
// Marth Lab, Department of Biology, Boston College
-// All rights reserved.
// ---------------------------------------------------------------------------
-// Last modified: 19 April 2011 (DB)
+// Last modified: 10 October 2011 (DB)
// ---------------------------------------------------------------------------
// Provides functionality for printing formatted SAM header to string
// ***************************************************************************
-#include <api/SamConstants.h>
-#include <api/SamHeader.h>
-#include <api/internal/SamFormatPrinter_p.h>
+#include "api/SamConstants.h"
+#include "api/SamHeader.h"
+#include "api/internal/SamFormatPrinter_p.h"
using namespace BamTools;
using namespace BamTools::Internal;
#include <vector>
using namespace std;
+// ------------------------
+// static utility methods
+// ------------------------
+
+static inline
+const string FormatTag(const string& tag, const string& value) {
+ return string(Constants::SAM_TAB + tag + Constants::SAM_COLON + value);
+}
+
+// ---------------------------------
+// SamFormatPrinter implementation
+// ---------------------------------
+
SamFormatPrinter::SamFormatPrinter(const SamHeader& header)
: m_header(header)
{ }
SamFormatPrinter::~SamFormatPrinter(void) { }
-const string SamFormatPrinter::FormatTag(const string &tag, const string &value) const {
- return string(Constants::SAM_TAB + tag + Constants::SAM_COLON + value);
-}
-
const string SamFormatPrinter::ToString(void) const {
// clear out stream