Book Shelf
Loading...
Searching...
No Matches
BookFactory Class Reference

The BookFactory class is a factory class for creating Book objects. More...

#include <bookfactory.h>

Public Member Functions

BookcreateBook (const QString &title, const QStringList &authors, const QString &isbn, const QDate &publicationDate)
 Create a Book object.
 

Static Public Member Functions

static BookFactorygetInstance ()
 Get the Instance object.
 

Detailed Description

The BookFactory class is a factory class for creating Book objects.

Member Function Documentation

◆ createBook()

Book * BookFactory::createBook ( const QString & title,
const QStringList & authors,
const QString & isbn,
const QDate & publicationDate )

Create a Book object.

Parameters
titleThe title of the book.
authorsA list of the author(s) of the book.
isbnThe ISBN of the book.
publicationDateThe publication date of the book.
Returns
Book* A pointer to the created Book object.

◆ getInstance()

BookFactory & BookFactory::getInstance ( )
static

Get the Instance object.

This is a singleton class, so this method is used to get the instance of the BookFactory.

Returns
BookFactory& The instance of the BookFactory

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