This change facilitates loading Coati into Coati: * removed error logs for TokenComponent setting * fixed edge checks regarding template stuff * separated CommonSettings to be inherited by Project- and ApplicationSettings for common settings * pluralized SourcePaths setting in xml to allow for loading multiple directories and single files * added CompilerFlags section to settings * passing Compiler arguments to Parser via struct Parser::Arguments * setting -isystem for all header search paths to avoid distinction between "" and <> headers * parsing all headers from the SourcePaths, even the ones that are not included * fixed parsing time measurement and display * added utility.h file for general utility functionality
43 lines
901 B
C++
43 lines
901 B
C++
#ifndef FILE_REGISTER_H
|
|
#define FILE_REGISTER_H
|
|
|
|
#include <map>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "utility/file/FilePath.h"
|
|
|
|
class FileManager;
|
|
|
|
class FileRegister
|
|
{
|
|
public:
|
|
FileRegister(const FileManager* fileManager, const std::vector<FilePath>& filePaths);
|
|
|
|
const FileManager* getFileManager() const;
|
|
|
|
const std::vector<FilePath>& getSourceFilePaths() const;
|
|
std::vector<FilePath> getUnparsedIncludeFilePaths() const;
|
|
|
|
bool includeFileIsParsing(const FilePath& filePath) const;
|
|
bool includeFileIsParsed(const FilePath& filePath) const;
|
|
|
|
void markIncludeFileParsing(const std::string& filePath);
|
|
void markParsingIncludeFilesParsed();
|
|
|
|
private:
|
|
enum ParseState
|
|
{
|
|
STATE_UNPARSED,
|
|
STATE_PARSING,
|
|
STATE_PARSED
|
|
};
|
|
|
|
const FileManager* m_fileManager;
|
|
|
|
std::vector<FilePath> m_sourceFilePaths;
|
|
std::map<FilePath, ParseState> m_includeFilePaths;
|
|
};
|
|
|
|
#endif // FILE_REGISTER_H
|