From: Derek Date: Sat, 9 Oct 2010 23:54:03 +0000 (-0400) Subject: Changed BamAlignment::SupportData from private to public. X-Git-Url: https://git.donarmstrong.com/?p=bamtools.git;a=commitdiff_plain;h=d553a62a6dda3377021f51ad172b7a5bc5fab412 Changed BamAlignment::SupportData from private to public. This should remove the access-control errors that occur when building BamTools with older, less-conforming compilers --- diff --git a/src/api/BamAlignment.h b/src/api/BamAlignment.h index c8939f0..cbf13d5 100644 --- a/src/api/BamAlignment.h +++ b/src/api/BamAlignment.h @@ -3,7 +3,7 @@ // Marth Lab, Department of Biology, Boston College // All rights reserved. // --------------------------------------------------------------------------- -// Last modified: 19 September 2010 (DB) +// Last modified: 9 October 2010 (DB) // --------------------------------------------------------------------------- // Provides the BamAlignment data structure // *************************************************************************** @@ -140,8 +140,7 @@ struct BamAlignment { int32_t MatePosition; // Position (0-based) where alignment's mate starts int32_t InsertSize; // Mate-pair insert size - // internal data - private: + public: struct BamAlignmentSupportData { // data members @@ -162,14 +161,18 @@ struct BamAlignment { { } }; - // contains raw character data & lengths + // ** THIS IS INTERNAL DATA! DO NOT ACCESS OR EDIT FROM CLIENT CODE ** + // + // Intended for use by BamReader & BamWriter ONLY. No, really, I mean it. + // + // BamTools makes some assumptions about this data being pristine, so please don't tinker with it. + // The regular data fields above should be sufficient for client code. + // + // Technical/design note - Ideally, this would be a private data member with BamReader & BamWriter + // allowed direct 'friend' access. However older compilers (especially gcc before v4.1 ) do not + // propagate the friend access to BamReader/Writer's implementation inner classes. BamAlignmentSupportData SupportData; - // allow these classes access to BamAlignment private members (SupportData) - // but client code should not need to touch this data - friend class BamReader; - friend class BamWriter; - // Alignment flag query constants // Use the get/set methods above instead private: