template<typename T>
struct SimplePropertyMap
{
- typedef std::map<string, T> map_type;
+ typedef std::map<std::string, T> map_type;
map_type _map;
template<int N>
SimplePropertyMap(const EffectNameValue<T> (&attrs)[N])
typename EffectPropertyMap<T>::BMap::iterator itr
= pMap._map.template get<from>().find(name);
if (itr == pMap._map.end()) {
- throw effect::BuilderException(string("findAttr: could not find attribute ")
- + string(name));
+ throw effect::BuilderException(std::string("findAttr: could not find attribute ")
+ + std::string(name));
} else {
result = itr->second;
}
PropertyList useProps = prop->getChildren("use");
if (useProps.size() == 1) {
string parentName = useProps[0]->getStringValue();
- if (parentName.size() == 0 || parentName[0] != '/')
+ if (parentName.empty() || parentName[0] != '/')
parentName = options->getPropertyNode()->getPath() + "/" + parentName;
if (parentName[parentName.size() - 1] != '/')
parentName.append("/");
itr != end;
++itr) {
string childName = (*itr)->getStringValue();
- if (childName.size() == 0 || childName[0] != '/')
+ if (childName.empty() || childName[0] != '/')
result.push_back(parentName + childName);
else
result.push_back(childName);
template<typename T>
struct InstallAttributeBuilder
{
- InstallAttributeBuilder(const string& name)
+ InstallAttributeBuilder(const std::string& name)
{
PassAttributeBuilder::PassAttrMapSingleton::instance()
->passAttrMap.insert(make_pair(name, new T));
const SGPropertyNode* valProp = getEffectPropertyNode(effect, prop);
if (!valProp)
return;
- setDynamicVariance(obj);
if (valProp->nChildren() == 0) {
setter(obj, valProp->getValue<OSGParamType>());
} else {
+ setDynamicVariance(obj);
std::string propName = getGlobalProperty(valProp, options);
ScalarChangeListener<OSGParamType, ObjType, F>* listener
= new ScalarChangeListener<OSGParamType, ObjType, F>(obj, setter,
const SGPropertyNode* valProp = getEffectPropertyNode(effect, prop);
if (!valProp)
return;
- setDynamicVariance(obj);
if (valProp->nChildren() == 0) { // Has <use>?
setter(obj, Bridge<OSGParamType>::get(valProp->getValue<sg_type>()));
} else {
+ setDynamicVariance(obj);
std::vector<std::string> paramNames
= getVectorProperties(valProp, options,numComponents, nameItr);
if (paramNames.empty())