⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msvc_objectmodel.h

📁 奇趣公司比较新的qt/emd版本
💻 H
📖 第 1 页 / 共 3 页
字号:
class VCEventTool : public VCToolBase{protected:    // Functions    VCEventTool() : ExcludedFromBuild(unset){};    virtual ~VCEventTool(){}    bool parseOption(const char*){ return false; };public:    // Variables    QString                 CommandLine;    QString                 Description;    triState                ExcludedFromBuild;    QString                 ToolName;    QString                 ToolPath;};class VCPostBuildEventTool : public VCEventTool{public:    VCPostBuildEventTool();    ~VCPostBuildEventTool(){}};class VCPreBuildEventTool : public VCEventTool{public:    VCPreBuildEventTool();    ~VCPreBuildEventTool(){}};class VCPreLinkEventTool : public VCEventTool{public:    VCPreLinkEventTool();    ~VCPreLinkEventTool(){}};class VCConfiguration{public:    // Functions    VCConfiguration();    ~VCConfiguration(){}    DotNET                  CompilerVersion;    // Variables    triState                ATLMinimizesCRunTimeLibraryUsage;    triState                BuildBrowserInformation;    charSet                 CharacterSet;    ConfigurationTypes      ConfigurationType;    QString                 DeleteExtensionsOnClean;    QString                 ImportLibrary;    QString                 IntermediateDirectory;    QString                 Name;    QString                 OutputDirectory;    QString                 PrimaryOutput;    QString                 ProgramDatabase;    triState                RegisterOutput;    useOfATL                UseOfATL;    useOfMfc                UseOfMfc;    triState                WholeProgramOptimization;    // XML sub-parts    VCCLCompilerTool        compiler;    VCLinkerTool            linker;    VCLibrarianTool         librarian;    VCCustomBuildTool       custom;    VCMIDLTool              idl;    VCPostBuildEventTool    postBuild;    VCPreBuildEventTool     preBuild;    VCPreLinkEventTool      preLink;    VCResourceCompilerTool  resource;};struct VCFilterFile{    VCFilterFile()    { excludeFromBuild = false; }    VCFilterFile(const QString &filename, bool exclude = false )    { file = filename; excludeFromBuild = exclude; }    VCFilterFile(const QString &filename, const QString &additional, bool exclude = false )    { file = filename; excludeFromBuild = exclude; additionalFile = additional; }    bool operator==(const VCFilterFile &other){        return file == other.file               && additionalFile == other.additionalFile               && excludeFromBuild == other.excludeFromBuild;    }    bool                    excludeFromBuild;    QString                 file;    QString                 additionalFile; // For tools like MOC};#ifndef QT_NO_DEBUG_OUTPUTinline QDebug operator<<(QDebug dbg, const VCFilterFile &p){    dbg.nospace() << "VCFilterFile(file(" << p.file                  << ") additionalFile(" << p.additionalFile                  << ") excludeFromBuild(" << p.excludeFromBuild << "))" << endl;    return dbg.space();}#endifclass VcprojGenerator;class VCFilter{public:    // Functions    VCFilter();    ~VCFilter(){};    void addFile(const QString& filename);    void addFile(const VCFilterFile& fileInfo);    void addFiles(const QStringList& fileList);    void addMOCstage(const VCFilterFile &str, bool hdr);    bool addExtraCompiler(const VCFilterFile &info);    void modifyPCHstage(QString str);    void outputFileConfig(XmlOutput &xml, const QString &filename);    // Variables    QString                 Name;    QString                 Filter;    QString                 Guid;    triState                ParseFiles;    VcprojGenerator*        Project;    VCConfiguration*        Config;    QList<VCFilterFile>     Files;    customBuildCheck	    CustomBuild;    QString                 customMocArguments;    bool		    useCustomBuildTool;    VCCustomBuildTool       CustomBuildTool;    bool                    useCompilerTool;    VCCLCompilerTool        CompilerTool;private:    friend XmlOutput &operator<<(XmlOutput &xml, VCFilter &tool);};typedef QList<VCFilter> VCFilterList;class VCProjectSingleConfig{public:    enum FilterTypes {        None,        Source,        Header,        Generated,        LexYacc,        Translation,        Resources,        Extras    };    // Functions    VCProjectSingleConfig(){};    ~VCProjectSingleConfig(){}    // Variables    QString                 Name;    QString                 Version;    QString                 ProjectGUID;    QString                 Keyword;    QString                 SccProjectName;    QString                 SccLocalPath;    QString                 PlatformName;    // XML sub-parts    VCConfiguration         Configuration;    VCFilter                RootFiles;    VCFilter                SourceFiles;    VCFilter                HeaderFiles;    VCFilter                GeneratedFiles;    VCFilter                LexYaccFiles;    VCFilter                TranslationFiles;    VCFilter                FormFiles;    VCFilter                ResourceFiles;    VCFilterList            ExtraCompilersFiles;    bool                    flat_files;    // Accessor for extracompilers    VCFilter               &filterForExtraCompiler(const QString &compilerName);};// Tree & Flat view of files --------------------------------------------------class VCFilter;class Node{public:    virtual ~Node() { }    void addElement(const VCFilterFile &file) {        addElement(file.file, file);    }    virtual void addElement(const QString &filepath, const VCFilterFile &allInfo) = 0;    virtual void removeElements()= 0;    virtual void generateXML(XmlOutput &xml, const QString &tagName, VCProject &tool, const QString &filter) = 0;    virtual bool hasElements() = 0;};class TreeNode : public Node{    typedef QMap<QString, TreeNode*> ChildrenMap;    VCFilterFile info;    ChildrenMap children;public:    virtual ~TreeNode() { removeElements(); }    int pathIndex(const QString &filepath) {        int Windex = filepath.indexOf("\\");        int Uindex = filepath.indexOf("/");        if (Windex != -1 && Uindex != -1)            return qMin(Windex, Uindex);        else if (Windex != -1)            return Windex;        return Uindex;    }    void addElement(const QString &filepath, const VCFilterFile &allInfo){        QString newNodeName(filepath);        int index = pathIndex(filepath);        if (index != -1)            newNodeName = filepath.left(index);        TreeNode *n = children.value(newNodeName);        if (!n) {            n = new TreeNode;            n->info = allInfo;            children.insert(newNodeName, n);        }        if (index != -1)            n->addElement(filepath.mid(index+1), allInfo);    }    void removeElements() {        ChildrenMap::ConstIterator it = children.constBegin();        ChildrenMap::ConstIterator end = children.constEnd();        for( ; it != end; it++) {            (*it)->removeElements();            delete it.value();        }        children.clear();    }    void generateXML(XmlOutput &xml, const QString &tagName, VCProject &tool, const QString &filter);    bool hasElements() {        return children.size() != 0;    }};class FlatNode : public Node{    typedef QMap<QString, VCFilterFile> ChildrenMapFlat;    ChildrenMapFlat children;public:    virtual ~FlatNode() { removeElements(); }    int pathIndex(const QString &filepath) {        int Windex = filepath.lastIndexOf("\\");        int Uindex = filepath.lastIndexOf("/");        if (Windex != -1 && Uindex != -1)            return qMax(Windex, Uindex);        else if (Windex != -1)            return Windex;        return Uindex;    }    void addElement(const QString &filepath, const VCFilterFile &allInfo){        QString newKey(filepath);        int index = pathIndex(filepath);        if (index != -1)            newKey = filepath.mid(index+1);        // Key designed to sort files with same        // name in different paths correctly        children.insert(newKey + "\0" + allInfo.file, allInfo);    }    void removeElements() {        children.clear();    }    void generateXML(XmlOutput &xml, const QString &tagName, VCProject &proj, const QString &filter);    bool hasElements() {        return children.size() != 0;    }};// ----------------------------------------------------------------------------class VCProject{public:    // Variables    QString                 Name;    QString                 Version;    QString                 ProjectGUID;    QString                 Keyword;    QString                 SccProjectName;    QString                 SccLocalPath;    QString                 PlatformName;    // Single projects    QList<VCProjectSingleConfig>  SingleProjects;    // List of all extracompilers    QStringList             ExtraCompilers;    // Functions    void                    outputFilter(XmlOutput &xml,//                                         VCProjectSingleConfig::FilterTypes type,                                         const QString &filtername);    void                    outputFileConfigs(XmlOutput &xml,//                                              VCProjectSingleConfig::FilterTypes type,                                              const VCFilterFile &info,                                              const QString &filtername);};XmlOutput &operator<<(XmlOutput &, const VCCLCompilerTool &);XmlOutput &operator<<(XmlOutput &, const VCLinkerTool &);XmlOutput &operator<<(XmlOutput &, const VCMIDLTool &);XmlOutput &operator<<(XmlOutput &, const VCCustomBuildTool &);XmlOutput &operator<<(XmlOutput &, const VCLibrarianTool &);XmlOutput &operator<<(XmlOutput &, const VCResourceCompilerTool &);XmlOutput &operator<<(XmlOutput &, const VCEventTool &);XmlOutput &operator<<(XmlOutput &, const VCConfiguration &);XmlOutput &operator<<(XmlOutput &, VCFilter &);XmlOutput &operator<<(XmlOutput &, const VCProjectSingleConfig &);XmlOutput &operator<<(XmlOutput &, VCProject &);#endif // MSVC_OBJECTMODEL_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -