コード例 #1
0
void ofParameterGroup::add(ofAbstractParameter & parameter){
	shared_ptr<ofAbstractParameter> param = parameter.newReference();
	const std::string name = param->getEscapedName();
	if(obj->parametersIndex.find(name) != obj->parametersIndex.end()){
		ofLogWarning() << "Adding another parameter with same name '" << param->getName() << "' to group '" << getName() << "'";
	}
	obj->parameters.push_back(param);
	obj->parametersIndex[name] = obj->parameters.size()-1;
	param->setParent(*this);
}
コード例 #2
0
void ofParameterGroup::add(ofAbstractParameter & parameter){
	shared_ptr<ofAbstractParameter> param = parameter.newReference();
	obj->parameters.push_back(param);
	obj->parametersIndex[param->getEscapedName()] = obj->parameters.size()-1;
	param->setParent(*this);
}