This file is indexed.

/usr/include/wx-3.0/wx/flags.h is in wx3.0-headers 3.0.4+dfsg-3.

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
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
/////////////////////////////////////////////////////////////////////////////
// Name:        wx/flags.h
// Purpose:     a bitset suited for replacing the current style flags
// Author:      Stefan Csomor
// Modified by:
// Created:     27/07/03
// Copyright:   (c) 2003 Stefan Csomor
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

#ifndef _WX_SETH__
#define _WX_SETH__

// wxBitset should be applied to an enum, then this can be used like
// bitwise operators but keeps the type safety and information, the
// enums must be in a sequence , their value determines the bit position
// that they represent
// The api is made as close as possible to <bitset>

template <class T> class wxBitset
{
    friend class wxEnumData ;
public:
    // creates a wxBitset<> object with all flags initialized to 0
    wxBitset() { m_data = 0; }

    // created a wxBitset<> object initialized according to the bits of the
    // integral value val
    wxBitset(unsigned long val) { m_data = val ; }

    // copies the content in the new wxBitset<> object from another one
    wxBitset(const wxBitset &src) { m_data = src.m_data; }

    // creates a wxBitset<> object that has the specific flag set
    wxBitset(const T el) { m_data |= 1 << el; }

    // returns the integral value that the bits of this object represent
    unsigned long to_ulong() const { return m_data ; }

    // assignment
    wxBitset &operator =(const wxBitset &rhs)
    {
        m_data = rhs.m_data;
        return *this;
    }

    // bitwise or operator, sets all bits that are in rhs and leaves
    // the rest unchanged
    wxBitset &operator |=(const wxBitset &rhs)
    {
        m_data |= rhs.m_data;
        return *this;
    }

    // bitwsie exclusive-or operator, toggles the value of all bits
    // that are set in bits and leaves all others unchanged
    wxBitset &operator ^=(const wxBitset &rhs) // difference
    {
        m_data ^= rhs.m_data;
        return *this;
    }

    // bitwise and operator, resets all bits that are not in rhs and leaves
    // all others unchanged
    wxBitset &operator &=(const wxBitset &rhs) // intersection
    {
        m_data &= rhs.m_data;
        return *this;
    }

    // bitwise or operator, returns a new bitset that has all bits set that set are in
    // bitset2 or in this bitset
    wxBitset operator |(const wxBitset &bitset2) const // union
    {
        wxBitset<T> s;
        s.m_data = m_data | bitset2.m_data;
        return s;
    }

    // bitwise exclusive-or operator, returns a new bitset that has all bits set that are set either in
    // bitset2 or in this bitset but not in both
    wxBitset operator ^(const wxBitset &bitset2) const // difference
    {
        wxBitset<T> s;
        s.m_data = m_data ^ bitset2.m_data;
        return s;
    }

    // bitwise and operator, returns a new bitset that has all bits set that are set both in
    // bitset2 and in this bitset
    wxBitset operator &(const wxBitset &bitset2) const // intersection
    {
        wxBitset<T> s;
        s.m_data = m_data & bitset2.m_data;
        return s;
    }

    // sets appropriate the bit to true
    wxBitset& set(const T el) //Add element
    {
        m_data |= 1 << el;
        return *this;
    }

    // clears the appropriate flag to false
    wxBitset& reset(const T el) //remove element
    {
        m_data &= ~(1 << el);
        return *this;
    }

    // clear all flags
    wxBitset& reset()
    {
        m_data = 0;
        return *this;
    }

    // true if this flag is set
    bool test(const T el) const
    {
        return (m_data & (1 << el)) ? true : false;
    }

    // true if no flag is set
    bool none() const
    {
        return m_data == 0;
    }

    // true if any flag is set
    bool any() const
    {
        return m_data != 0;
    }

    // true if both have the same flags
    bool operator ==(const wxBitset &rhs) const
    {
        return m_data == rhs.m_data;
    }

    // true if both differ in their flags set
    bool operator !=(const wxBitset &rhs) const
    {
        return !operator==(rhs);
    }

    bool operator[] (const T el) const { return test(el) ; }

private :
    unsigned long m_data;
};

#if wxUSE_EXTENDED_RTTI

#define wxDEFINE_FLAGS( flags ) \
    class WXDLLIMPEXP_BASE flags \
    {\
    public : \
        flags(long data=0) :m_data(data) {} \
        long m_data ;\
        bool operator ==(const flags &rhs) const { return m_data == rhs.m_data; }\
    } ;

#else

#define wxDEFINE_FLAGS( flags )

#endif

#if WXWIN_COMPATIBILITY_2_8
    #define WX_DEFINE_FLAGS     wxDEFINE_FLAGS
#endif

#endif