This file is indexed.

/usr/include/vector.h is in libdewalls-dev 1.0.0+ds1-4ubuntu1.

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
#ifndef DEWALLS_VECTOR_H
#define DEWALLS_VECTOR_H

#include "unitizeddouble.h"
#include "segment.h"
#include "length.h"
#include "angle.h"
#include "varianceoverride.h"
#include <QSharedData>
#include <QSharedDataPointer>
#include <QSharedPointer>
#include <QString>
#include <QDate>
#include "wallsunits.h"
#include "dewallsexport.h"

namespace dewalls {

class VectorData : public QSharedData
{
public:
    typedef UnitizedDouble<Length> ULength;
    typedef UnitizedDouble<Angle> UAngle;
    typedef QSharedPointer<VarianceOverride> VarianceOverridePtr;

    inline VectorData()
        : QSharedData(),
          sourceSegment(),
          from(),
          to(),
          distance(),
          frontAzimuth(),
          backAzimuth(),
          frontInclination(),
          backInclination(),
          instHeight(),
          targetHeight(),
          north(),
          east(),
          rectUp(),
          horizVariance(),
          vertVariance(),
          left(),
          right(),
          up(),
          down(),
          lrudAngle(),
          cFlag(false),
          segment(),
          comment(),
          date(),
          units() { }

    Segment sourceSegment;
    QString from;
    QString to;
    ULength distance;
    UAngle frontAzimuth;
    UAngle backAzimuth;
    UAngle frontInclination;
    UAngle backInclination;
    ULength instHeight;
    ULength targetHeight;
    ULength north;
    ULength east;
    ULength rectUp;
    VarianceOverridePtr horizVariance;
    VarianceOverridePtr vertVariance;
    ULength left;
    ULength right;
    ULength up;
    ULength down;
    UAngle lrudAngle;
    bool cFlag;
    QStringList segment;
    QString comment;
    QDate date;
    WallsUnits units;
};

class DEWALLS_LIB_EXPORT Vector
{
public:
    typedef UnitizedDouble<Length> ULength;
    typedef UnitizedDouble<Angle> UAngle;
    typedef QSharedPointer<VarianceOverride> VarianceOverridePtr;

    inline Vector() { d = new VectorData; }
    inline Vector(const Vector& other) : d(other.d) { }

    inline Segment sourceSegment() const { return d->sourceSegment; }
    inline QString from() const { return d->from; }
    inline QString to() const { return d->to; }
    inline ULength distance() const { return d->distance; }
    inline UAngle frontAzimuth() const { return d->frontAzimuth; }
    inline UAngle backAzimuth() const { return d->backAzimuth; }
    inline UAngle frontInclination() const { return d->frontInclination; }
    inline UAngle backInclination() const { return d->backInclination; }
    inline ULength instHeight() const { return d->instHeight; }
    inline ULength targetHeight() const { return d->targetHeight; }
    inline ULength north() const { return d->north; }
    inline ULength east() const { return d->east; }
    inline ULength rectUp() const { return d->rectUp; }
    inline VarianceOverridePtr horizVariance() const { return d->horizVariance; }
    inline VarianceOverridePtr vertVariance() const { return d->vertVariance; }
    inline ULength left() const { return d->left; }
    inline ULength right() const { return d->right; }
    inline ULength up() const { return d->up; }
    inline ULength down() const { return d->down; }
    inline UAngle lrudAngle() const { return d->lrudAngle; }
    inline bool cFlag() const { return d->cFlag; }
    inline QStringList segment() const { return d->segment; }
    inline QString comment() const { return d->comment; }
    inline QDate date() const { return d->date; }
    inline WallsUnits units() const { return d->units; }

    inline void setSourceSegment(Segment sourceSegment) { d->sourceSegment = sourceSegment; }
    inline void setFrom(QString from) { d->from = from; }
    inline void setTo(QString to) { d->to = to; }
    inline void setDistance(ULength distance) { d->distance = distance; }
    inline void setFrontAzimuth(UAngle frontAzimuth) { d->frontAzimuth = frontAzimuth; }
    inline void setBackAzimuth(UAngle backAzimuth) { d->backAzimuth = backAzimuth; }
    inline void setFrontInclination(UAngle frontInclination) { d->frontInclination = frontInclination; }
    inline void setBackInclination(UAngle backInclination) { d->backInclination = backInclination; }
    inline void setInstHeight(ULength instHeight) { d->instHeight = instHeight; }
    inline void setTargetHeight(ULength targetHeight) { d->targetHeight = targetHeight; }
    inline void setNorth(ULength north) { d->north = north; }
    inline void setEast(ULength east) { d->east = east; }
    inline void setRectUp(ULength rectUp) { d->rectUp = rectUp; }
    inline void setHorizVariance(VarianceOverridePtr horizVariance) { d->horizVariance = horizVariance; }
    inline void setVertVariance(VarianceOverridePtr vertVariance) { d->vertVariance = vertVariance; }
    inline void setLeft(ULength left) { d->left = left; }
    inline void setRight(ULength right) { d->right = right; }
    inline void setUp(ULength up) { d->up = up; }
    inline void setDown(ULength down) { d->down = down; }
    inline void setLrudAngle(UAngle lrudAngle) { d->lrudAngle = lrudAngle; }
    inline void setCFlag(bool cFlag) { d->cFlag = cFlag; }
    inline void setSegment(QStringList segment) { d->segment = segment; }
    inline void setComment(QString comment) { d->comment = comment; }
    inline void setDate(QDate date) { d->date = date; }
    inline void setUnits(WallsUnits units) { d->units = units; }

    ///
    /// \brief derives compass-and-tape measurements from the rect measurements.
    ///
    void deriveCtFromRect();
    ///
    /// \brief calculates the vector offset including instrument and target heights and Walls INCH
    /// correction, rederives the distance and inclinations from that offset, and clears the instrument
    /// and target heights.  This is for programs that don't store instrument and target heights or
    /// something like INCH internally.
    /// \return true iff height corrections were applied
    ///
    bool applyHeightCorrections();
    bool isVertical();

private:
    QSharedDataPointer<VectorData> d;
};

} // namespace dewalls

//Q_DECLARE_METATYPE(dewalls::Vector)

#endif // DEWALLS_VECTOR_H