VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
usmtfParser.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
7 
9 
10 #pragma once
11 #include <string>
12 #include <fstream>
13 #include <vector>
14 
16 
17 #include <boost/date_time/posix_time/posix_time.hpp>
18 
19 
20 
21 
22 using namespace std;
23 using namespace boost::gregorian;
24 using namespace boost::posix_time;
25 
26 //class DtAirportDataMap;
27 //class DtCodeMap;
28 
31 #include "vrfutil/vrfutilDefines.h"
33 {
34 public:
35  DtUsmtfParser();
36  virtual ~DtUsmtfParser() {}
37 
39  virtual bool init();
40 
42  /* static DtAirportDataMap& airportDataMap() { return theAirportDataMap; }
43  static DtCodeMap& sclMissionTypeMap() { return theSCLMissionTypeMap; }
44  static DtCodeMap& sclAirGroundWeaponMap() { return theSCLAirGroundWeaponMap; }
45  static DtCodeMap& sclReverseAirGroundWeaponMap() { return theSCLReverseAirGroundWeaponMap; }
46  static DtCodeMap& sclAirGroundQualifierMap() { return theSCLAirGroundQualifierMap; }
47  static DtCodeMap& sclAirAirWeaponMap() { return theSCLAirAirWeaponMap; }
48  static DtCodeMap& sclReverseAirAirWeaponMap() { return theSCLReverseAirAirWeaponMap; }
49  static DtCodeMap& sclHeloWeaponMap() { return theSCLHeloWeaponMap; }
50  static DtCodeMap& sclReconTypeMap() { return theSCLReconTypeMap; }
51  static DtCodeMap& sclAirliftTypeMap() { return theSCLAirliftTypeMap; }
52  static DtCodeMap& atoAircraftTypeMap() { return theAtoAircraftTypeMap; }
53 
54 private:
55  static DtAirportDataMap theAirportDataMap;
56  static DtCodeMap theSCLMissionTypeMap;
57  static DtCodeMap theSCLAirGroundWeaponMap;
58  static DtCodeMap theSCLReverseAirGroundWeaponMap;
59  static DtCodeMap theSCLAirGroundQualifierMap;
60  static DtCodeMap theSCLAirAirWeaponMap;
61  static DtCodeMap theSCLReverseAirAirWeaponMap;
62  static DtCodeMap theSCLHeloWeaponMap;
63  static DtCodeMap theSCLReconTypeMap;
64  static DtCodeMap theSCLAirliftTypeMap;
65  static DtCodeMap theAtoAircraftTypeMap;
66  */
67 
68 public:
69 
71  static double calcDegrees( const double& deg, const double& min = 0.0, const double& sec = 0.0, char hemisphere = '-' );
73  static string eraseHead( const string& input, const string& prefix );
74 
75 protected:
77  void parseLatLonSec( const string& input, double& lat, double& lon, const string& prefix = "" );
78  void parseLatLonMin( const string& input, double& lat, double& lon, const string& prefix = "" );
79  void parseLatLonCentiSec( const string& input, double& lat, double& lon, const string& prefix = "" );
80  void parseLatLonVLATS( const string& input, double& lat, double& lon, const string& prefix = "" );
81 
85  bool parseDateTime7( const string& input, const ptime& prevTime, ptime& time, const string& prefix = "" );
89  bool parseDateTime9( const string& input, const ptime& prevTime, ptime& time, const string& prefix = "" );
92  bool parseDateTime10( const string& input, const time_period& timeFrame, ptime& time, const string& prefix = "" );
94  bool parseDateTime14( const string& input, ptime& time, const string& prefix = "" );
95 
99  bool checkAndAssign( string& sData, const vector<string>& tokens, size_t tokenIndex, const string& prefix = "" );
100 
101 };
USMTF parser Has been used with USMTF 2004 Baseline.
Definition: usmtfParser.h:32
This class is the base class for parsing out creation information from various textual formats...
Definition: createObjectParser.h:48
virtual ~DtUsmtfParser()
Definition: usmtfParser.h:36
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)