void CMFXLibrary::LoadFromXml( SLoadingEnvironment& loadingEnvironment ) { CryLogAlways("[MFX] Loading FXLib '%s' ...", loadingEnvironment.libraryName.c_str()); INDENT_LOG_DURING_SCOPE(); for (int i = 0; i < loadingEnvironment.libraryParamsNode->getChildCount(); ++i) { XmlNodeRef currentEffectNode = loadingEnvironment.libraryParamsNode->getChild(i); if (!currentEffectNode) continue; TMFXContainerPtr pContainer = MaterialEffectsUtils::CreateContainer(); pContainer->BuildFromXML(currentEffectNode); const TMFXNameId& effectName = pContainer->GetParams().name; const bool effectAdded = AddContainer(effectName, pContainer); if (effectAdded) { loadingEnvironment.AddLibraryContainer(loadingEnvironment.libraryName, pContainer); } else { GameWarning("[MFX] Effect (at line %d) '%s:%s' already present, skipping redefinition!", currentEffectNode->getLine(), loadingEnvironment.libraryName.c_str(), effectName.c_str()); } } }
void CPDF_StreamContentParser::StartArray() { if (m_ObjectSize) if (m_pObjectStack[0]->GetType() != PDFOBJ_DICTIONARY && m_pObjectStack[m_ObjectSize - 1]->GetType() == PDFOBJ_ARRAY) { return; } CPDF_Array* pArray = FX_NEW CPDF_Array; AddContainer(pArray); }
void CPDF_StreamContentParser::StartDict() { CPDF_Dictionary* pDict = FX_NEW CPDF_Dictionary; AddContainer(pDict); m_bDictName = TRUE; }
AttributeContainer &AttributeContainer::AddContainer(uint key,const AttributeContainer &value) { AttributeContainer &a=AddContainer(key); a=value; return a; }