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

Room census: owner, FREE / RECLAIMABLE / IN USE status and reasons for rooms 0x000-0x127. Backed by zelda3::ComputeRoomCensus, the same model as the Room Matrix "Census" overlay. More...

#include <dungeon_census_commands.h>

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

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.
 
virtual void SetAssemblySymbolTable (const std::map< std::string, core::AsarSymbol > *table)
 Optional Asar symbol table for assembly-aware tools.
 
virtual void SetSymbolProvider (emu::debug::SymbolProvider *provider)
 Set the SymbolProvider context.
 

Additional Inherited Members

- Protected Member Functions inherited from yaze::cli::resources::CommandHandler
virtual absl::Status ExecuteWithContext (Rom *rom, const ArgumentParser &parser, OutputFormatter &formatter, const CommandInvocationContext &invocation_context)
 Execute with immutable, invocation-scoped ROM path identity.
 
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
Rom * rom_ = nullptr
 
emu::debug::SymbolProvider * symbol_provider_ = nullptr
 
project::YazeProject * project_ = nullptr
 
core::AsarWrapper * asar_wrapper_ = nullptr
 
const std::map< std::string, core::AsarSymbol > * assembly_symbol_table_
 

Detailed Description

Room census: owner, FREE / RECLAIMABLE / IN USE status and reasons for rooms 0x000-0x127. Backed by zelda3::ComputeRoomCensus, the same model as the Room Matrix "Census" overlay.

Definition at line 27 of file dungeon_census_commands.h.

Member Function Documentation

◆ GetName()

std::string yaze::cli::handlers::DungeonRoomCensusCommandHandler::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 29 of file dungeon_census_commands.h.

◆ GetDescription()

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

Definition at line 30 of file dungeon_census_commands.h.

◆ GetUsage()

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

Get the command usage string.

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

Definition at line 34 of file dungeon_census_commands.h.

◆ ValidateArgs()

absl::Status yaze::cli::handlers::DungeonRoomCensusCommandHandler::ValidateArgs ( const resources::ArgumentParser & parser)
overridevirtual

Validate command arguments.

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

Definition at line 164 of file dungeon_census_commands.cc.

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

Here is the call graph for this function:

◆ Execute()

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

Execute the command business logic.

Override this to implement command-specific functionality. The ROM is guaranteed to be loaded and labels initialized.

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

Definition at line 176 of file dungeon_census_commands.cc.

References yaze::cli::resources::OutputFormatter::AddArrayItem(), yaze::cli::resources::OutputFormatter::AddField(), yaze::cli::resources::OutputFormatter::AddHexField(), yaze::cli::resources::OutputFormatter::AddRawJsonField(), yaze::cli::resources::OutputFormatter::AddRawText(), yaze::cli::resources::OutputFormatter::BeginArray(), yaze::cli::resources::OutputFormatter::BeginObject(), yaze::zelda3::ComputeRoomCensus(), yaze::zelda3::ComputeRoomFingerprints(), yaze::cli::resources::OutputFormatter::EndArray(), yaze::cli::resources::OutputFormatter::EndObject(), yaze::zelda3::RoomCensus::expanded_entrance_tables, yaze::Rom::filename(), yaze::zelda3::FormatVanillaFingerprintTable(), yaze::zelda3::RoomCensus::free_clusters, yaze::zelda3::RoomCensus::free_count, yaze::cli::resources::ArgumentParser::GetString(), yaze::zelda3::RoomCensus::has_vanilla_baseline, yaze::zelda3::RoomCensus::in_use_count, yaze::zelda3::RoomCensus::interior_count, yaze::zelda3::kFree, yaze::zelda3::kInUse, yaze::zelda3::kReclaimable, yaze::zelda3::kRoomCensusRoomCount, yaze::Rom::LoadFromFile(), yaze::cli::handlers::LoadRoomCensusProject(), yaze::zelda3::RoomCensusOptions::manifest, yaze::zelda3::RoomCensus::orphan_count, yaze::zelda3::RoomCensus::owners, yaze::zelda3::RoomCensus::owners_from_project, yaze::zelda3::RoomCensusOptions::project, yaze::core::HackManifest::project_registry(), yaze::zelda3::RoomCensus::reclaimable_count, yaze::zelda3::RoomCensusStatusName(), yaze::zelda3::RoomReferenceKindName(), yaze::zelda3::RoomCensus::rooms, yaze::Rom::size(), yaze::zelda3::RoomCensus::vanilla_baseline_source, and yaze::zelda3::RoomCensusOptions::vanilla_rom.


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