GOAT (Geometrical optics application tool) 0.1
Loading...
Searching...
No Matches
xmltoken.h
Go to the documentation of this file.
1#include <array>
2#include <string>
3#include "lightsrc.h"
4#pragma once
5
6namespace GOAT
7{
8 namespace XML
9 {
10#define numLightSourceToken 12
11#define numObjectToken 8
12#define numDetectorToken 1
13#define numCalculationToken 6
14#define numRefractiveIndexToken 6
15
16#define TOKEN_NOT_FOUND -1
17#define TOKEN_LIGHTSOURCE_PLANE 0
18#define TOKEN_LIGHTSOURCE_GAUSSIAN 1
19#define TOKEN_LIGHTSOURCE_RING 2
20#define TOKEN_LIGHTSOURCE_TOPHAT 3
21#define TOKEN_LIGHTSOURCE_PLANE_MC 4
22#define TOKEN_LIGHTSOURCE_GAUSSIAN_MC 5
23#define TOKEN_LIGHTSOURCE_RING_MC 6
24#define TOKEN_LIGHTSOURCE_GAUSSIAN_RING_MC 7
25#define TOKEN_LIGHTSOURCE_LINE 8
26#define TOKEN_LIGHTSOURCE_LINE_MC 9
27#define TOKEN_LIGHTSOURCE_POINT 10
28#define TOKEN_LIGHTSOURCE_POINT_MC 11
29
30
31#define TOKEN_OBJECT_ELLIPSOID 100
32#define TOKEN_OBJECT_SURFACE 101
33#define TOKEN_OBJECT_CONE 102
34#define TOKEN_OBJECT_ASPHERIC_LENS 103
35#define TOKEN_OBJECT_SPHERIC_LENS 104
36#define TOKEN_OBJECT_BOX 105
37#define TOKEN_OBJECT_CYLINDER 106
38#define TOKEN_OBJECT_VORTEX_PLATE 107
39
40#define TOKEN_DETECTOR_PLANE 150
41
42#define TOKEN_CALCULATION_PURE 200
43#define TOKEN_CALCULATION_PATH 201
44#define TOKEN_CALCULATION_PULSE 202
45#define TOKEN_CALCULATION_PULSE_FIELD 203
46#define TOKEN_CALCULATION_INELASTIC 204
47#define TOKEN_CALCULATION_FIELD 205
48
49#define TOKEN_REFRACTIVE_INDEX_AIR 300
50#define TOKEN_REFRACTIVE_INDEX_GLASS 301
51#define TOKEN_REFRACTIVE_INDEX_BK7 302
52#define TOKEN_REFRACTIVE_INDEX_LASF55 303
53#define TOKEN_REFRACTIVE_INDEX_VACUUM 304
54#define TOKEN_REFRACTIVE_INDEX_PMMA 305
55
56
57
58
59 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"};
60 const std::vector<std::string> objectToken = { "ellipsoid","surface","cone","aspheric_lens","spheric_lens","box","cylinder","vortex_plate"};
61 const std::vector<std::string> detectorToken = {"plane"};
62 const std::vector<std::string> calculationToken = { "pure","path","pulse","pulse_field","inelastic","field"};
63 const std::vector<std::string> refractiveIndexToken = { "air","glass","bk7","lasf55","vacuum","pmma" };
64
65 int mapString2LightSourceToken(std::string str);
66 int mapString2ObjectToken(std::string str);
67 int mapString2DetectorToken(std::string str);
68 int mapString2CalculationToken(std::string str);
69 int mapString2RefractiveIndexToken(std::string str);
70 std::string str_tolower(std::string s);
71 bool addFunction2IndexList(std::vector< std::function< std::complex< double >(double) > >& nList, int refIndexToken);
72 }
73}
74
bool addFunction2IndexList(std::vector< std::function< std::complex< double >(double) > > &nList, int refIndexToken)
const std::vector< std::string > refractiveIndexToken
Definition xmltoken.h:63
const std::vector< std::string > lightSourceToken
Definition xmltoken.h:59
const std::vector< std::string > detectorToken
Definition xmltoken.h:61
int mapString2LightSourceToken(std::string str)
int mapString2RefractiveIndexToken(std::string str)
const std::vector< std::string > objectToken
Definition xmltoken.h:60
int mapString2CalculationToken(std::string str)
const std::vector< std::string > calculationToken
Definition xmltoken.h:62
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/t...
int mapString2DetectorToken(std::string str)
int mapString2ObjectToken(std::string str)
This class is used for the iray class. This class is intended for internal use only....
Definition fresnel.h:7