This file is indexed.

/usr/include/bamtools/api/SamReadGroupDictionary.h is in libbamtools-dev 2.4.0+dfsg-3build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// ***************************************************************************
// SamReadGroupDictionary.h (c) 2010 Derek Barnett
// Marth Lab, Department of Biology, Boston College
// ---------------------------------------------------------------------------
// Last modified: 16 October 2011 (DB)
// ---------------------------------------------------------------------------
// Provides methods for operating on a collection of SamReadGroup entries.
// ***************************************************************************

#ifndef SAM_READGROUP_DICTIONARY_H
#define SAM_READGROUP_DICTIONARY_H

#include "api/api_global.h"
#include "api/SamReadGroup.h"
#include <map>
#include <string>
#include <vector>

namespace BamTools {

typedef std::vector<SamReadGroup>             SamReadGroupContainer;
typedef SamReadGroupContainer::iterator       SamReadGroupIterator;
typedef SamReadGroupContainer::const_iterator SamReadGroupConstIterator;

class API_EXPORT SamReadGroupDictionary {

    // ctor & dtor
    public:
        SamReadGroupDictionary(void);
        SamReadGroupDictionary(const SamReadGroupDictionary& other);
        ~SamReadGroupDictionary(void);

    // query/modify read group data
    public:
        // adds a read group
        void Add(const SamReadGroup& readGroup);
        void Add(const std::string& readGroupId);

        // adds multiple read groups
        void Add(const SamReadGroupDictionary& readGroups);
        void Add(const std::vector<SamReadGroup>& readGroups);
        void Add(const std::vector<std::string>& readGroupIds);

        // clears all read group entries
        void Clear(void);

        // returns true if dictionary contains this read group
        bool Contains(const SamReadGroup& readGroup) const;
        bool Contains(const std::string& readGroupId) const;

        // returns true if dictionary is empty
        bool IsEmpty(void) const;

        // removes read group, if found
        void Remove(const SamReadGroup& readGroup);
        void Remove(const std::string& readGroupId);

        // removes multiple read groups
        void Remove(const std::vector<SamReadGroup>& readGroups);
        void Remove(const std::vector<std::string>& readGroupIds);

        // returns number of read groups in dictionary
        int Size(void) const;

        // retrieves a modifiable reference to the SamReadGroup object associated with this ID
        SamReadGroup& operator[](const std::string& readGroupId);

    // retrieve STL-compatible iterators
    public:
        SamReadGroupIterator      Begin(void);              // returns iterator to begin()
        SamReadGroupConstIterator Begin(void) const;        // returns const_iterator to begin()
        SamReadGroupConstIterator ConstBegin(void) const;   // returns const_iterator to begin()
        SamReadGroupIterator      End(void);                // returns iterator to end()
        SamReadGroupConstIterator End(void) const;          // returns const_iterator to end()
        SamReadGroupConstIterator ConstEnd(void) const;     // returns const_iterator to end()

    // data members
    private:
        SamReadGroupContainer m_data;
        std::map<std::string, size_t> m_lookupData;
};

} // namespace BamTools

#endif // SAM_READGROUP_DICTIONARY_H