]> git.donarmstrong.com Git - bamtools.git/blobdiff - src/api/internal/SamHeaderValidator_p.h
Removed STDERR pollution by API
[bamtools.git] / src / api / internal / SamHeaderValidator_p.h
index 06a82abeaa04d9ee1043ba89f47c41703ed12160..7d0c60aa32e464f1774c882848413d27cd034f8e 100644 (file)
@@ -1,9 +1,8 @@
 // ***************************************************************************
 // SamHeaderValidator.h (c) 2010 Derek Barnett
 // Marth Lab, Department of Biology, Boston College
-// All rights reserved.
 // ---------------------------------------------------------------------------
-// Last modified: 13 January 2011 (DB)
+// Last modified: 6 October 2011 (DB)
 // ---------------------------------------------------------------------------
 // Provides functionality for validating SamHeader data
 // ***************************************************************************
@@ -21,6 +20,7 @@
 //
 // We mean it.
 
+#include <iostream>
 #include <string>
 #include <vector>
 
@@ -41,9 +41,12 @@ class SamHeaderValidator {
 
     // SamHeaderValidator interface
     public:
+
+        // prints error & warning messages
+        void PrintMessages(std::ostream& stream);
+
         // validates SamHeader data, returns true/false accordingly
-        // prints error & warning messages to stderr when @verbose is true
-        bool Validate(bool verbose = false);
+        bool Validate(void);
 
     // internal methods
     private:
@@ -77,8 +80,8 @@ class SamHeaderValidator {
         // error reporting
         void AddError(const std::string& message);
         void AddWarning(const std::string& message);
-        void PrintErrorMessages(void);
-        void PrintWarningMessages(void);
+        void PrintErrorMessages(std::ostream& stream);
+        void PrintWarningMessages(std::ostream& stream);
 
     // data members
     private: