yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
project_graph_tool.h
Go to the documentation of this file.
1#ifndef YAZE_CLI_SERVICE_AGENT_TOOLS_PROJECT_GRAPH_TOOL_H_
2#define YAZE_CLI_SERVICE_AGENT_TOOLS_PROJECT_GRAPH_TOOL_H_
3
4#include <string>
5#include <vector>
6
7#include "absl/status/status.h"
10#include "core/project.h" // For YazeProject
11#include "core/asar_wrapper.h" // For AsarWrapper
12
13namespace yaze {
14namespace cli {
15namespace agent {
16namespace tools {
17
28 public:
29 ProjectGraphTool() = default;
30 ~ProjectGraphTool() override = default;
31
32 std::string GetName() const override { return "project-graph"; }
33 std::string GetUsage() const override {
34 return "project-graph --query=<info|files|symbols> [--path=<folder>]";
35 }
36 bool RequiresRom() const override { return true; } // Requires ROM to get symbols
37
38 // Override to receive project and asar contexts
39 void SetProjectContext(project::YazeProject* project) override { project_ = project; }
40 void SetAsarWrapper(core::AsarWrapper* asar_wrapper) override { asar_wrapper_ = asar_wrapper; }
41
42 protected:
43 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override;
44 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
45 resources::OutputFormatter& formatter) override;
46
47 private:
48 absl::Status GetProjectInfo(resources::OutputFormatter& formatter) const;
49 absl::Status GetFileStructure(const std::string& path, resources::OutputFormatter& formatter) const;
50 absl::Status GetSymbolTable(resources::OutputFormatter& formatter) const;
51};
52
53} // namespace tools
54} // namespace agent
55} // namespace cli
56} // namespace yaze
57
58#endif // YAZE_CLI_SERVICE_AGENT_TOOLS_PROJECT_GRAPH_TOOL_H_
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:24
Provides the AI agent with structured information about the project.
absl::Status GetProjectInfo(resources::OutputFormatter &formatter) const
void SetProjectContext(project::YazeProject *project) override
Set the YazeProject context. Default implementation does nothing, override if tool needs project info...
void SetAsarWrapper(core::AsarWrapper *asar_wrapper) override
Set the AsarWrapper context. Default implementation does nothing, override if tool needs Asar access.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
absl::Status GetSymbolTable(resources::OutputFormatter &formatter) const
std::string GetName() const override
Get the command name.
std::string GetUsage() const override
Get the command usage string.
absl::Status GetFileStructure(const std::string &path, resources::OutputFormatter &formatter) const
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
Utility for parsing common CLI argument patterns.
Base class for CLI command handlers.
Utility for consistent output formatting across commands.
Modern C++ wrapper for Asar 65816 assembler integration.
Modern project structure with comprehensive settings consolidation.
Definition project.h:84