SourceLoader.h 686 Bytes
Newer Older
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
#pragma once

#include "Precompiled.h"
#include "Symbols.h"

struct LoadResult
{
    QString loadedFileName;
    int loadedFrom;
    QString source;
    QStringList percents;
    bool loaded;
};

class SourceLoader : public QObject
{
    Q_OBJECT
public:
    explicit SourceLoader(uint32_t totalSamples, const FileProfile& fileProfile);
    ~SourceLoader();

    QFuture<LoadResult> load(const QString& fname, int lineFrom, int lineTo);

    SymbolPtr findSymbol(const QString& fname, int line) const;

private:
    uint32_t totalSamples;
    FileProfile fileProfile;
29 30 31 32

    QString vs2013;
    QString vs2015;
    QString sdk10;
33 34 35
};

typedef QSharedPointer<SourceLoader> SourceLoaderPtr;