RosettaStone::AccountInfo Class Reference
AccountInfo class. More...
#include <Rosetta/Accounts/AccountInfo.hpp>
Public Member Functions | |
| AccountInfo () | |
| Constructs anonymous account. More... | |
| AccountInfo (std::string &&email, std::string &&nickname) | |
| AccountInfo (std::string &&email, std::string &&nickname, std::vector< DeckInfo *> decks) | |
| std::string | GetEmail () const |
| std::string | GetNickname () const |
| std::size_t | GetNumOfDeck () const |
| DeckInfo * | GetDeck (std::size_t idx) const |
| void | ShowDeckList () const |
| Prints a list of decks. More... | |
| bool | CreateDeck (std::string name, CardClass deckClass) |
| bool | DeleteDeck (std::size_t idx) |
Detailed Description
AccountInfo class.
This class stores account information such as e-mail address and nickname. Also, it stores a list of decks. An account can make several decks. This information imports/exports from/to json file.
Constructor & Destructor Documentation
◆ AccountInfo() [1/3]
| RosettaStone::AccountInfo::AccountInfo | ( | ) |
Constructs anonymous account.
◆ AccountInfo() [2/3]
| RosettaStone::AccountInfo::AccountInfo | ( | std::string && | email, |
| std::string && | nickname | ||
| ) |
Constructs account with given email and nickname.
- Parameters
-
email E-mail address of account. nickname Nickname of account.
◆ AccountInfo() [3/3]
| RosettaStone::AccountInfo::AccountInfo | ( | std::string && | email, |
| std::string && | nickname, | ||
| std::vector< DeckInfo *> | decks | ||
| ) |
Constructs account with given email and nickname and fill deck list with decks.
- Parameters
-
email E-mail address of account. nickname Nickname of account. decks A list of decks.
Member Function Documentation
◆ CreateDeck()
| bool RosettaStone::AccountInfo::CreateDeck | ( | std::string | name, |
| CardClass | deckClass | ||
| ) |
Creates a deck with given name and deckClass.
- Parameters
-
name The name of deck. deckClass The class of deck.
- Returns
- true if deck is created successfully, and false otherwise.
◆ DeleteDeck()
| bool RosettaStone::AccountInfo::DeleteDeck | ( | std::size_t | idx | ) |
Deletes a deck at idx.
- Parameters
-
idx Index of decks.
- Returns
- true if deck is deleted successfully, and false otherwise.
◆ GetDeck()
| DeckInfo* RosettaStone::AccountInfo::GetDeck | ( | std::size_t | idx | ) | const |
Returns a pointer to deck at idx.
- Parameters
-
idx Index of decks.
- Returns
- A pointer to deck at
idx.
◆ GetEmail()
| std::string RosettaStone::AccountInfo::GetEmail | ( | ) | const |
Returns e-mail address of account.
- Returns
- E-mail address of account.
◆ GetNickname()
| std::string RosettaStone::AccountInfo::GetNickname | ( | ) | const |
Returns nickname of account.
- Returns
- Nickname of account.
◆ GetNumOfDeck()
| std::size_t RosettaStone::AccountInfo::GetNumOfDeck | ( | ) | const |
Returns the number of decks.
- Returns
- Number of decks.
◆ ShowDeckList()
| void RosettaStone::AccountInfo::ShowDeckList | ( | ) | const |
Prints a list of decks.
The documentation for this class was generated from the following file:
- Rosetta/Accounts/AccountInfo.hpp
1.8.14