2 #ifndef BACKPROJECT_CONTEXT_H 3 #define BACKPROJECT_CONTEXT_H 9 #include "Operations/ContextOperation.h" 26 static std::vector<std::shared_ptr<ContextOperation>> operations;
27 std::vector<std::shared_ptr<Image>> Images;
28 std::vector<std::vector<double>> Points;
51 const std::vector<std::shared_ptr<ContextOperation>> &
listOperations()
const;
57 const std::vector<std::shared_ptr<Image>>
listImages()
const;
63 const std::vector<std::vector<double>>
listPoints()
const;
69 void addImage(
const std::shared_ptr<Image> image);
75 void addPoint(
const std::vector<double> point);
92 void Enter(std::ostream &os, std::istream &is);
97 #endif //BACKPROJECT_CONTEXT_H static void registerOperation(std::shared_ptr< ContextOperation > operation)
Adds operations to all contexts.
Definition: Context.cpp:33
const std::vector< std::vector< double > > listPoints() const
Returns the points in the context.
Definition: Context.cpp:48
Represents an operation that can be performed based on the 'Context' (This is an abstract class...
Definition: ContextOperation.h:19
A context; keeps track of overal program state in a way that is easily accessed by multiple functions...
Definition: Context.h:19
const std::vector< std::shared_ptr< ContextOperation > > & listOperations() const
Lists the operations in the context.
Definition: Context.cpp:38
void removeAllPoints()
Removes all of the points in the context.
Definition: Context.cpp:137
const std::vector< std::shared_ptr< Image > > listImages() const
Returns the images that are in the context.
Definition: Context.cpp:43
friend std::ostream & operator<<(std::ostream &os, const Context &context)
Registration of the stream operator as a friend.
Definition: Context.cpp:9
void addImage(const std::shared_ptr< Image > image)
Addsa new image to the context.
Definition: Context.cpp:53
void addPoint(const std::vector< double > point)
Adds a new point to the context.
Definition: Context.cpp:58
void removeAllImages()
Removes all of the images in the context.
Definition: Context.cpp:142
void Enter(std::ostream &os, std::istream &is)
'Enter' the context and let the user interact with it
Definition: Context.cpp:63