![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2005 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: mtFltGridDs.h,v $ $Revision: 1.15 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00009 #ifndef mtFltGridDs_H_ 00010 #define mtFltGridDs_H_ 00011 00012 // 00013 // \file mtFltGridDs.h 00014 // \brief Represents an abstraction of a GridDataSet node inside a Metaflight file. 00015 // 00016 00017 #include "mtflt/mtfltDefines.h" 00018 #include "mtflt/mtFltDs.h" 00019 #include <vlutil/vlConfig.h> 00020 #include <vector> 00021 #include <string> 00022 class DtMtFltGridStack; 00023 00024 using namespace std; 00025 00026 00027 // \brief Represents an abstraction of a GridDataSet node inside a Metaflight file. 00028 // A GridDataset is an abstract class that represents a Dataset with geographic area 00029 // that is subdivided into a multi-leveled grid (a GridStack) 00030 class DT_DLL_mtflt DtMtFltGridDs : public DtMtFltDataset 00031 { 00032 public: 00033 00034 // Default constructor. 00035 DtMtFltGridDs(); 00036 00037 // Destructor 00038 virtual ~DtMtFltGridDs(); 00039 00040 // Copy constructor 00041 DtMtFltGridDs(const DtMtFltGridDs& node); 00042 00043 // Assignment operator 00044 DtMtFltGridDs& operator=(const DtMtFltGridDs& orig); 00045 00046 // Overrides the \p DtMtFltNode::readNode method to read the 00047 // common information to all GridDataSet nodes in the Metaflight file. 00048 // \param root pointer to the root node of the document 00049 // \param node pointer to the xml node that will be read 00050 // \return \b true if success reading the node. \b false otherwise. 00051 virtual bool readNode(const xmlNodePtr root, xmlNodePtr node); 00052 00053 // Returns the grid stack associated with the Dataset 00054 virtual const DtMtFltGridStack* gridStack() const; 00055 00056 // Returns a vector with the filenames that conform this dataset 00057 // \param mftFilename name of the metaflight file 00058 // \param files vector of strings containing all the filenames with the 00059 // highest level of detail that match the filenamepattern in this dataset. 00060 virtual bool files(const DtFilename& mftFilename, vector<string>& files); 00061 00062 protected: 00063 00064 DtMtFltGridStack* myGridStack; 00065 //list< mfCoordSys* > m_CoordSysUsed; 00066 00068 bool DtReplaceString(string& source, const string oldstr, const string newstr); 00069 00072 bool DtReplaceString(string& source, const string oldstr, int newval); 00073 00075 bool hasEnvironmentVariable(DtString& rootPath, DtString& envVar); 00076 00078 void getRootPath(const DtFilename& mftFilename, DtString &rp); 00079 00081 void solveEnvironmentVariable(DtString& rootPath, const DtString envVar); 00082 00084 void solveStaticAttributesFilePattern(string& filePattern); 00085 }; 00086 00087 #endif