yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::cli::handlers::ToolsExtractGoldenCommandHandler Class Reference

Extract comprehensive golden data from ROM. More...

#include <test_helpers_commands.h>

Inheritance diagram for yaze::cli::handlers::ToolsExtractGoldenCommandHandler:
Collaboration diagram for yaze::cli::handlers::ToolsExtractGoldenCommandHandler:

Public Member Functions

std::string GetName () const override
 Get the command name.
 
std::string GetDescription () const
 
std::string GetUsage () const override
 Get the command usage string.
 
absl::Status ValidateArgs (const resources::ArgumentParser &parser) override
 Validate command arguments.
 
absl::Status Execute (Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
 Execute the command business logic.
 
- 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 Descriptor Describe () const
 Provide metadata for TUI/help summaries.
 
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.
 

Private Member Functions

void WriteHeader (std::ofstream &out, const std::string &rom_path)
 
void WriteBasicROMInfo (std::ofstream &out, Rom &rom)
 
void WriteASMVersionInfo (std::ofstream &out, Rom &rom)
 
void WriteOverworldMapsData (std::ofstream &out, zelda3::Overworld &overworld)
 
void WriteTileData (std::ofstream &out, zelda3::Overworld &overworld)
 
void WriteEntranceData (std::ofstream &out, zelda3::Overworld &overworld)
 
void WriteFooter (std::ofstream &out)
 

Additional Inherited Members

- Protected Member Functions inherited from yaze::cli::resources::CommandHandler
virtual std::string GetDefaultFormat () const
 Get the default output format ("json" or "text")
 
virtual std::string GetOutputTitle () const
 Get the output title for formatting.
 
- Protected Attributes inherited from yaze::cli::resources::CommandHandler
Romrom_ = nullptr
 
project::YazeProjectproject_ = nullptr
 
core::AsarWrapperasar_wrapper_ = nullptr
 

Detailed Description

Extract comprehensive golden data from ROM.

Extracts all overworld-related values for golden data testing. Usage: z3ed tools extract-golden –rom=<path> –output=<path>

Definition at line 91 of file test_helpers_commands.h.

Member Function Documentation

◆ GetName()

std::string yaze::cli::handlers::ToolsExtractGoldenCommandHandler::GetName ( ) const
inlineoverridevirtual

Get the command name.

Override this to provide a unique identifier for the command. This is used for command registration and lookup.

Implements yaze::cli::resources::CommandHandler.

Definition at line 93 of file test_helpers_commands.h.

◆ GetDescription()

std::string yaze::cli::handlers::ToolsExtractGoldenCommandHandler::GetDescription ( ) const
inline

Definition at line 94 of file test_helpers_commands.h.

◆ GetUsage()

std::string yaze::cli::handlers::ToolsExtractGoldenCommandHandler::GetUsage ( ) const
inlineoverridevirtual

Get the command usage string.

Implements yaze::cli::resources::CommandHandler.

Definition at line 97 of file test_helpers_commands.h.

◆ ValidateArgs()

absl::Status yaze::cli::handlers::ToolsExtractGoldenCommandHandler::ValidateArgs ( const resources::ArgumentParser & parser)
inlineoverridevirtual

Validate command arguments.

Override this to check required arguments and perform custom validation. Called before Execute().

Implements yaze::cli::resources::CommandHandler.

Definition at line 101 of file test_helpers_commands.h.

References yaze::cli::resources::ArgumentParser::RequireArgs().

Here is the call graph for this function:

◆ Execute()

absl::Status yaze::cli::handlers::ToolsExtractGoldenCommandHandler::Execute ( Rom * rom,
const resources::ArgumentParser & parser,
resources::OutputFormatter & formatter )
overridevirtual

◆ WriteHeader()

void yaze::cli::handlers::ToolsExtractGoldenCommandHandler::WriteHeader ( std::ofstream & out,
const std::string & rom_path )
private

Definition at line 276 of file test_helpers_commands.cc.

Referenced by Execute().

◆ WriteBasicROMInfo()

void yaze::cli::handlers::ToolsExtractGoldenCommandHandler::WriteBasicROMInfo ( std::ofstream & out,
Rom & rom )
private

Definition at line 292 of file test_helpers_commands.cc.

References yaze::Rom::size(), and yaze::Rom::title().

Referenced by Execute().

Here is the call graph for this function:

◆ WriteASMVersionInfo()

void yaze::cli::handlers::ToolsExtractGoldenCommandHandler::WriteASMVersionInfo ( std::ofstream & out,
Rom & rom )
private

Definition at line 306 of file test_helpers_commands.cc.

References yaze::Rom::ReadByte().

Referenced by Execute().

Here is the call graph for this function:

◆ WriteOverworldMapsData()

void yaze::cli::handlers::ToolsExtractGoldenCommandHandler::WriteOverworldMapsData ( std::ofstream & out,
zelda3::Overworld & overworld )
private

Definition at line 332 of file test_helpers_commands.cc.

References yaze::zelda3::Overworld::overworld_maps().

Referenced by Execute().

Here is the call graph for this function:

◆ WriteTileData()

void yaze::cli::handlers::ToolsExtractGoldenCommandHandler::WriteTileData ( std::ofstream & out,
zelda3::Overworld & overworld )
private

◆ WriteEntranceData()

void yaze::cli::handlers::ToolsExtractGoldenCommandHandler::WriteEntranceData ( std::ofstream & out,
zelda3::Overworld & overworld )
private

Definition at line 377 of file test_helpers_commands.cc.

References yaze::zelda3::Overworld::entrances().

Referenced by Execute().

Here is the call graph for this function:

◆ WriteFooter()

void yaze::cli::handlers::ToolsExtractGoldenCommandHandler::WriteFooter ( std::ofstream & out)
private

Definition at line 400 of file test_helpers_commands.cc.

Referenced by Execute().


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