]> git.donarmstrong.com Git - bamtools.git/blobdiff - src/api/internal/SamFormatPrinter_p.cpp
Cleaned up intra-API includes & moved version numbers to 2.0.0
[bamtools.git] / src / api / internal / SamFormatPrinter_p.cpp
index 1e670b0155be479d88d9ed6d21b1c406600313af..942a7af7bc9706d509ffc21123a66c5c91ca8dbe 100644 (file)
@@ -1,16 +1,15 @@
 // ***************************************************************************
 // 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;
 
@@ -19,16 +18,25 @@ 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