1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00
OpenMW/apps/opencs/view/world/subviews.cpp

45 lines
1.6 KiB
C++
Raw Normal View History

2012-12-11 13:22:43 +01:00
#include "subviews.hpp"
#include "../doc/subviewfactoryimp.hpp"
#include "tablesubview.hpp"
#include "dialoguesubview.hpp"
2013-04-10 20:14:10 +02:00
#include "scriptsubview.hpp"
#include "regionmapsubview.hpp"
#include "genericcreator.hpp"
2012-12-11 13:22:43 +01:00
void CSVWorld::addSubViewFactories (CSVDoc::SubViewFactoryManager& manager)
{
2013-02-08 09:58:19 +01:00
manager.add (CSMWorld::UniversalId::Type_Gmsts,
new CSVDoc::SubViewFactoryWithCreator<TableSubView, NullCreatorFactory>);
2013-02-08 09:58:19 +01:00
manager.add (CSMWorld::UniversalId::Type_Skills,
new CSVDoc::SubViewFactoryWithCreator<TableSubView, NullCreatorFactory>);
static const CSMWorld::UniversalId::Type sTableTypes[] =
{
CSMWorld::UniversalId::Type_Globals,
CSMWorld::UniversalId::Type_Classes,
CSMWorld::UniversalId::Type_Factions,
2013-04-04 14:34:39 +02:00
CSMWorld::UniversalId::Type_Races,
2013-04-06 21:21:10 +02:00
CSMWorld::UniversalId::Type_Sounds,
2013-04-07 15:17:35 +02:00
CSMWorld::UniversalId::Type_Scripts,
2013-04-07 16:32:06 +02:00
CSMWorld::UniversalId::Type_Regions,
2013-04-07 20:26:39 +02:00
CSMWorld::UniversalId::Type_Birthsigns,
2013-04-09 11:40:36 +02:00
CSMWorld::UniversalId::Type_Spells,
2013-04-14 17:04:55 +02:00
CSMWorld::UniversalId::Type_Cells,
CSMWorld::UniversalId::Type_Referenceables,
2013-07-06 17:03:18 +02:00
CSMWorld::UniversalId::Type_References,
CSMWorld::UniversalId::Type_None // end marker
};
for (int i=0; sTableTypes[i]!=CSMWorld::UniversalId::Type_None; ++i)
manager.add (sTableTypes[i],
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<GenericCreator> >);
2013-03-25 13:22:06 +01:00
2013-04-10 20:14:10 +02:00
manager.add (CSMWorld::UniversalId::Type_Script, new CSVDoc::SubViewFactory<ScriptSubView>);
2013-04-02 12:00:45 +02:00
manager.add (CSMWorld::UniversalId::Type_RegionMap, new CSVDoc::SubViewFactory<RegionMapSubView>);
2012-12-11 13:22:43 +01:00
}