* overview bundles imitate style of bundled node type * removed bundle for built-in types * show contents of overview bundle in vertical list layouted with new ListLayouter * nodes starting with the same letter are grouped with the letter displayed above * pressing the letter key will scroll to the group * also use this list layouting for namespace & package contents * renamed BucketGrid to BucketLayouter * moved used functions of GraphPostProcessor to GraphViewStyle and removed GraphPostProcessor fortune cookie message = Don't be afraid to take that big step
84 lines
3.2 KiB
C++
84 lines
3.2 KiB
C++
#ifndef STORAGE_ACCESS_H
|
|
#define STORAGE_ACCESS_H
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "utility/types.h"
|
|
#include "utility/file/FileInfo.h"
|
|
#include "utility/file/FilePath.h"
|
|
|
|
#include "data/parser/ParseLocation.h"
|
|
#include "data/graph/Node.h"
|
|
#include "data/search/SearchMatch.h"
|
|
#include "data/ErrorCountInfo.h"
|
|
#include "data/ErrorFilter.h"
|
|
#include "data/ErrorInfo.h"
|
|
#include "data/StorageStats.h"
|
|
|
|
class Graph;
|
|
class TextAccess;
|
|
class TokenLocation;
|
|
class TokenLocationCollection;
|
|
class TokenLocationFile;
|
|
class TimePoint;
|
|
|
|
class StorageAccess
|
|
{
|
|
public:
|
|
virtual ~StorageAccess();
|
|
|
|
virtual Id getIdForNodeWithNameHierarchy(const NameHierarchy& nameHierarchy) const = 0;
|
|
virtual Id getIdForEdge(
|
|
Edge::EdgeType type, const NameHierarchy& fromNameHierarchy, const NameHierarchy& toNameHierarchy) const = 0;
|
|
|
|
virtual NameHierarchy getNameHierarchyForNodeWithId(Id id) const = 0;
|
|
virtual Node::NodeType getNodeTypeForNodeWithId(Id id) const = 0;
|
|
|
|
virtual std::shared_ptr<TokenLocationCollection> getFullTextSearchLocations(
|
|
const std::string& searchTerm, bool caseSensitive) const = 0;
|
|
virtual std::vector<SearchMatch> getAutocompletionMatches(const std::string& query) const = 0;
|
|
virtual std::vector<SearchMatch> getSearchMatchesForTokenIds(const std::vector<Id>& tokenIds) const = 0;
|
|
|
|
virtual std::shared_ptr<Graph> getGraphForAll() const = 0;
|
|
virtual std::shared_ptr<Graph> getGraphForActiveTokenIds(const std::vector<Id>& tokenIds, bool* isActiveNamespace = nullptr) const = 0;
|
|
|
|
virtual std::vector<Id> getActiveTokenIdsForId(Id tokenId, Id* declarationId) const = 0;
|
|
|
|
virtual std::vector<Id> getNodeIdsForLocationIds(const std::vector<Id>& locationIds) const = 0;
|
|
virtual std::vector<Id> getLocalSymbolIdsForLocationIds(const std::vector<Id>& locationIds) const = 0;
|
|
|
|
virtual std::vector<Id> getTokenIdsForMatches(const std::vector<SearchMatch>& matches) const = 0;
|
|
virtual Id getTokenIdForFileNode(const FilePath& filePath) const = 0;
|
|
|
|
virtual std::shared_ptr<TokenLocationCollection> getTokenLocationsForTokenIds(
|
|
const std::vector<Id>& tokenIds) const = 0;
|
|
virtual std::shared_ptr<TokenLocationCollection> getTokenLocationsForLocationIds(
|
|
const std::vector<Id>& locationIds) const = 0;
|
|
virtual std::shared_ptr<TokenLocationFile> getTokenLocationsForFile(const std::string& filePath) const = 0;
|
|
virtual std::shared_ptr<TokenLocationFile> getTokenLocationsForLinesInFile(
|
|
const std::string& filePath, uint firstLineNumber, uint lastLineNumber) const = 0;
|
|
|
|
virtual std::shared_ptr<TokenLocationFile> getCommentLocationsInFile(const FilePath& filePath) const = 0;
|
|
|
|
virtual std::shared_ptr<TextAccess> getFileContent(const FilePath& filePath) const = 0;
|
|
|
|
virtual FileInfo getFileInfoForFilePath(const FilePath& filePath) const = 0;
|
|
virtual std::vector<FileInfo> getFileInfosForFilePaths(const std::vector<FilePath>& filePaths) const = 0;
|
|
|
|
virtual StorageStats getStorageStats() const = 0;
|
|
|
|
virtual ErrorCountInfo getErrorCount() const = 0;
|
|
virtual std::vector<ErrorInfo> getErrors() const = 0;
|
|
|
|
virtual std::shared_ptr<TokenLocationCollection> getErrorTokenLocations(std::vector<ErrorInfo>* errors) const = 0;
|
|
|
|
virtual void setErrorFilter(const ErrorFilter& filter);
|
|
|
|
protected:
|
|
ErrorFilter m_errorFilter;
|
|
};
|
|
|
|
#endif // STORAGE_ACCESS_H
|