VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
terrainDbFactory
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
16
#include "
terrainDbFactory/terrainDbFactoryDefines.h
"
17
#include <vlutil/vlFilename.h>
18
#include <vlutil/vlList.h>
19
#include <map>
20
21
class
DtPaperMapDatabase
;
22
class
DtPaperMap
;
23
class
DtTerrainDatabase
;
24
class
DtTdbMetafileFactory
;
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
33
class
DT_DLL_terrainDbFactory
DtPaperMapFactory
34
{
35
public
:
36
37
typedef
DtPaperMap
* (*DtPaperMapCreator)();
38
typedef
std::map<DtString, DtPaperMapCreator>
DtPaperMapCreatorContainer
;
39
40
// constructor
41
DtPaperMapFactory
(
DtTdbMetafileFactory
* factory);
42
43
// copy constructor
44
DtPaperMapFactory
(
const
DtPaperMapFactory
& orig);
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
75
DtPaperMapFactory
();
76
77
virtual
bool
loadPaperMap(
const
DtFilename& fileName,
78
DtTerrainDatabase
* terrain,
DtPaperMapDatabase
*& paperMapDatabase);
79
80
DtPaperMapCreatorContainer
myPaperMapCreators
;
81
DtTdbMetafileFactory
*
myTdbMetafileFactory
;
82
};
83
84
#endif
85
86
Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)