]> git.donarmstrong.com Git - bamtools.git/blobdiff - src/api/BamWriter.cpp
Cleaned up intra-API includes & moved version numbers to 2.0.0
[bamtools.git] / src / api / BamWriter.cpp
index 3912245a3f6034180716b79875e7fdd5fa566a0d..b1582a86a8236ff4d9bca170b06a4148f4870dd5 100644 (file)
@@ -2,15 +2,15 @@
 // BamWriter.cpp (c) 2009 Michael Str�mberg, Derek Barnett\r
 // Marth Lab, Department of Biology, Boston College\r
 // ---------------------------------------------------------------------------\r
-// Last modified: 4 October 2011 (DB)\r
+// Last modified: 10 October 2011 (DB)\r
 // ---------------------------------------------------------------------------\r
 // Provides the basic functionality for producing BAM files\r
 // ***************************************************************************\r
 \r
-#include <api/BamAlignment.h>\r
-#include <api/BamWriter.h>\r
-#include <api/SamHeader.h>\r
-#include <api/internal/BamWriter_p.h>\r
+#include "api/BamAlignment.h"\r
+#include "api/BamWriter.h"\r
+#include "api/SamHeader.h"\r
+#include "api/internal/BamWriter_p.h"\r
 using namespace BamTools;\r
 using namespace BamTools::Internal;\r
 using namespace std;\r
@@ -55,7 +55,14 @@ void BamWriter::Close(void) {
     d->Close();\r
 }\r
 \r
-// returns a human-readable description of the last error that occurred\r
+/*! \fn std::string BamWriter::GetErrorString(void) const\r
+    \brief Returns a human-readable description of the last error that occurred\r
+\r
+    This method allows elimination of STDERR pollution. Developers of client code\r
+    may choose how the messages are displayed to the user, if at all.\r
+\r
+    \return error description\r
+*/\r
 std::string BamWriter::GetErrorString(void) const {\r
     return d->GetErrorString();\r
 }\r
@@ -75,9 +82,9 @@ bool BamWriter::IsOpen(void) const {
 \r
     Will overwrite the BAM file if it already exists.\r
 \r
-    \param filename           name of output BAM file\r
-    \param samHeaderText      header data, as SAM-formatted string\r
-    \param referenceSequences list of reference entries\r
+    \param[in] filename           name of output BAM file\r
+    \param[in] samHeaderText      header data, as SAM-formatted string\r
+    \param[in] referenceSequences list of reference entries\r
 \r
     \return \c true if opened successfully\r
     \sa Close(), IsOpen(), BamReader::GetHeaderText(), BamReader::GetReferenceData()\r
@@ -98,9 +105,9 @@ bool BamWriter::Open(const std::string& filename,
 \r
     Will overwrite the BAM file if it already exists.\r
 \r
-    \param filename           name of output BAM file\r
-    \param samHeader          header data, wrapped in SamHeader object\r
-    \param referenceSequences list of reference entries\r
+    \param[in] filename           name of output BAM file\r
+    \param[in] samHeader          header data, wrapped in SamHeader object\r
+    \param[in] referenceSequences list of reference entries\r
 \r
     \return \c true if opened successfully\r
     \sa Close(), IsOpen(), BamReader::GetHeader(), BamReader::GetReferenceData()\r
@@ -115,7 +122,7 @@ bool BamWriter::Open(const std::string& filename,
 /*! \fn void BamWriter::SaveAlignment(const BamAlignment& alignment)\r
     \brief Saves an alignment to the BAM file.\r
 \r
-    \param alignment BamAlignment record to save\r
+    \param[in] alignment BamAlignment record to save\r
     \sa BamReader::GetNextAlignment(), BamReader::GetNextAlignmentCore()\r
 */\r
 bool BamWriter::SaveAlignment(const BamAlignment& alignment) {\r
@@ -127,8 +134,8 @@ bool BamWriter::SaveAlignment(const BamAlignment& alignment) {
 \r
     Default mode is BamWriter::Compressed.\r
 \r
-    N.B. - Changing the compression mode is disabled on open files (i.e. the request will be ignored).\r
-    Be sure to call this function before opening the BAM file.\r
+    \note Changing the compression mode is disabled on open files (i.e. the request will\r
+    be ignored). Be sure to call this function before opening the BAM file.\r
 \r
     \code\r
         BamWriter writer;\r
@@ -137,7 +144,7 @@ bool BamWriter::SaveAlignment(const BamAlignment& alignment) {
         // ...\r
     \endcode\r
 \r
-    \param compressionMode desired output compression behavior\r
+    \param[in] compressionMode desired output compression behavior\r
     \sa IsOpen(), Open()\r
 */\r
 void BamWriter::SetCompressionMode(const BamWriter::CompressionMode& compressionMode) {\r