ALERROR CExtension::LoadSystemTypesElement (SDesignLoadCtx &Ctx, CXMLElement *pDesc) // LoadSystemTypesElement // // Loads <SystemTypes> element // (For backwards compatibility) { ALERROR error; int i; for (i = 0; i < pDesc->GetContentElementCount(); i++) { CXMLElement *pItem = pDesc->GetContentElement(i); if (strEquals(pItem->GetTag(), TABLES_TAG)) { CSystemTable *pTable = new CSystemTable; pTable->InitFromXML(Ctx, pItem); if (pTable->GetUNID() == 0) pTable->SetUNID(DEFAULT_SYSTEM_TABLE_UNID); if (error = m_DesignTypes.AddEntry(pTable)) { Ctx.sError = strPatternSubst(CONSTLIT("Error adding system table: %x"), pTable->GetUNID()); return error; } } else { if (error = LoadDesignType(Ctx, pItem)) return error; } } return NOERROR; }
ALERROR CDesignCollection::AddSystemTable (SDesignLoadCtx &Ctx, CXMLElement *pDesc) // AddSystemTable // // Add a system table as a design element // (We need this for backwards compatibility) { CSystemTable *pTable = new CSystemTable; pTable->InitFromXML(Ctx, pDesc); if (pTable->GetUNID() == 0) pTable->SetUNID(DEFAULT_SYSTEM_TABLE_UNID); return AddEntry(Ctx, pTable); }