CardGame
Rogue-like card videogame
Loading...
Searching...
No Matches
ICardFactory Class Referenceabstract

Interface for card instance creation. More...

#include <ICardFactory.h>

Inheritance diagram for ICardFactory:
Collaboration diagram for ICardFactory:

Public Member Functions

virtual std::unique_ptr< CardInstancemakeSingleCard (const std::string &cardId) const =0
 Creates a new CardInstance identified by the given card ID.
 
virtual ~ICardFactory ()=default
 Virtual destructor.
 

Detailed Description

Interface for card instance creation.

ICardFactory defines the contract used by runtime systems (e.g., DeckCombat) to create CardInstances without depending on a concrete factory implementation.

Constructor & Destructor Documentation

◆ ~ICardFactory()

virtual ICardFactory::~ICardFactory ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ makeSingleCard()

virtual std::unique_ptr< CardInstance > ICardFactory::makeSingleCard ( const std::string &  cardId) const
pure virtual

Creates a new CardInstance identified by the given card ID.

Parameters
cardIdIdentifier of the card to instantiate.
Returns
Owned CardInstance.

Implemented in CardFactory.


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