VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
terrainDbFactory
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
16
#include "
terrainDbFactory/terrainDbFactoryDefines.h
"
17
#include <vlutil/vlFilename.h>
18
#include <vlutil/vlList.h>
19
#include <map>
20
21
class
DtTdbMetafileFactory
;
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.
31
class
DT_DLL_terrainDbFactory
DtVectorDataFactory
32
{
33
public
:
34
35
typedef
DtVectorDataReader
* (*DtVectorDataCreator)();
36
typedef
std::map<DtString, DtVectorDataCreator>
DtVectorDataCreatorContainer
;
37
38
39
// constructor
40
DtVectorDataFactory
(
DtTdbMetafileFactory
* factory);
41
42
// copy constructor
43
DtVectorDataFactory
(
const
DtVectorDataFactory
& orig);
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
77
DtVectorDataFactory
();
78
79
virtual
bool
loadVectorData(
const
DtFilename& fileName,
DtTerrainDatabase
* terrain);
80
81
DtVectorDataCreatorContainer
myVectorCreators
;
82
DtTdbMetafileFactory
*
myTdbMetafileFactory
;
83
};
84
85
#endif
Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)