Newer
Older
n_folders=size_t(ic);
path_components.resize(n_folders);
return n_folders;
}
/**
* Function checks if the candidate is the member of the group
* @param group :: vector of string to check
* @param candidate :: the string which has to be checked against the group
* @returns :: number of the candidate in the input vector of strings if the candidate belongs to the group
or -1 if it does not.
Returns the number of the first maching entry in the group if there are duplicated entries in the group
*/
int isMember(const std::vector<std::string> &group, const std::string &candidate)
{
int num(-1);
for(size_t i=0;i<group.size();i++){
if(candidate.compare(group[i])==0){
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
return num;
}
/// \cond TEMPLATE
template MANTID_KERNEL_DLL int section(std::string&,double&);
template MANTID_KERNEL_DLL int section(std::string&,float&);
template MANTID_KERNEL_DLL int section(std::string&,int&);
template MANTID_KERNEL_DLL int section(std::string&,std::string&);
template MANTID_KERNEL_DLL int sectPartNum(std::string&,double&);
template MANTID_KERNEL_DLL int sectPartNum(std::string&,int&);
template MANTID_KERNEL_DLL int sectionMCNPX(std::string&,double&);
template MANTID_KERNEL_DLL int convert(const std::string&,double&);
template MANTID_KERNEL_DLL int convert(const std::string&,float&);
template MANTID_KERNEL_DLL int convert(const std::string&,std::string&);
template MANTID_KERNEL_DLL int convert(const std::string&,int&);
template MANTID_KERNEL_DLL int convert(const std::string&,std::size_t&);
template MANTID_KERNEL_DLL int convert(const char*,std::string&);
template MANTID_KERNEL_DLL int convert(const char*,double&);
template MANTID_KERNEL_DLL int convert(const char*,int&);
template MANTID_KERNEL_DLL int convert(const char*,std::size_t&);
template MANTID_KERNEL_DLL std::string toString(const double value);
template MANTID_KERNEL_DLL std::string toString(const float value);
template MANTID_KERNEL_DLL std::string toString(const int value);
template MANTID_KERNEL_DLL std::string toString(const uint16_t value);
template MANTID_KERNEL_DLL std::string toString(const size_t value); // Matches uint64_t on Linux 64 & Win 64
#if defined(__APPLE__) || ( defined(_WIN32) && !defined(_WIN64)) || (defined(__GNUC__) && !defined(__LP64__)) // Mac or 32-bit compiler
template MANTID_KERNEL_DLL std::string toString(const uint64_t value);
template MANTID_KERNEL_DLL std::string toString(const std::string value);
// this block should generate the vector ones as well
template MANTID_KERNEL_DLL std::string toString(const std::set<int> &value);
template MANTID_KERNEL_DLL std::string toString(const std::set<int16_t> &value);
template MANTID_KERNEL_DLL std::string toString(const std::set<size_t> &value); // Matches uint64_t on Linux 64 & Win 64
#if defined(__APPLE__) || ( defined(_WIN32) && !defined(_WIN64)) || (defined(__GNUC__) && !defined(__LP64__)) // Mac or 32-bit compiler
template MANTID_KERNEL_DLL std::string toString(const std::set<uint64_t> &value);
#endif
template MANTID_KERNEL_DLL int convPartNum(const std::string&,double&);
template MANTID_KERNEL_DLL int convPartNum(const std::string&,int&);
template MANTID_KERNEL_DLL int setValues(const std::string&,const std::vector<int>&,std::vector<double>&);
Janik Zikovsky
committed
template MANTID_KERNEL_DLL int writeFile(const std::string&,const double&,const std::vector<double>&);
template MANTID_KERNEL_DLL int writeFile(const std::string&,const std::vector<double>&,const std::vector<double>&,const std::vector<double>&);
template MANTID_KERNEL_DLL int writeFile(const std::string&,const std::vector<double>&,const std::vector<double>&);
template MANTID_KERNEL_DLL int writeFile(const std::string&,const std::vector<float>&,const std::vector<float>&);
template MANTID_KERNEL_DLL int writeFile(const std::string&,const std::vector<float>&,const std::vector<float>&,const std::vector<float>&);
/// \endcond TEMPLATE
Janik Zikovsky
committed
} // NAMESPACE Strings
Janik Zikovsky
committed
} // NAMESPACE Kernel
Janik Zikovsky
committed
} // NAMESPACE Mantid