Skip to content

Commit

Permalink
refs #4401 Trying to fix Unix error
Browse files Browse the repository at this point in the history
with template overloading/inheritance
  • Loading branch information
abuts committed Apr 24, 2012
1 parent afa94ee commit 27843f9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ struct CoordTramsformer
*
* has to be specialized
*/
bool calcGenericVariables(std::vector<coord_t> &Coord, size_t n_ws_variabes);
bool calcGenericVariables(std::vector<coord_t> &Coord, size_t n_ws_variabes)
{
return false;
}



/** template generalizes the code to calculate Y-variables within the detector's loop of processQND workspace
Expand All @@ -74,8 +78,10 @@ struct CoordTramsformer
*
* some default implementations possible (e.g mode Q3D,ragged Any_Mode( Direct, indirect,elastic),
*/
bool calcYDepCoordinatese(std::vector<coord_t> &Coord,size_t i);

bool calcYDepCoordinatese(std::vector<coord_t> &Coord,size_t i)
{
return false;
}
/** template generalizes the code to calculate all remaining coordinates, defined within the inner loop
* @param X -- vector of X workspace values
* @param i -- index of external loop, identifying generic y-coordinate
Expand All @@ -86,7 +92,10 @@ struct CoordTramsformer
*
* has to be specialized
*/
bool calcMatrixCoord(const MantidVec& X,size_t i,size_t j,std::vector<coord_t> &Coord)const;
bool calcMatrixCoord(const MantidVec& X,size_t i,size_t j,std::vector<coord_t> &Coord)const
{
return false;
}

/** template generalizes the code to calculate all remaining coordinates, defined within the inner loop
* given that the input described by sinble value only
Expand All @@ -96,18 +105,24 @@ struct CoordTramsformer
* @return true -- if all Coord are within the range requested by algorithm. false otherwise
*
* has to be specialized */
bool calc1MatrixCoord(const double & X,std::vector<coord_t> &Coord)const;
bool calc1MatrixCoord(const double & X,std::vector<coord_t> &Coord)const
{
return false;
}
/** template generalizes the conversion of single x-variable using unit conversion as the first step
* @param X -- X workspace value
*
* @param Coord -- subalgorithm specific number of coordinates, placed in the proper position of the Coordinate vector
* @return true -- if all Coord are within the range requested by algorithm. false otherwise
*
* has to be specialized */
bool convertAndCalcMatrixCoord(const double & X,std::vector<coord_t> &Coord)const;
bool convertAndCalcMatrixCoord(const double & X,std::vector<coord_t> &Coord)const
{
return false;
}
/** set up transformation and retrieve the pointer to the incorporating class, which runs the transformation and provides
* necessary variables */
void setUpTransf(IConvertToMDEventsMethods *);
void setUpTransf(IConvertToMDEventsMethods *){};

private:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ struct CoordTransformer<ModQ,Elastic,CONV,Type,Sample>
// Calling Mantid algorithm
IConvertToMDEventsMethods *pHost;
// class which would convert units
UnitsConverter<CONV,Type> CONV_UNITS_FROM;
UnitsConverter<CONV,Type> CONV_UNITS_FROM;

};

Expand Down

0 comments on commit 27843f9

Please sign in to comment.