38 DCOUT_V(
'P',
"DDLAlgoPosPart::processElement started");
51 int st =
static_cast<int> ((atts.find(
"start") == atts.end() ? 0.0 : ev.
eval(nmspace, atts.find(
"start")->second)));
52 int ic =
static_cast<int> ((atts.find(
"incr") == atts.end() ? 0.0 : ev.
eval(nmspace, atts.find(
"incr")->second)));
53 int ed =
static_cast<int> ((atts.find(
"end") == atts.end() ? 0.0 : ev.
eval(nmspace, atts.find(
"end")->second)));
63 std::string msg =
std::string(
"\n\tDDLParser, algo requested is not defined. Either AlgoInit() or check algo spelling.\n ")
74 for (
size_t i = 0;
i < myParE->
size(); ++
i)
78 parE_type::iterator existingName=parE.find(atts.find(
"name")->second);
82 if (existingName != parE.end())
83 existingName->second.push_back(ev.
eval(nmspace,atts.find(
"value")->second));
87 std::vector<double> tvect;
88 tvect.push_back(ev.
eval(nmspace,atts.find(
"value")->second));
89 parE[atts.find(
"name")->second] = tvect;
96 for (
size_t i = 0;
i < myParS->
size(); ++
i)
101 parS_type::iterator existingName=parS.find(atts.find(
"name")->second);
106 if (existingName != parS.end())
107 existingName->second.push_back(atts.find(
"value")->second);
110 std::vector<std::string> tvect;
111 tvect.push_back(atts.find(
"value")->second);
112 parS[atts.find(
"name")->second] = tvect;
129 DCOUT_V(
'P',
"DDLAlgoPosPart::processElement completed");
def_type isDefined() const
DDLElementRegistry * myRegistry_
void algoPosPart(const DDLogicalPart &self, const DDLogicalPart &parent, DDAlgo &algo)
positioning...
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
void throwError(const std::string &keyMessage) const
format std::string for throw an error.
DDName is used to identify DDD entities uniquely.
const std::string & parent(void) const
access to parent element name
std::map< std::string, std::vector< std::string > > parS_type
type of data representation of DDCompactView
std::map< std::string, std::string > DDXMLAttribute
DDXMLElement * getElement(const std::string &name)
THE most important part. Getting the pointer to a given element type.
static value_type & instance()
DDLAlgoPosPart(DDLElementRegistry *myreg)
Constructor.
~DDLAlgoPosPart()
Destructor.
virtual size_t size(void) const
Number of elements accumulated.
Interface of an Expression Evaluator.
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Processing the element.
#define DCOUT_V(M_v_Y, M_v_S)
virtual double eval(const std::string &ns, const std::string &expr)=0
evaluate an expression expr inside the local namespace
std::map< std::string, std::vector< double > > parE_type
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.
void setParameters(int start, int end, int incr, const parS_type &, const parE_type &)
virtual const DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)