本文整理汇总了C++中PropertyValue::getValue方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertyValue::getValue方法的具体用法?C++ PropertyValue::getValue怎么用?C++ PropertyValue::getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertyValue
的用法示例。
在下文中一共展示了PropertyValue::getValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: evalDesign
//.........这里部分代码省略.........
listvals.push_back(scheme_real_to_double(temp));
}
}
Property::Ptr p = ds->getProperty(piit->first);
formater.str("");
formater << "(" << p->getTpclDisplayFunction() << " design '(";
for(std::list<double>::iterator itvals = listvals.begin();
itvals != listvals.end(); ++itvals){
formater << *itvals << " ";
}
formater << "))";
temp = scheme_eval_string(formater.str().c_str(), env);
#ifdef HAVE_MZSCHEME20X
if(!SCHEME_PAIRP(temp) || !SCHEME_NUMBERP(SCHEME_CAR(temp)) || !SCHEME_STRINGP(SCHEME_CDR(temp))){
#else
if(!SCHEME_PAIRP(temp) || !SCHEME_NUMBERP(SCHEME_CAR(temp)) || !SCHEME_CHAR_STRINGP(SCHEME_CDR(temp))){
#endif
Logger::getLogger()->warning("MzScheme: Return not a pair, or the wrong time in the pair");
}else{
propval.setValue(scheme_real_to_double(SCHEME_CAR(temp)));
#ifdef HAVE_MZSCHEME20X
propval.setDisplayString(std::string(SCHEME_STR_VAL(SCHEME_CDR(temp))));
#else
propval.setDisplayString(std::string((char*)SCHEME_CHAR_STR_VAL(SCHEME_CDR(temp))));
#endif
localvalues.insert(propval);
}
}
for(std::set<PropertyValue>::iterator pvit = localvalues.begin();
pvit != localvalues.end(); ++pvit){
PropertyValue pv = *pvit;
formater.str("");
formater << "(property-designType-set! design "
<< pv.getPropertyId() << " " << pv.getValue()
<< ")";
temp = scheme_eval_string(formater.str().c_str(), env);
propertyvalues[pv.getPropertyId()] = pv;
}
}
d->setPropertyValues(propertyvalues);
// now check if the design is valid
bool valid = true;
std::string feedback = "";
Logger::getLogger()->debug("About to process requirement functions");
for(IdMap::iterator compit = complist.begin();
compit != complist.end();
++compit){
uint32_t curval = compit->first;
//for each component in the design
temp = scheme_eval_string((std::string("(") + ds->getComponent(curval)->getTpclRequirementsFunction() + " design)").c_str(), env);
#ifdef HAVE_MZSCHEME20X
if(!SCHEME_PAIRP(temp) || !SCHEME_STRINGP(SCHEME_CDR(temp))){
#else
if(!SCHEME_PAIRP(temp) || !SCHEME_CHAR_STRINGP(SCHEME_CDR(temp))){
#endif
Logger::getLogger()->warning("MzScheme: (a) Return not a pair, or the wrong time in the pair");
}else{
valid &= SCHEME_TRUEP(SCHEME_CAR(temp));
#ifdef HAVE_MZSCHEME20X
std::string strtemp = SCHEME_STR_VAL(SCHEME_CDR(temp));
#else