VR-Forces 4.0.4 Class Documentation
include/terrainDbFactory/mResPprMapRec.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 1998 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: mResPprMapRec.h,v $ $Revision: 1.12 $ $State: Exp $
00007 *******************************************************************************/
00008 
00009 #ifndef DtMultiResPaperMapRecord_H_
00010 #define DtMultiResPaperMapRecord_H_
00011 
00012 #include "terrainDbFactory/terrainDbFactoryDefines.h"
00013 #include "terrainDbFactory/pprMapRec.h"
00014 
00015 #include "geometry/point.h"
00016 
00017 #include <iosfwd>
00018 
00019 // class DtMultiResPaperMapRecord:
00020 //
00021 // Instances of this class are accessors to Mak terrain database metafiles.
00022 // This record points to a mtl file which contains the information for 
00023 // form a paper map out of a set of pageable raster images.
00024 
00025 class DT_DLL_terrainDbFactory DtMultiResPaperMapRecord : public DtPaperMapRecord
00026 {
00027 
00028 public:
00029 
00030    // default constructor.
00031    DtMultiResPaperMapRecord();
00032 
00033    // destructor
00034    virtual ~DtMultiResPaperMapRecord();
00035 
00036    // copy constructor
00037    DtMultiResPaperMapRecord(const DtMultiResPaperMapRecord& orig);
00038 
00039    // assignment operator
00040    DtMultiResPaperMapRecord& operator=(const DtMultiResPaperMapRecord& rhs);
00041 
00042    virtual DtPaperMapRecord* clone();
00043 
00044    // Returns the record type.
00045    virtual DtString recordTypeName() const;
00046 
00047    // Read self from stream.
00048    virtual bool get(std::istream& stream);
00049 
00050    // identifies a token or passes it to the parent class
00051    virtual bool processToken(std::istream& stream, DtString& token);
00052 
00053    static DtMetafileRecord * create();
00054 
00055    void setCacheImages(bool);
00056 
00057    bool cacheImages() const;
00058 
00059 protected:
00060 
00061    // Write self to stream.
00062    virtual bool writeAttributes(std::ostream& stream) const;
00063    virtual bool getAttribute(const DtString attrName, DtString& value, unsigned index=0);
00064    virtual bool setToken(const DtString& token, const DtString value);
00065 
00066 protected:
00067    // If true (default is false) images, when loaded, will not be unloaded
00068    // but rather cached in the system.  Set this flag to true when performance
00069    // is more of an issue than memory usage.
00070    bool  myCacheImages;
00071    static const DtString theParameterCacheImages;
00072 };
00073 
00074 inline void DtMultiResPaperMapRecord::setCacheImages(bool b)
00075 {
00076    myCacheImages = b;
00077 }
00078 
00079 inline bool DtMultiResPaperMapRecord::cacheImages() const
00080 {
00081    return myCacheImages;
00082 }
00083 
00084 #endif
00085 

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)