Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | List of all members
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>

Static Public Member Functions

static bool checkApplicability (const std::string &name)
 Check if a given pto format variable name applies to this image variable. More...
 
template<class T >
static 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. More...
 
template<class T >
static void setValueFromVariable (const std::string &name, ImageVariable< T > &var, const double value)
 Set a ImageVariable in SrcPanoImg given the pto format variable. More...
 
template<class T >
static void addToVariableMap (const ImageVariable< T > &var, VariableMap &map)
 Add all PTO format variables specifed by an image variable in SrcPanoImg to a VariableMap. More...
 

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 >
static void HuginBase::PTOVariableConverterNoOp::addToVariableMap ( const ImageVariable< T > &  var,
VariableMap map 
)
inlinestatic

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

Parameters
varThe image variable used in SrcPanoImg to get values from.
mapThe VariableMap
Template Parameters
TThe template parameter of ImageVariable var.

Definition at line 105 of file ImageVariableTranslate.h.

static bool HuginBase::PTOVariableConverterNoOp::checkApplicability ( const std::string &  name)
inlinestatic

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
nameThe 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 >
static double HuginBase::PTOVariableConverterNoOp::getValueFromVariable ( const std::string &  name,
const ImageVariable< T > &  var 
)
inlinestatic

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
nameThe code used to identify the variable in the PTO file format. For example "Eev".
varSome ImageVariable used by SrcPanoImg to hold this variable.
Template Parameters
Tthe template parameter of the ImageVariable var.

Definition at line 70 of file ImageVariableTranslate.h.

template<class T >
static void HuginBase::PTOVariableConverterNoOp::setValueFromVariable ( const std::string &  name,
ImageVariable< T > &  var,
const double  value 
)
inlinestatic

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
nameThe name used in the PTO format image variable.
varThe image variable used in SrcPanoImg to change.
valueThe value specified in the PTO format image variable.
Template Parameters
TThe template parameter of ImageVariable var.

Definition at line 89 of file ImageVariableTranslate.h.


The documentation for this class was generated from the following file: