simplified code for sub view factory creation

pull/16/head
Marc Zinnschlag 12 years ago
parent 0856e3ebc2
commit 9d009af2a1

@ -8,20 +8,24 @@
void CSVWorld::addSubViewFactories (CSVDoc::SubViewFactoryManager& manager)
{
manager.add (CSMWorld::UniversalId::Type_Globals,
new CSVDoc::SubViewFactoryWithCreateFlag<TableSubView> (true));
manager.add (CSMWorld::UniversalId::Type_Gmsts,
new CSVDoc::SubViewFactoryWithCreateFlag<TableSubView> (false));
manager.add (CSMWorld::UniversalId::Type_Skills,
new CSVDoc::SubViewFactoryWithCreateFlag<TableSubView> (false));
manager.add (CSMWorld::UniversalId::Type_Classes,
new CSVDoc::SubViewFactoryWithCreateFlag<TableSubView> (true));
static const CSMWorld::UniversalId::Type sTableTypes[] =
{
CSMWorld::UniversalId::Type_Globals,
CSMWorld::UniversalId::Type_Classes,
CSMWorld::UniversalId::Type_Factions,
CSMWorld::UniversalId::Type_None // end marker
};
for (int i=0; sTableTypes[i]!=CSMWorld::UniversalId::Type_None; ++i)
manager.add (sTableTypes[i], new CSVDoc::SubViewFactoryWithCreateFlag<TableSubView> (true));
manager.add (CSMWorld::UniversalId::Type_Factions,
new CSVDoc::SubViewFactoryWithCreateFlag<TableSubView> (true));
// manager.add (CSMWorld::UniversalId::Type_Global,
// new CSVDoc::SubViewFactoryWithCreateFlag<DialogueSubView> (true));

Loading…
Cancel
Save