7#ifndef __STRATEGY_SHOWENTRIES_H__
8#define __STRATEGY_SHOWENTRIES_H__
10#include "helpers/formatstring.h"
84 std::vector<EntryInformation> localEntries(
entries);
static EntryInformation entries[]
List of individuals to play around with in the Strategy exercise.
Declaration of the Strategy_SortEntries_ClassFactory class and implementation of the various Strategy...
Represents a way of displaying a list of EntryInformation objects in a particular order....
ISortEntries::shared_ptr_t _sortEntries
The sorting strategy to use.
Strategy_ShowEntries_Class(SortOptions sortOption, bool reversedSort)
Constructor.
bool _reversedSort
Whether to reverse the normal order of the sort.
void ShowEntries(const std::vector< EntryInformation > &entries)
Display the specified entries in sorted order. The order of the sort was established when the Strateg...
static ISortEntries::shared_ptr_t Create(SortOptions sortOption, bool reversedSort)
Generate an instance of a sorting strategy based on the given sorting option and reversed sort flag....
The namespace containing all Design Pattern Examples implemented in C++.
SortOptions
Identifies the different sorting strategies available.
std::string formatstring(const char *fmt,...)
Use the given string and arguments to return a buffer containing the formatted string....
Represents an individual with a Name, Age, and Height.
std::shared_ptr< ISortEntries > shared_ptr_t
Alias to make it easier to work with a shared pointer.