载入中...
搜索中...
未找到
ProjectIndexInternal.hpp
浏览该文件的文档.
1#pragma once
2// Internal owning values shared by the scanner and graph projection. No world pointers.
3#include <Poco/Dynamic/Var.h>
4#include <Poco/JSON/Object.h>
5#include <filesystem>
6#include <map>
7#include <memory>
8#include <string>
9#include <vector>
11
13using Object = Poco::JSON::Object;
14struct Function {
15 std::string name, body;
16 unsigned line = 1;
17};
18struct File {
20 std::string hash, text, error;
21 Poco::Dynamic::Var json;
22 std::vector<Function> functions;
23 std::vector<std::string> references;
24};
25using Files = std::map<std::string, std::shared_ptr<const File>>;
26struct Snapshot {
27 bool automatic = false;
30 std::map<std::string, Object::Ptr> nodes;
31 std::vector<Object::Ptr> edges, diagnostics;
32 Object::Ptr stats;
33};
35std::string digest(const std::string& text);
37std::string pathText(const std::filesystem::path& path);
39inline std::filesystem::path sourcePath(const std::string& text) {
40 return std::filesystem::path(std::u8string(text.begin(), text.end()));
41}
43Files scan(const std::filesystem::path& root, const Files& previous, Object::Ptr stats);
45Snapshot project(Files files, Object::Ptr stats, std::string defaultProjectId, std::string projectDir = {});
47void automaticGraph(Snapshot& snapshot, std::string& version);
49std::string requiredString(Object::Ptr object, const std::string& field);
50} // namespace eve::dev::project_index
int root
Definition AnimSmr.cpp:119
std::string name
Definition ECS.cpp:154
std::shared_ptr< const OceanSprayFrame > previous
std::string path
Definition PlayHost.cpp:111
std::vector< EquipmentStat > stats
unsigned line
std::string text
std::string digest
std::string sourcePath
std::string pathText(const std::filesystem::path &path)
UTF-8 source path, including Windows project names.
void automaticGraph(Snapshot &snapshot, std::string &version)
Project typed compiler syntax through generated engine contracts; no project declarations required.
std::map< std::string, std::shared_ptr< const File > > Files
Snapshot project(Files files, Object::Ptr stats, std::string defaultProjectId, std::string projectDir)
Build a candidate evidence graph without touching the published snapshot.
Files scan(const std::filesystem::path &root, const Files &previous, Object::Ptr stats)
Bounded filesystem scan. Parses only changed files; symlinks are excluded.
std::string requiredString(Object::Ptr object, const std::string &field)
Strict source string fields; invalid manifest shapes throw a diagnostic exception.
std::vector< std::string > references
eve::script::ScriptStructure structure
std::map< std::string, Object::Ptr > nodes
std::vector< Object::Ptr > diagnostics
Bounded structural analysis, independent of VM execution and binding resolution.