OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
subviewfactory.hpp
Go to the documentation of this file.
1 #ifndef CSV_DOC_SUBVIEWFACTORY_H
2 #define CSV_DOC_SUBVIEWFACTORY_H
3 
4 #include <map>
5 
6 #include "../../model/world/universalid.hpp"
7 
8 namespace CSMDoc
9 {
10  class Document;
11 }
12 
13 namespace CSVDoc
14 {
15  class SubView;
16 
18  {
19  // not implemented
22 
23  public:
24 
26 
27  virtual ~SubViewFactoryBase();
28 
29  virtual SubView *makeSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document) = 0;
31  };
32 
34  {
35  std::map<CSMWorld::UniversalId::Type, SubViewFactoryBase *> mSubViewFactories;
36 
37  // not implemented
40 
41  public:
42 
44 
46 
47  void add (const CSMWorld::UniversalId::Type& id, SubViewFactoryBase *factory);
49 
52  };
53 }
54 
55 #endif
virtual SubView * makeSubView(const CSMWorld::UniversalId &id, CSMDoc::Document &document)=0
The ownership of the returned sub view is not transferred.
Definition: subviewfactory.hpp:33
SubViewFactoryBase()
Definition: subviewfactory.cpp:7
~SubViewFactoryManager()
Definition: subviewfactory.cpp:14
Type
Definition: universalid.hpp:40
std::map< CSMWorld::UniversalId::Type, SubViewFactoryBase * > mSubViewFactories
Definition: subviewfactory.hpp:35
SubViewFactoryManager()
Definition: subviewfactory.cpp:12
Definition: subview.hpp:23
virtual ~SubViewFactoryBase()
Definition: subviewfactory.cpp:9
Definition: document.hpp:57
SubViewFactoryBase & operator=(const SubViewFactoryBase &)
SubViewFactoryManager & operator=(const SubViewFactoryManager &)
void add(const CSMWorld::UniversalId::Type &id, SubViewFactoryBase *factory)
The ownership of factory is transferred to this.
Definition: subviewfactory.cpp:21
Definition: subviewfactory.hpp:17
SubView * makeSubView(const CSMWorld::UniversalId &id, CSMDoc::Document &document)
The ownership of the returned sub view is not transferred.
Definition: subviewfactory.cpp:28
Definition: universalid.hpp:12