GOAT (Geometrical optics application tool) 0.1
Loading...
Searching...
No Matches
GOAT::XML Namespace Reference

Classes

class  xmlReader
 This class provides functionality to read a XML-file This function reads the XML file . It can also perform calculations. Beware: The parser is case sensitive. Element names starting with capital letters (except of "real" and "imag" for complex numbers), whereas values are always lower case The structure of the XML-File is as follows (the order of the subdivision may be changed): Signs: o: optional, n: necessary, i: independend parameters, i.e. this parameter is valid for all types Values: float: floating point number int: integer number bool: possible values: true or false. More...
class  xmlWriter

Functions

bool addFunction2IndexList (std::vector< std::function< std::complex< double >(double) > > &nList, int refIndexToken)
bool findExtension (std::string fname, std::string extension)
 check if the fname has a given extension This function checks if the fname ends with a given extension
int mapString2CalculationToken (std::string str)
int mapString2DetectorToken (std::string str)
int mapString2LightSourceToken (std::string str)
int mapString2ObjectToken (std::string str)
int mapString2RefractiveIndexToken (std::string str)
std::string str_tolower (std::string s)
 converts all letters in s into lower case (taken from https://en.cppreference.com/w/cpp/string/byte/tolower)

Variables

const std::vector< std::string > calculationToken = { "pure","path","pulse","pulse_field","inelastic","field"}
const std::vector< std::string > detectorToken = {"plane"}
const std::vector< std::string > lightSourceToken = { "plane","gaussian","ring","tophat","plane_mc","gaussian_mc","ring_mc","gaussian_ring_mc","line","line_mc","point","point_mc"}
const std::string LSTYPES [] = { "plane","gaussian","ring","tophat","line","point","plane_mc","gaussian_mc","ring_mc","line_mc","point_mc" }
const std::string LSXMLAttributes [] = { "type","size","wavelength","numrays","numraysRT"}
const std::string LSXMLTYPES [] = {"plane","gaussian","plane_mc","gaussian_mc"}
const std::vector< std::string > objectToken = { "ellipsoid","surface","cone","aspheric_lens","spheric_lens","box","cylinder","vortex_plate"}
const std::vector< std::string > refractiveIndexToken = { "air","glass","bk7","lasf55","vacuum","pmma" }
const std::string sceneXMLElements [] = { "r0","ns","CellsPerDir","lightsources","objects","detectors"}

Function Documentation

◆ addFunction2IndexList()

bool GOAT::XML::addFunction2IndexList ( std::vector< std::function< std::complex< double >(double) > > & nList,
int refIndexToken )

◆ findExtension()

bool GOAT::XML::findExtension ( std::string fname,
std::string extension )

check if the fname has a given extension This function checks if the fname ends with a given extension

Parameters
[in]fnameFilename
[in]extensionExtension to search (without "."!)
Returns
True if fname has the given extension

◆ mapString2CalculationToken()

int GOAT::XML::mapString2CalculationToken ( std::string str)

◆ mapString2DetectorToken()

int GOAT::XML::mapString2DetectorToken ( std::string str)

◆ mapString2LightSourceToken()

int GOAT::XML::mapString2LightSourceToken ( std::string str)

◆ mapString2ObjectToken()

int GOAT::XML::mapString2ObjectToken ( std::string str)

◆ mapString2RefractiveIndexToken()

int GOAT::XML::mapString2RefractiveIndexToken ( std::string str)

◆ str_tolower()

std::string GOAT::XML::str_tolower ( std::string s)

converts all letters in s into lower case (taken from https://en.cppreference.com/w/cpp/string/byte/tolower)

Variable Documentation

◆ calculationToken

const std::vector<std::string> GOAT::XML::calculationToken = { "pure","path","pulse","pulse_field","inelastic","field"}

Definition at line 62 of file xmltoken.h.

◆ detectorToken

const std::vector<std::string> GOAT::XML::detectorToken = {"plane"}

Definition at line 61 of file xmltoken.h.

◆ lightSourceToken

const std::vector<std::string> GOAT::XML::lightSourceToken = { "plane","gaussian","ring","tophat","plane_mc","gaussian_mc","ring_mc","gaussian_ring_mc","line","line_mc","point","point_mc"}

Definition at line 59 of file xmltoken.h.

◆ LSTYPES

const std::string GOAT::XML::LSTYPES[] = { "plane","gaussian","ring","tophat","line","point","plane_mc","gaussian_mc","ring_mc","line_mc","point_mc" }

Definition at line 44 of file xml.h.

◆ LSXMLAttributes

const std::string GOAT::XML::LSXMLAttributes[] = { "type","size","wavelength","numrays","numraysRT"}

Definition at line 42 of file xml.h.

◆ LSXMLTYPES

const std::string GOAT::XML::LSXMLTYPES[] = {"plane","gaussian","plane_mc","gaussian_mc"}

Definition at line 43 of file xml.h.

◆ objectToken

const std::vector<std::string> GOAT::XML::objectToken = { "ellipsoid","surface","cone","aspheric_lens","spheric_lens","box","cylinder","vortex_plate"}

Definition at line 60 of file xmltoken.h.

◆ refractiveIndexToken

const std::vector<std::string> GOAT::XML::refractiveIndexToken = { "air","glass","bk7","lasf55","vacuum","pmma" }

Definition at line 63 of file xmltoken.h.

◆ sceneXMLElements

const std::string GOAT::XML::sceneXMLElements[] = { "r0","ns","CellsPerDir","lightsources","objects","detectors"}

Definition at line 41 of file xml.h.