yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::gui::CardRegistration Class Reference

RAII helper for auto-registering cards. More...

#include <editor_card_manager.h>

Public Member Functions

 CardRegistration ()=default
 
 CardRegistration (const std::string &card_id)
 
 ~CardRegistration ()
 
 CardRegistration (const CardRegistration &)=delete
 
CardRegistrationoperator= (const CardRegistration &)=delete
 
 CardRegistration (CardRegistration &&other) noexcept
 
CardRegistrationoperator= (CardRegistration &&other) noexcept
 

Private Attributes

std::string card_id_
 

Detailed Description

RAII helper for auto-registering cards.

Usage:

class MyEditor {
CardRegistration room_selector_reg_;
MyEditor() {
room_selector_reg_ = RegisterCard({
.card_id = "myeditor.room_selector",
.display_name = "Room Selector",
.visibility_flag = &show_room_selector_
});
}
};
RAII helper for auto-registering cards.
CardRegistration RegisterCard(const CardInfo &info)

Definition at line 163 of file editor_card_manager.h.

Constructor & Destructor Documentation

◆ CardRegistration() [1/4]

yaze::gui::CardRegistration::CardRegistration ( )
default

◆ CardRegistration() [2/4]

yaze::gui::CardRegistration::CardRegistration ( const std::string &  card_id)
inlineexplicit

Definition at line 166 of file editor_card_manager.h.

◆ ~CardRegistration()

yaze::gui::CardRegistration::~CardRegistration ( )
inline

Definition at line 168 of file editor_card_manager.h.

References card_id_, yaze::gui::EditorCardManager::Get(), and yaze::gui::EditorCardManager::UnregisterCard().

Here is the call graph for this function:

◆ CardRegistration() [3/4]

yaze::gui::CardRegistration::CardRegistration ( const CardRegistration )
delete

◆ CardRegistration() [4/4]

yaze::gui::CardRegistration::CardRegistration ( CardRegistration &&  other)
inlinenoexcept

Definition at line 177 of file editor_card_manager.h.

Member Function Documentation

◆ operator=() [1/2]

CardRegistration & yaze::gui::CardRegistration::operator= ( const CardRegistration )
delete

◆ operator=() [2/2]

CardRegistration & yaze::gui::CardRegistration::operator= ( CardRegistration &&  other)
inlinenoexcept

Definition at line 180 of file editor_card_manager.h.

References card_id_.

Member Data Documentation

◆ card_id_

std::string yaze::gui::CardRegistration::card_id_
private

Definition at line 189 of file editor_card_manager.h.

Referenced by operator=(), and ~CardRegistration().


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