|
Study Dungeon
1.0.0
A group project for COSC345
|
Functions and classes relating to flashcards. More...
#include "deck.h"Functions | |
| CardDifficulty | strToCardDifficulty (const std::string &difficultyStr) |
| Converts a string into the CardDifficulty enum. More... | |
| std::string | cardDifficultyToStr (const CardDifficulty &difficulty) |
| Converts the card difficulty from enum to a string. More... | |
| FlashCardDeck | readFlashCardDeck (fs::path deck_file) |
| bool | writeFlashCardDeck (const FlashCardDeck &deck, fs::path filename) |
| bool | writeFlashCardDeckWithChecks (const FlashCardDeck &deck, fs::path filename, bool force_overwrite=false) |
| std::vector< FlashCardDeck > | loadFlashCardDecks (fs::path deck_dir_path) |
| std::vector< FlashCardDeck > | createExampleDecks () |
| Create example deck files. More... | |
| std::filesystem::path | createDeckFilename (std::filesystem::path deck_dir) |
| Prompt the user for name of the file to save the deckfile to. More... | |
| bool | updateDeckFile (FlashCardDeck &deck_to_update) |
| Updates an existing FlashCardDeck on file. More... | |
Functions and classes relating to flashcards.
| std::string cardDifficultyToStr | ( | const CardDifficulty & | difficulty | ) |
Converts the card difficulty from enum to a string.
| difficulty | The CardDifficulty |
| std::filesystem::path createDeckFilename | ( | std::filesystem::path | deck_dir | ) |
Prompt the user for name of the file to save the deckfile to.
| deck_dir | Directory to append the filename to |
| std::vector<FlashCardDeck> createExampleDecks | ( | ) |
Create example deck files.
A helper function that will create some example deck files if no decks exist.
| FlashCardDeck readFlashCardDeck | ( | fs::path | deck_file | ) |
The flashcard deck to store the flashcards in as read from the file
| CardDifficulty strToCardDifficulty | ( | const std::string & | difficultyStr | ) |
Converts a string into the CardDifficulty enum.
"EASY" -> EASY "MEDIUM" -> MEDIUM "HARD" -> HARD Anything else is converted to UNKNOWN
| difficultyStr | The card difficulty as a string |
| bool updateDeckFile | ( | FlashCardDeck & | deck_to_update | ) |
Updates an existing FlashCardDeck on file.
| deck_to_update | FlashCardDeck to write to file |