VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
paperMapFactory.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: paperMapFactory.h,v $ $Revision: 1.9 $ $State: Exp $
7 *******************************************************************************/
8 #ifndef paperMapFactory_H_
9 #define paperMapFactory_H_
10 
11 //
12 // \file papermapFactory.h
13 // \brief Contains the DtPaperMapFactory class declaration.
14 //
15 
17 #include <vlutil/vlFilename.h>
18 #include <vlutil/vlList.h>
19 #include <map>
20 
21 class DtPaperMapDatabase;
22 class DtPaperMap;
23 class DtTerrainDatabase;
25 
26 //
27 // class DtPaperMapFactory:
28 //
29 // DtPaperMapFactory has a hashlist of DtPaperMapFactoryEntry
30 // indexed by the DtString type that represents the type of file able to load.
31 //
32 
34 {
35 public:
36 
37  typedef DtPaperMap* (*DtPaperMapCreator)();
38  typedef std::map<DtString, DtPaperMapCreator> DtPaperMapCreatorContainer;
39 
40  // constructor
42 
43  // copy constructor
45 
46  // assignment operator
47  const DtPaperMapFactory& operator=(
48  const DtPaperMapFactory& orig);
49 
50  // Destructor: deletes factory and any entries on the factory.
51  virtual ~DtPaperMapFactory();
52 
53  // Registers all the default creators with the factory.
54  virtual void init();
55 
56  virtual void setMetafileFactory(DtTdbMetafileFactory* factory);
57  virtual DtTdbMetafileFactory* metafileFactory();
58  virtual const DtTdbMetafileFactory* metafileFactory() const;
59 
60  // Register a creator with the factory.
61  virtual void registerPaperMapCreator(const DtString &type, DtPaperMapCreator fcn);
62 
63  // creator functions callers
64  virtual DtPaperMap* createPaperMap(const DtString &type);
65 
66 
67  // loading functions
68  virtual bool loadPaperMap(const DtFilename& fileName, DtTerrainDatabase* terrain,
69  DtPaperMapDatabase*& paperMapDatabase, const DtList& searchPaths);
70 
71  static DtPaperMapFactory* create();
72 
73 protected:
74 
76 
77  virtual bool loadPaperMap(const DtFilename& fileName,
78  DtTerrainDatabase* terrain, DtPaperMapDatabase*& paperMapDatabase);
79 
82 };
83 
84 #endif
85 
86 
DtPaperMapCreatorContainer myPaperMapCreators
Definition: paperMapFactory.h:80
Definition: paperMapFactory.h:33
DtTdbMetafileFactory * myTdbMetafileFactory
Definition: paperMapFactory.h:81
Definition: paperMapDatabase.h:20
Definition: paperMap.h:31
Definition: tdbMetafileFactory.h:26
#define DT_DLL_terrainDbFactory
Definition: terrainDbFactoryDefines.h:23
std::map< DtString, DtPaperMapCreator > DtPaperMapCreatorContainer
Definition: paperMapFactory.h:38
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
Definition: terrainDatabase.h:148

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)