This file is indexed.

/usr/include/mamda/MamdaOptionChainView.h is in libmamda-dev 2.2.2.1-10.

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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
/* $Id$
 *
 * OpenMAMA: The open middleware agnostic messaging API
 * Copyright (C) 2011 NYSE Technologies, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA
 */

#ifndef MamdaOptionChainViewH
#define MamdaOptionChainViewH

#include <mamda/MamdaOptionalConfig.h>
#include <mamda/MamdaOptionAtTheMoneyCompareType.h>
#include <mamda/MamdaOptionChainHandler.h>
#include <mamda/MamdaOptionExpirationDateSet.h>

namespace Wombat
{

    /**
     * A class that represents a "view" of a subset of an option chain.
     * The view can be restricted to a percentage or number of strike
     * prices around "the money" as well as to a maximum number of days
     * into the future.  The view will be adjusted to include strike
     * prices within the range as the underlying price moves.  This means
     * that the range of strike prices will change over time.  In order to
     * avoid a "jitter" in the range of strike prices when the underlying
     * price hovers right on the edge of a range boundary, the class also
     * provides a "jitter margin" as some percentage of the underlying
     * price (default is 0.5%).
     */
    class MAMDAOPTExpDLL MamdaOptionChainView : public MamdaOptionChainHandler
    {
    public:
        /**
         * Create a view on the given option chain.  Multiple views are
         * supported on any given option chain.
         *
         * @param chain The <code>MamdaOptionChain</code> on which to provide
         * a view.
         */
        MamdaOptionChainView (MamdaOptionChain& chain);

        /**
         * Destructor.
         */
        virtual ~MamdaOptionChainView ();

        /**
         * Return the symbol for the option chain.
         *
         * @return The symbol for the option chain.
         */
        const char* getSymbol () const;

        /**
         * Set how the underlying price ("at the money") is determined.
         *
         * @param atTheMoneyType The comparator enumeration to determine how at
         * the money is determined.
         * 
         * @see MamdaOptionAtTheMoneyCompareType
         */
        void setAtTheMoneyType (MamdaOptionAtTheMoneyCompareType  atTheMoneyType);

        /**
         * Set the range of strike prices to be included in the view by
         * percentage variation from the underlying price.  The range of
         * strike prices in the view will vary as the underlying varies.
         * The "jitter margin" avoids switching between ranges too often.
         *
         * @param percentMargin Percentage variation the strike price has from the
         * underlying.
         */
        void setStrikeRangePercent (double  percentMargin);

        /**
         * Set the number of strike prices to be included in the view.
         * The "jitter margin" avoids switching between ranges too often.
         *
         * @param number The number of strikes to include in the view.
         */
        void setStrikeRangeNumber (int  number);

        /**
         * Set the range of expiration dates to be included in the view by
         * the maximum number of days until expiration.  Note: a non-zero
         * range overrides a specific number of expirations set by
         * setNumberOfExpirations().
         *
         * @param expirationDays The maximum number of days until expiration.
         */
        void setExpirationRangeDays (int  expirationDays);

        /**
         * Set the number of expiration dates to be included in the view.
         * Note: a non-zero range (set by setExpirationRangeDays())
         * overrides a specific number of expirations.
         *
         * @param numExpirations The number of expiration dates to include in the
         * view.
         */
        void setNumberOfExpirations (int  numExpirations);

        /**
         * Set a "jitter margin" to avoid having the range jump between
         * different strike prices when the underlying price hovers right
         * on the edge of a range boundary.  The underlying is allowed to
         * fluctuate within the jitter margin without the range being
         * reset.  When the underlying moves beyond the jitter margin,
         * the range is reset.
         *
         * @param percentMargin Percentage from the range boundary the underlying
         * price can fluctuate without resetting the range.
         */
        void setJitterMargin (double  percentMargin);

        /**
         * Return whether an option contract falls within this view's
         * parameters.
         *
         * @param contract The contract which is being checked for visibility by
         * the current view.
         */
        bool isVisible (const MamdaOptionContract&  contract) const;

        /**
         * Return the option expiration date set, which contains the
         * subset of strike prices for the view, and the contracts within
         * the strike price.
         *
         * @return The expiration date set for the option.
         */
        const MamdaOptionExpirationDateSet&  getExpireDateSet() const;

        /**
         * Handler option chain recaps and initial values.
         *
         * @param subscription The subscription which received the update.
         * @param listener     The listener instance which invoked this callback.
         * @param msg          The msg which resulted in the callback being
         * invoked.
         * @param chain        The complete option chain.
         */
        void onOptionChainRecap (
            MamdaSubscription*         subscription,
            MamdaOptionChainListener&  listener,
            const MamaMsg&             msg,
            MamdaOptionChain&          chain);

        /**
         * Handler for option chain structural updates.
         *
         * @param subscription  The subscription which received the update.
         * @param listener      The listener instance which invoked this
         * callback.    
         * @param msg           The msg which resulted in the callback being
         * invoked.
         * @param contract      The newly created option contract.
         * @param chain         The complete option chain.
         */
        void onOptionContractCreate (
            MamdaSubscription*         subscription,
            MamdaOptionChainListener&  listener,
            const MamaMsg&             msg,
            MamdaOptionContract&       contract,
            MamdaOptionChain&          chain);

        /**
         * Handler for option chain structural updates.
         *
         * @param subscription The subscription which received the update.
         * @param listener     The listener which invoked this callback.
         * @param msg          The msg which resulted in the callback being
         * invoked.
         * @param event        Access to the series update event details.
         * @param chain        The complete option chain.
         */
        void onOptionSeriesUpdate (
            MamdaSubscription*              subscription,
            MamdaOptionChainListener&       listener,
            const MamaMsg&                  msg,
            const MamdaOptionSeriesUpdate&  event,
            MamdaOptionChain&               chain);

        /**
         * Handler for gaps.
         *
         * @param subscription The subscription which received the update.
         * @param listener     The listener which invoked this callback.
         * @param msg          The msg which resulted in the callback being
         * invoked.
         * @param chain        The complete option chain.
         */
        void onOptionChainGap (
            MamdaSubscription*              subscription,
            MamdaOptionChainListener&       listener,
            const MamaMsg&                  msg,
            MamdaOptionChain&               chain);

    private:
        struct MamdaOptionChainViewImpl;
        MamdaOptionChainViewImpl& mImpl;
    };

} // namespace

#endif // MamdaOptionChainViewH