Header file corresponding to utilities.cpp and utilities.obj, and containing specifications for the facilities in namespace Scobey. More...
#include <cstdlib>
#include <ctime>
#include <string>
#include <vector>
Go to the source code of this file.
Classes | |
class | Scobey::Menu |
For displaying menus and getting user menu choices in console applications. More... | |
class | Scobey::OperationCounter |
For counting operations performed by an algorithm. More... | |
class | Scobey::RandomGenerator |
For generating pseudorandom integer, real, character and string values. More... | |
class | Scobey::Stopwatch |
For measuring the time taken by an algorithm to perform its task. More... | |
class | Scobey::TextItems |
For displaying on-line help and other text messages in console applications. More... | |
Namespaces | |
Scobey | |
Contains one typedef, eleven named constants, fifteen free functions, and five utility classes. | |
Typedefs | |
typedef char | Scobey::String80 [81] |
Provides a legacy C-string type for holding up to 80 characters of text. More... | |
Functions | |
void | Scobey::ClearScreen (int numLines=25) |
Clears the screen (the default output stream, which is assumed by default to have 25 lines). More... | |
void | Scobey::DisplayOpeningScreen (const string &programmerInfo=DEFAULT_PROGRAMMER_INFO, const string &programInfo=DEFAULT_PROGRAM_INFO, int numBlankLinesBefore=11, int numBlankLinesAfter=12) |
Displays an opening screen for any console program. More... | |
void | Scobey::DisplayTextfile (const string &fileName, int numberOfLinesPerPause=23) |
Displays a file of text numberOfLinesPerPause lines at a time. More... | |
int | Scobey::gcd (int a, int b) |
Finds the greatest common divisor of two nonnegative integers, at least one of which is strictly positive. More... | |
bool | Scobey::isEven (int n) |
Determines if a positive integer is even. More... | |
bool | Scobey::isOdd (int n) |
Determines if a positive integer is odd. More... | |
int | Scobey::numberOfDigits (int n) |
Finds the number of digits in a positive integer. More... | |
void | Scobey::Pause (int indentLevel=0, string message="", int pauseNumber=0) |
Causes the program to pause and wait for the user to press Enter to continue, with default values for the indentation level, the message supplying any additional information to the user, and the pause number. More... | |
void | Scobey::ReadChar (const string &userPrompt, char &charValue) |
Gets a character (char) value from the user. More... | |
void | Scobey::ReadDouble (const string &userPrompt, double &doubleValue) |
Gets a real (double) value from the user. More... | |
void | Scobey::ReadInt (const string &userPrompt, int &intValue) |
Gets an integer (int) value from the user. More... | |
void | Scobey::ReadThisLine (const string &userPrompt, string &lineValue) |
Reads the text entered by a user on the same line as the prompt. More... | |
void | Scobey::ReadNextLine (const string &userPrompt, string &lineValue) |
Reads the text entered by a user on the line following the prompt. More... | |
void | Scobey::ReadString (const string &userPrompt, string &stringValue) |
Gets a whitespace-delimited string value from the user. More... | |
bool | Scobey::userSaysYes (const string &question) |
Gets the user's yes-or-no answer to a single question. More... | |
Variables | |
const string | Scobey::CARD_DECK [] |
Provides 2-character representations of each of the fifty-two cards in a standard deck of cards. More... | |
const string | Scobey::DAYS_OF_THE_WEEK_LONG [] |
Provides full names for days of the week. More... | |
const string | Scobey::DAYS_OF_THE_WEEK_SHORT [] |
Provides 3-letter abbreviations for days of the week. More... | |
const string | Scobey::DEFAULT_PROGRAM_INFO |
Provides a placeholder value for a program title or brief description. More... | |
const string | Scobey::DEFAULT_PROGRAMMER_INFO |
Provides a placeholder value for programmer identification information. More... | |
const string | Scobey::MONTHS_OF_THE_YEAR_LONG [] |
Provides full names for months of the year. More... | |
const string | Scobey::MONTHS_OF_THE_YEAR_SHORT [] |
Provides 3-letter abbreviations for months of the year. More... | |
const string | Scobey::NAMES_3CHAR [] |
Provides fifty 3-character first names, some male and some female, in alphabetical order. More... | |
const string | Scobey::NAMES_FAMILY [] |
Provides 100 family names (surnames), ranked in order of frequency as found in the United States of America. More... | |
const string | Scobey::NAMES_FEMALE [] |
Provides 300 female first names, ranked in order of frequency as found in the United States of America. More... | |
const string | Scobey::NAMES_MALE [] |
A named constant containing 300 male first names, 6 per line, ranked in order of frequency as found in the United States. More... | |
Header file corresponding to utilities.cpp and utilities.obj, and containing specifications for the facilities in namespace Scobey.