53 size_t foundColon= rn.find(
':');
54 if (foundColon != std::string::npos) {
55 ns = rn.substr(0,foundColon);
62 std::vector <std::string> partsels;
87 for (i = 0; i < myPartSelector->size(); ++
i)
88 partsels.push_back((myPartSelector->getAttributeSet(i).find(
"path"))->
second);
93 typedef std::map<std::string, std::pair<bool,std::vector<DDValuePair> > > vvvpType;
102 bool doNotEval =
true;
106 const DDXMLAttribute & atts = mySpecParSection->getAttributeSet();
108 if (atts.find(
"eval") != atts.end() && atts.find(
"eval")->second ==
"true")
111 if (atts.find(
"regex") != atts.end() && atts.find(
"regex")->second ==
"false")
118 if (atts.find(
"eval") != atts.end() && atts.find(
"eval")->second ==
"true")
120 else if (atts.find(
"eval") != atts.end())
123 if (atts.find(
"regex") != atts.end() && atts.find(
"regex")->second ==
"false")
125 else if (atts.find(
"regex") != atts.end())
128 for (i = 0; i < myParameter->size(); ++
i)
131 std::vector <DDValuePair> vvp;
132 vvvpType::iterator itv = vvvp.find((atts.find(
"name")->second));
133 if (itv != vvvp.end())
134 vvp = itv->second.second;
136 bool isEvaluated =
false;
147 if ((atts.find(
"eval") != atts.end() && atts.find(
"eval")->second !=
"false")
148 || (atts.find(
"eval") == atts.end() && !doNotEval))
156 vvvp[atts.find(
"name")->second] = make_pair(isEvaluated,vvp);
160 for (i = 0; i < myString->size(); ++
i)
163 std::vector <DDValuePair> vvp;
164 vvvpType::iterator itv = vvvp.find(atts.find(
"name")->second);
165 if (itv != vvvp.end())
166 vvp = itv->second.second;
170 vvvp[atts.find(
"name")->second] = make_pair(
false,vvp);
174 for (i = 0; i < myNumeric->size(); ++
i)
177 std::vector <DDValuePair> vvp;
178 vvvpType::iterator itv = vvvp.find(atts.find(
"name")->second);
179 if (itv != vvvp.end())
180 vvp = itv->second.second;
184 vvvp[atts.find(
"name")->second] = make_pair(
true,vvp);
187 svt.reserve(vvvp.size());
188 for (vvvpType::const_iterator it = vvvp.begin(); it != vvvp.end(); ++it)
191 bool isEvaluated = it->second.first;
195 std::sort(svt.begin(),svt.end());
202 myParameter->clear();
203 myPartSelector->clear();
DDLSpecPar(DDLElementRegistry *myreg)
DDLElementRegistry * myRegistry_
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
void setEvalState(bool newState)
set to true, if the double-values (method DDValue::doubles()) make sense
type of data representation of DDCompactView
std::map< std::string, std::string > DDXMLAttribute
U second(std::pair< T, U > const &p)
ClhepEvaluator & evaluator()
std::shared_ptr< DDXMLElement > getElement(const std::string &name)
THE most important part. Getting the pointer to a given element type.
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
This is a base class for processing XML elements in the DDD.
double eval(const std::string &ns, const std::string &expr)
The main class for processing parsed elements.
virtual void clear(void)
clear this element's contents.
virtual const DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
DDsvalues_type::value_type DDsvalues_Content_type
Interface to attach user specific data to nodes in the expanded-view.