1 // ========================================================================== 2 // SeqAn - The Library for Sequence Analysis 3 // ========================================================================== 4 // Copyright (c) 2006-2015, Knut Reinert, FU Berlin 5 // All rights reserved. 6 // 7 // Redistribution and use in source and binary forms, with or without 8 // modification, are permitted provided that the following conditions are met: 9 // 10 // * Redistributions of source code must retain the above copyright 11 // notice, this list of conditions and the following disclaimer. 12 // * Redistributions in binary form must reproduce the above copyright 13 // notice, this list of conditions and the following disclaimer in the 14 // documentation and/or other materials provided with the distribution. 15 // * Neither the name of Knut Reinert or the FU Berlin nor the names of 16 // its contributors may be used to endorse or promote products derived 17 // from this software without specific prior written permission. 18 // 19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 // ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE 23 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 29 // DAMAGE. 30 // 31 // ========================================================================== 32 // Author: David Weese <david.weese@fu-berlin.de> 33 // ========================================================================== 34 35 #ifndef SEQAN_HEADER_STORE_READ_H 36 #define SEQAN_HEADER_STORE_READ_H 37 38 namespace SEQAN_NAMESPACE_MAIN 39 { 40 41 ////////////////////////////////////////////////////////////////////////////// 42 // Read Store 43 ////////////////////////////////////////////////////////////////////////////// 44 45 /*! 46 * @class ReadStoreElement 47 * @headerfile <seqan/store.h> 48 * @brief Represents a single read (without sequence). 49 * 50 * @signature template <[typename TSpec]> 51 * struct ReadStoreElement; 52 * 53 * @tparam TSpec The specializing type. Default: <tt>void</tt>. 54 * 55 * 56 * @fn ReadStoreElement::ReadStoreElement 57 * @signature ReadStoreElement::ReadStoreElement(); 58 * @brief Constructor. 59 * 60 * Sets ReadStoreElement::matePairId to ReadStoreElement::INVALID_ID. 61 */ 62 63 /*! 64 * @var TId ReadStoreElement::matePairId; 65 * @brief Refers to a mate pair in the @link FragmentStore::matePairStore @endlink or is INVALID_ID if the read is 66 * not paired. 67 * 68 * @var TId ReadStoreElement::INVALID_ID; 69 * @brief Constant to represetn an invalid id. 70 */ 71 72 template <typename TSpec = void> 73 struct ReadStoreElement 74 { 75 typedef typename Id<ReadStoreElement>::Type TId; 76 77 static const TId INVALID_ID; 78 79 TId matePairId; // refers to the mate-pair, INVALID_ID if not part of a mate-pair 80 ReadStoreElementReadStoreElement81 ReadStoreElement() : matePairId(INVALID_ID) {} 82 83 inline 84 bool 85 operator==(ReadStoreElement const & other) 86 { 87 return matePairId == other.matePairId; 88 } 89 }; 90 91 ////////////////////////////////////////////////////////////////////////////// 92 93 template <typename TSpec> 94 const typename Id<ReadStoreElement<TSpec> >::Type 95 ReadStoreElement<TSpec>::INVALID_ID = MaxValue<typename Id<ReadStoreElement<TSpec> >::Type>::VALUE; 96 97 ////////////////////////////////////////////////////////////////////////////// 98 99 }// namespace SEQAN_NAMESPACE_MAIN 100 101 #endif //#ifndef SEQAN_HEADER_... 102