3Depict
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions | Variables
APTRanges.cpp File Reference
#include "APTRanges.h"
#include "ionhit.h"
#include "../../common/constants.h"
#include "../../common/stringFuncs.h"
#include "../../common/translation.h"
#include <set>
#include <map>
#include <fstream>
#include <numeric>
#include <cstring>
Include dependency graph for APTRanges.cpp:

Functions

bool matchComposedName (const std::map< string, size_t > &composedNames, const vector< pair< string, size_t > > &namesToFind, size_t &matchOffset)
 

Variables

const size_t MAX_LINE_SIZE = 16536
 
const size_t MAX_RANGEFILE_SIZE = 20*1024*1024
 
const char * rangeErrStrings []
 
const char * RANGE_EXTS []
 
const char * elementList []
 

Function Documentation

◆ matchComposedName()

bool matchComposedName ( const std::map< string, size_t > &  composedNames,
const vector< pair< string, size_t > > &  namesToFind,
size_t &  matchOffset 
)

References RangeFile::decomposeIonNames().

Referenced by RangeFile::openGuessFormat().

Here is the caller graph for this function:

Variable Documentation

◆ elementList

const char* elementList[]
Initial value:
= {
"H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne",
"Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar",
"K", "Ca", "Sc","Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni",
"Cu", "Zn", "Ga", "Ge", "As", "Se", "Br", "Kr",
"Rb", "Sr", "Y", "Zr", "Nb", "Mo", "Tc", "Ru", "Rh", "Pd",
"Ag", "Cd", "In", "Sn", "Sb", "Te", "I", "Xe",
"Cs", "Ba", "La", "Ce", "Pr", "Nd", "Pm", "Sm", "Eu", "Gd",
"Tb", "Dy", "Ho", "Er", "Tm", "Yb", "Lu", "Hf", "Ta",
"W", "Re", "Os", "Ir", "Pt", "Au", "Hg", "Tl", "Pb",
"Bi", "Po", "At", "Rn",
"Fr", "Ra", "Ac", "Th", "Pa", "U", "Np", "Pu", "Am", "Cm",
"Bk", "Cf", "Es", "Fm", "Md", "No", "Lr", "Rf", "Db",
"Sg", "Bh", "Hs", "Mt", "Ds", "Rg", "Cn", "Uut", "Fl",
"Uup", "Lv", "Uus", "Uuo", ""
}

Referenced by RangeFile::write().

◆ MAX_LINE_SIZE

const size_t MAX_LINE_SIZE = 16536

◆ MAX_RANGEFILE_SIZE

const size_t MAX_RANGEFILE_SIZE = 20*1024*1024

◆ RANGE_EXTS

const char* RANGE_EXTS[]
Initial value:
= { "rng",
"env",
"rng",
"rrng",
""}

Referenced by RangeFile::extensionIsRange(), RangeFile::getAllExts(), and RangeFile::RangeFile().

◆ rangeErrStrings

const char* rangeErrStrings[]
Initial value:
=
{
"",
NTRANS("Error opening file, check name and permissions."),
NTRANS("Error interpreting range file header, expecting ion count and range count, respectively."),
NTRANS("Range file appears to be empty, check file is a proper range file and is not empty."),
NTRANS("Error reading the long name for ion."),
NTRANS("Error reading the short name for ion."),
NTRANS("Error reading colour data in the file, expecting 3 decimal values, space separated."),
NTRANS("Tried skipping to table separator line (line with dashes), but did not find it."),
NTRANS("Number of ions in the table header did not match the number specified at the start of the file"),
NTRANS("Unexpected failure whilst trying to skip over range lead-in data (bit before range start value)"),
NTRANS("Range table had an incorrect number of entries, should be 2 or 3 + number of ranges"),
NTRANS("Unable to read range start and end values"),
NTRANS("Unable to read range table entry"),
NTRANS("Error reading file, unexpected format, are you sure it is a proper range file?"),
NTRANS("Too many ranges appeared to have range entries with no usable data (eg, all blank)"),
NTRANS("Range file appears to contain malformed data, check things like start and ends of m/c are not equal or flipped."),
NTRANS("Range file appears to be inconsistent (eg, overlapping ranges)"),
NTRANS("No ion name mapping found for multiple ion."),
NTRANS("Polyatomic extension range matches multiple masses in first section"),
NTRANS("Range file is exceedingly large. Refusing to open"),
}
#define NTRANS(x)
Gettext null-translation macro (mark for translation, but do nothing)
Definition: translation.h:33

Referenced by RangeFile::getErrString(), and RangeFile::printErr().