yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::cli::agent::tools::ProjectToolBase Class Reference

Base class for project tools. More...

#include <project_tool.h>

Inherits yaze::cli::resources::CommandHandler.

Inherited by yaze::cli::agent::tools::ProjectDiffTool, yaze::cli::agent::tools::ProjectExportTool, yaze::cli::agent::tools::ProjectImportTool, yaze::cli::agent::tools::ProjectRestoreTool, yaze::cli::agent::tools::ProjectSnapshotTool, and yaze::cli::agent::tools::ProjectStatusTool.

Collaboration diagram for yaze::cli::agent::tools::ProjectToolBase:

Protected Member Functions

absl::StatusOr< ProjectManager * > GetProjectManager (AgentContext *context) const
 Get or create project manager from context.
 
std::string FormatEdits (const std::vector< RomEdit > &edits) const
 Format edit list as text.
 
std::string FormatSnapshot (const ProjectSnapshot &snapshot) const
 Format snapshot info as text.
 
- Protected Member Functions inherited from yaze::cli::resources::CommandHandler
virtual absl::Status ValidateArgs (const ArgumentParser &parser)=0
 Validate command arguments.
 
virtual absl::Status Execute (Rom *rom, const ArgumentParser &parser, OutputFormatter &formatter)=0
 Execute the command business logic.
 
virtual std::string GetDefaultFormat () const
 Get the default output format ("json" or "text")
 
virtual std::string GetOutputTitle () const
 Get the output title for formatting.
 

Additional Inherited Members

- Public Member Functions inherited from yaze::cli::resources::CommandHandler
virtual ~CommandHandler ()=default
 
absl::Status Run (const std::vector< std::string > &args, Rom *rom_context, std::string *captured_output=nullptr)
 Execute the command.
 
virtual std::string GetName () const =0
 Get the command name.
 
virtual Descriptor Describe () const
 Provide metadata for TUI/help summaries.
 
virtual std::string GetUsage () const =0
 Get the command usage string.
 
virtual bool RequiresRom () const
 Check if the command requires a loaded ROM.
 
virtual bool RequiresLabels () const
 Check if the command requires ROM labels.
 
virtual void SetProjectContext (project::YazeProject *project)
 Set the YazeProject context. Default implementation does nothing, override if tool needs project info.
 
virtual void SetAsarWrapper (core::AsarWrapper *asar_wrapper)
 Set the AsarWrapper context. Default implementation does nothing, override if tool needs Asar access.
 
virtual void SetRomContext (Rom *rom)
 Set the ROM context for tools that need ROM access. Default implementation stores the ROM pointer for subclass use.
 
- Protected Attributes inherited from yaze::cli::resources::CommandHandler
Romrom_ = nullptr
 
project::YazeProjectproject_ = nullptr
 
core::AsarWrapperasar_wrapper_ = nullptr
 

Detailed Description

Base class for project tools.

Definition at line 226 of file project_tool.h.

Member Function Documentation

◆ GetProjectManager()

◆ FormatEdits()

std::string yaze::cli::agent::tools::ProjectToolBase::FormatEdits ( const std::vector< RomEdit > & edits) const
protected

Format edit list as text.

Definition at line 641 of file project_tool.cc.

◆ FormatSnapshot()


The documentation for this class was generated from the following files: