Пример #1
0
void CSSStream::Parse(IStyleSheet* styleSheet)
{
	getnextc();

	m_styleSheet = styleSheet;
	ParseRules();
}
Пример #2
0
bool GameData::MakeGdata(PyObject *overview, const wxString &host, int port, 
        PyObject *players, PyObject *rules)
{
    if (!ParseOverview(overview, host, port)) 
        return false;

    if (players || rules)
    {
        if (!ParsePlayers(players))
            return false;
        if (!ParseRules(rules))
            return false;
    }

    return true;
}
bool RBSParseXML::ParseRBS(xml::XMLElement*elem,RuleBasedSystem*rbs)
{

	core::stringc attrName;
	core::stringc elemName;

	xml::XMLAttribute*attr;
	bool isGlobal=false;

	attr=elem->getAttribute(mT("name"));
	if(attr){
		rbs->SetName(attr->value);
	}
	attr=elem->getAttribute(mT("isglobal"));
	if(attr){
		isGlobal= core::StringConverter::toBool(attr->value);
	}


	if(isGlobal){
		RBSManager::getInstance().AddRBS(rbs);
	}

	xml::XMLElement* e;

	e=elem->getSubElement(mT("attachedrbs"));
	if(e){
		ParseAttachedRBSs(e,rbs);
	}
	e=elem->getSubElement(mT("symbols"));
	if(!e){
		gLogManager.log(mT("Couldn't find Symbols tag."),ELL_WARNING);
	}else
	{
		ParseSymbols(e,rbs);
	}
	e=elem->getSubElement(mT("rules"));
	if(!e){
		gLogManager.log(mT("Couldn't find Rules tag."),ELL_WARNING);
	}else
	{
		ParseRules(e,rbs);
	}
	return true;
}