VR-Forces 4.0.4 Class Documentation
include/terrainDbFactory/tdbMetafileFactory.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1998 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: tdbMetafileFactory.h,v $ $Revision: 1.8 $ $State: Exp $
00007 *******************************************************************************/
00008 #ifndef tdbMetafileFactory_H_
00009 #define tdbMetafileFactory_H_
00010 
00011 // \file tdbMetafileFactory.h
00012 // \brief Contains the DtTdbMetafileFactory class declaration.
00013 
00014 #include "terrainDbFactory/terrainDbFactoryDefines.h"
00015 #include <vlutil/vlFilename.h>
00016 #include <vlutil/vlConfig.h>
00017 #include <map>
00018 
00019 class DtMetafileRecord;
00020 
00021 // Instances of this class used as factories to create the metafile records
00022 // used when loading supported terrain files through .map files.  The .map files
00023 // contain metafile records, which are created through this factory, and used
00024 // to initialize the terrain reader initializers, which are then passed to the
00025 // terrain readers.
00026 class DT_DLL_terrainDbFactory DtTdbMetafileFactory
00027 {
00028 public:
00029    typedef DtMetafileRecord* (*DtTdbMetafileCreatorFcn)();
00030    typedef std::map<DtString, DtTdbMetafileCreatorFcn> DtTdbMetafileCreatorContainer;
00031 
00032    // default constructor.
00033    DtTdbMetafileFactory();
00034 
00035    // copy constructor
00036    DtTdbMetafileFactory(const DtTdbMetafileFactory& orig);
00037 
00038    // assignment operator
00039    const DtTdbMetafileFactory& operator=(const DtTdbMetafileFactory& orig);
00040 
00041    // destructor
00042    virtual ~DtTdbMetafileFactory();
00043 
00044    // Registers the default creators with the factory
00045    virtual void init();
00046 
00047    // Add a creator function to the factory.
00048    virtual void registerTdbMetafileCreator(const DtString &type, DtTdbMetafileCreatorFcn fcn);
00049 
00050    virtual DtMetafileRecord* createMetafileRecord(const DtString &type) const;
00051 
00052 protected:
00053 
00054    DtTdbMetafileCreatorContainer myTdbMetafileCreators;
00055 };
00056 
00057 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)