38 DCOUT_V(
'P',
"DDLSpecPar::processElement started");
63 size_t foundColon= rn.find(
':');
64 if (foundColon != std::string::npos) {
65 ns = rn.substr(0,foundColon);
72 std::vector <std::string> partsels;
97 for (i = 0; i < myPartSelector->
size(); ++
i)
103 typedef std::map<std::string, std::pair<bool,std::vector<DDValuePair> > > vvvpType;
112 bool doNotEval =
true;
118 if (atts.find(
"eval") != atts.end() && atts.find(
"eval")->second ==
"true")
121 if (atts.find(
"regex") != atts.end() && atts.find(
"regex")->second ==
"false")
128 if (atts.find(
"eval") != atts.end() && atts.find(
"eval")->second ==
"true")
130 else if (atts.find(
"eval") != atts.end())
133 if (atts.find(
"regex") != atts.end() && atts.find(
"regex")->second ==
"false")
135 else if (atts.find(
"regex") != atts.end())
138 for (i = 0; i < myParameter->
size(); ++
i)
141 std::vector <DDValuePair> vvp;
142 vvvpType::iterator itv = vvvp.find((atts.find(
"name")->second));
143 if (itv != vvvp.end())
144 vvp = itv->second.second;
146 bool isEvaluated =
false;
161 if (atts.find(
"eval") != atts.end())
162 ts = atts.find(
"eval")->second;
164 if ((atts.find(
"eval") != atts.end() && atts.find(
"eval")->second !=
"false")
165 || (atts.find(
"eval") == atts.end() && !doNotEval))
178 vvvp[atts.find(
"name")->second] = make_pair(isEvaluated,vvp);
182 for (i = 0; i < myString->
size(); ++
i)
185 std::vector <DDValuePair> vvp;
186 vvvpType::iterator itv = vvvp.find(atts.find(
"name")->second);
187 if (itv != vvvp.end())
188 vvp = itv->second.second;
189 DCOUT_V(
'P',
std::string(
"about to process String ") << (atts.find(
"name")->second) <<
" = " << (atts.find(
"value")->second));
192 vvvp[atts.find(
"name")->second] = make_pair(
false,vvp);
196 for (i = 0; i < myNumeric->
size(); ++
i)
199 std::vector <DDValuePair> vvp;
200 vvvpType::iterator itv = vvvp.find(atts.find(
"name")->second);
201 if (itv != vvvp.end())
202 vvp = itv->second.second;
203 DCOUT_V(
'P',
std::string(
"about to process String ") << (atts.find(
"name")->second) <<
" = " << (atts.find(
"value")->second));
208 vvvp[atts.find(
"name")->second] = make_pair(
true,vvp);
211 svt.reserve(vvvp.size());
212 for (vvvpType::const_iterator it = vvvp.begin(); it != vvvp.end(); ++it)
214 DDValue val(it->first, it->second.second);
215 bool isEvaluated = it->second.first;
222 DCOUT_V(
'p',
"DDLSpecPar::processElement\n\tname " <<
getDDName(nmspace) <<
"\n\tpartsels.size() = " << myPartSelector->
size() <<
"\n\tsvt " << svt);
229 myParameter->
clear();
230 myPartSelector->
clear();
235 DCOUT_V(
'P',
"DDLSpecPar::processElement(...)");
DDLSpecPar(DDLElementRegistry *myreg)
Constructor.
DDLElementRegistry * myRegistry_
~DDLSpecPar(void)
Destructor.
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
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)
DDXMLElement * getElement(const std::string &name)
THE most important part. Getting the pointer to a given element type.
static value_type & instance()
virtual size_t size(void) const
Number of elements accumulated.
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::...
#define DCOUT_V(M_v_Y, M_v_S)
This is a base class for processing XML elements in the DDD.
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.