bool XMLFPParser::parseLinguisticVariable(const xml_node& node,
		MamdaniFuzzyObject* object, const string& outputName) {

	string variable_name = node.child(LINGUISTIC_VARIABLE_ID_TAG).first_child().value();
	if (variable_name == outputName) // it's the output variable
		return processOutputVariable(node, object);
	else
		return processInputVariable(node, object);
}
示例#2
0
 void FllImporter::process(const std::string& tag, const std::string& block, Engine* engine) const {
     if (tag.empty()) return;
     if ("InputVariable" == tag) {
         processInputVariable(block, engine);
     } else if ("OutputVariable" == tag) {
         processOutputVariable(block, engine);
     } else if ("RuleBlock" == tag) {
         processRuleBlock(block, engine);
     } else {
         throw fl::Exception("[import error] block tag <" + tag + "> not recognized", FL_AT);
     }
 }