mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-10 06:39:49 +00:00
simplified code for sub view factory creation
This commit is contained in:
parent
0856e3ebc2
commit
9d009af2a1
@ -8,20 +8,24 @@
|
|||||||
|
|
||||||
void CSVWorld::addSubViewFactories (CSVDoc::SubViewFactoryManager& manager)
|
void CSVWorld::addSubViewFactories (CSVDoc::SubViewFactoryManager& manager)
|
||||||
{
|
{
|
||||||
manager.add (CSMWorld::UniversalId::Type_Globals,
|
|
||||||
new CSVDoc::SubViewFactoryWithCreateFlag<TableSubView> (true));
|
|
||||||
|
|
||||||
manager.add (CSMWorld::UniversalId::Type_Gmsts,
|
manager.add (CSMWorld::UniversalId::Type_Gmsts,
|
||||||
new CSVDoc::SubViewFactoryWithCreateFlag<TableSubView> (false));
|
new CSVDoc::SubViewFactoryWithCreateFlag<TableSubView> (false));
|
||||||
|
|
||||||
manager.add (CSMWorld::UniversalId::Type_Skills,
|
manager.add (CSMWorld::UniversalId::Type_Skills,
|
||||||
new CSVDoc::SubViewFactoryWithCreateFlag<TableSubView> (false));
|
new CSVDoc::SubViewFactoryWithCreateFlag<TableSubView> (false));
|
||||||
|
|
||||||
manager.add (CSMWorld::UniversalId::Type_Classes,
|
static const CSMWorld::UniversalId::Type sTableTypes[] =
|
||||||
new CSVDoc::SubViewFactoryWithCreateFlag<TableSubView> (true));
|
{
|
||||||
|
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,
|
// manager.add (CSMWorld::UniversalId::Type_Global,
|
||||||
// new CSVDoc::SubViewFactoryWithCreateFlag<DialogueSubView> (true));
|
// new CSVDoc::SubViewFactoryWithCreateFlag<DialogueSubView> (true));
|
||||||
|
Loading…
Reference in New Issue
Block a user