VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vectorDataFactory.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1999 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: vectorDataFactory.h,v $ $Revision: 1.9 $ $State: Exp $
7 *******************************************************************************/
8 #ifndef vectorDataFactory_H_
9 #define vectorDataFactory_H_
10 
11 //
12 // \file vectorDataFactory.h
13 // \brief Contains the DtVectorDataFactory class declaration.
14 //
15 
17 #include <vlutil/vlFilename.h>
18 #include <vlutil/vlList.h>
19 #include <map>
20 
22 class DtTerrainDatabase;
23 class DtVectorDataReader;
24 
25 
26 //
27 // Instances of this class used as factories to create the vector data metafile
28 // records used when loading supported vector files through .map files. The metafile
29 // records are created from entries in the .map terrain files, and are used to
30 // initialize the vector data importer initializers.
32 {
33 public:
34 
35  typedef DtVectorDataReader* (*DtVectorDataCreator)();
36  typedef std::map<DtString, DtVectorDataCreator> DtVectorDataCreatorContainer;
37 
38 
39  // constructor
41 
42  // copy constructor
44 
45  // assignment operator
46  const DtVectorDataFactory& operator=(const DtVectorDataFactory& orig);
47 
48  // Destructor: deletes factory and any entries on the factory.
49  virtual ~DtVectorDataFactory();
50 
51  // registers vector data creators
52  // register a creator for:
53  // dfad
54  // dfd
55  // shape
56  // vpf
57  virtual void init();
58 
59  virtual void setMetafileFactory(DtTdbMetafileFactory* factory);
60  virtual const DtTdbMetafileFactory* metafileFactory() const;
61  virtual DtTdbMetafileFactory* metafileFactory();
62 
63  // Add a creator function to the factory.
64  virtual void registerVectorDataCreator(const DtString &type, DtVectorDataCreator fcn);
65 
66  // creator functions callers
67  virtual DtVectorDataReader* createVectorDataReader(const DtString &type);
68 
69  // loading functions
70  virtual bool loadVectorData(const DtFilename& fileName,
71  DtTerrainDatabase* terrain, const DtList& searchPaths);
72 
73  static DtVectorDataFactory* create();
74 
75 protected:
76 
78 
79  virtual bool loadVectorData(const DtFilename& fileName, DtTerrainDatabase* terrain);
80 
83 };
84 
85 #endif

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)