HuginBase::PTOVariableConverterNoOp Class Reference

Parent class to anything that aids conversion between PTO file variables and the image variables of SrcPanoImg. More...

#include <ImageVariableTranslate.h>

List of all members.

Static Public Member Functions

bool checkApplicability (const std::string name)
 Check if a given pto format variable name applies to this image variable.
template<class T>
double getValueFromVariable (const std::string name, const ImageVariable< T > &var)
 Get a pto format variable's value, given its name and a reference to the variable in SrcPanoImg.
template<class T>
void setValueFromVariable (const std::string name, ImageVariable< T > &var, const double value)
 Set a ImageVariable in SrcPanoImg given the pto format variable.
template<class T>
void addToVariableMap (const ImageVariable< T > &var, VariableMap &map)
 Add all PTO format variables specifed by an image variable in SrcPanoImg to a VariableMap.


Detailed Description

Parent class to anything that aids conversion between PTO file variables and the image variables of SrcPanoImg.

Although this class doesn't really do anything itself, it will be used when the variable in SrcPanoImg is not written to a file.

We derive children of these to handle more specific cases, which are usually templates to handle similar things (e.g. all vectors) We then typedef to make a convertor for each variable in SrcPanoImg.

Definition at line 41 of file ImageVariableTranslate.h.


Member Function Documentation

template<class T>
void HuginBase::PTOVariableConverterNoOp::addToVariableMap const ImageVariable< T > &  var,
VariableMap map
[inline, static]
 

Add all PTO format variables specifed by an image variable in SrcPanoImg to a VariableMap.

Parameters:
var The image variable used in SrcPanoImg to get values from.
map The VariableMap T The template parameter of ImageVariable var.

Definition at line 105 of file ImageVariableTranslate.h.

bool HuginBase::PTOVariableConverterNoOp::checkApplicability const std::string  name  )  [inline, static]
 

Check if a given pto format variable name applies to this image variable.

Returns:
true if we can handle this variable name, false otherwise.
Parameters:
name The code used to identify the variable in the PTO file format. For example "Eev".

Definition at line 51 of file ImageVariableTranslate.h.

template<class T>
double HuginBase::PTOVariableConverterNoOp::getValueFromVariable const std::string  name,
const ImageVariable< T > &  var
[inline, static]
 

Get a pto format variable's value, given its name and a reference to the variable in SrcPanoImg.

It is a precondition of this function that the checkApplicability function returns true when passed name.

Returns:
0 in this case, but child objects should return the value to write in a pto file for this variable.
Parameters:
name The code used to identify the variable in the PTO file format. For example "Eev".
var Some ImageVariable used by SrcPanoImg to hold this variable. T the template parameter of the ImageVariable var.

Definition at line 70 of file ImageVariableTranslate.h.

template<class T>
void HuginBase::PTOVariableConverterNoOp::setValueFromVariable const std::string  name,
ImageVariable< T > &  var,
const double  value
[inline, static]
 

Set a ImageVariable in SrcPanoImg given the pto format variable.

It is a precondition of this function that the checkApplicability function returns true when passed name.

Parameters:
name The name used in the PTO format image variable.
var The image variable used in SrcPanoImg to change.
value The value specified in the PTO format image variable. T The template parameter of ImageVariable var.

Definition at line 89 of file ImageVariableTranslate.h.


The documentation for this class was generated from the following file:
Generated on Wed Jul 30 01:25:55 2014 for Hugintrunk by  doxygen 1.3.9.1