Backproject
PurposelyBrokenOperation.h
1 #ifndef BACKPROJECT_PURPOSELYBROKENOPERATION_H
2 #define BACKPROJECT_PURPOSELYBROKENOPERATION_H
3 
4 
5 #include "ContextOperation.h"
6 
11 public:
12  bool IsPossible(const Context &context) const;
13  std::string getDescription() const;
19  std::string Perform(Context &context) const;
20 };
21 
22 
23 #endif //BACKPROJECT_PURPOSELYBROKENOPERATION_H
Represents an operation that can be performed based on the 'Context' (This is an abstract class...
Definition: ContextOperation.h:19
std::string Perform(Context &context) const
33% of time, this method works every time.
Definition: PurposelyBrokenOperation.cpp:19
A context; keeps track of overal program state in a way that is easily accessed by multiple functions...
Definition: Context.h:19
std::string getDescription() const
Gives a short (infinitive verb) indication of what the operation does.
Definition: PurposelyBrokenOperation.cpp:15
bool IsPossible(const Context &context) const
Indicates whether the operation can be performed given the current state of affairs.
Definition: PurposelyBrokenOperation.cpp:11
This operation's perform method is 66% likely to throw an exception.
Definition: PurposelyBrokenOperation.h:10