A context; keeps track of overal program state in a way that is easily accessed by multiple functions.
More...
#include <Context.h>
|
const std::vector< std::shared_ptr< ContextOperation > > & | listOperations () const |
| Lists the operations in the context. More...
|
|
const std::vector< std::shared_ptr< Image > > | listImages () const |
| Returns the images that are in the context. More...
|
|
const std::vector< std::vector< double > > | listPoints () const |
| Returns the points in the context. More...
|
|
void | addImage (const std::shared_ptr< Image > image) |
| Addsa new image to the context. More...
|
|
void | addPoint (const std::vector< double > point) |
| Adds a new point to the context. More...
|
|
void | removeAllPoints () |
| Removes all of the points in the context.
|
|
void | removeAllImages () |
| Removes all of the images in the context.
|
|
void | Enter (std::ostream &os, std::istream &is) |
| 'Enter' the context and let the user interact with it More...
|
|
|
std::ostream & | operator<< (std::ostream &os, const Context &context) |
| Registration of the stream operator as a friend. More...
|
|
A context; keeps track of overal program state in a way that is easily accessed by multiple functions.
§ addImage()
void Context::addImage |
( |
const std::shared_ptr< Image > |
image | ) |
|
Addsa new image to the context.
- Parameters
-
§ addPoint()
void Context::addPoint |
( |
const std::vector< double > |
point | ) |
|
Adds a new point to the context.
- Parameters
-
§ Enter()
void Context::Enter |
( |
std::ostream & |
os, |
|
|
std::istream & |
is |
|
) |
| |
'Enter' the context and let the user interact with it
- Parameters
-
os | Output stream to use |
is | Input stream to use |
§ listImages()
const std::vector< std::shared_ptr< Image > > Context::listImages |
( |
| ) |
const |
Returns the images that are in the context.
- Returns
- A vector containing shared pointers which keep references to the Images.
§ listOperations()
const std::vector< std::shared_ptr< ContextOperation > > & Context::listOperations |
( |
| ) |
const |
Lists the operations in the context.
- Returns
- a list of the operations inside the context.
§ listPoints()
const std::vector< std::vector< double > > Context::listPoints |
( |
| ) |
const |
Returns the points in the context.
- Returns
- a vector containing all of the points (where a point is represented as a vector of doubles; x,y,z
§ registerOperation()
void Context::registerOperation |
( |
std::shared_ptr< ContextOperation > |
operation | ) |
|
|
static |
Adds operations to all contexts.
Note; user must prevent adding operations twice.
- Parameters
-
operation | operation to add. |
§ operator<<
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const Context & |
context |
|
) |
| |
|
friend |
Registration of the stream operator as a friend.
- Parameters
-
os | the stream instance to stream to |
context | the instance of the context being streamed |
- Returns
- the stream, after it has been used to stream the context.
The documentation for this class was generated from the following files: