VR-Forces 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 
12 #include "vrfutil/vrfutilDefines.h"
14 
15 #include <string>
16 #include <fstream>
17 #include <vector>
18 
19 #include <boost/date_time/posix_time/posix_time.hpp>
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 
32 {
33 public:
34  DtUsmtfParser();
35  virtual ~DtUsmtfParser() {}
36 
38  virtual bool init();
39 
41  /* static DtAirportDataMap& airportDataMap() { return theAirportDataMap; }
42  static DtCodeMap& sclMissionTypeMap() { return theSCLMissionTypeMap; }
43  static DtCodeMap& sclAirGroundWeaponMap() { return theSCLAirGroundWeaponMap; }
44  static DtCodeMap& sclReverseAirGroundWeaponMap() { return theSCLReverseAirGroundWeaponMap; }
45  static DtCodeMap& sclAirGroundQualifierMap() { return theSCLAirGroundQualifierMap; }
46  static DtCodeMap& sclAirAirWeaponMap() { return theSCLAirAirWeaponMap; }
47  static DtCodeMap& sclReverseAirAirWeaponMap() { return theSCLReverseAirAirWeaponMap; }
48  static DtCodeMap& sclHeloWeaponMap() { return theSCLHeloWeaponMap; }
49  static DtCodeMap& sclReconTypeMap() { return theSCLReconTypeMap; }
50  static DtCodeMap& sclAirliftTypeMap() { return theSCLAirliftTypeMap; }
51  static DtCodeMap& atoAircraftTypeMap() { return theAtoAircraftTypeMap; }
52 
53 private:
54  static DtAirportDataMap theAirportDataMap;
55  static DtCodeMap theSCLMissionTypeMap;
56  static DtCodeMap theSCLAirGroundWeaponMap;
57  static DtCodeMap theSCLReverseAirGroundWeaponMap;
58  static DtCodeMap theSCLAirGroundQualifierMap;
59  static DtCodeMap theSCLAirAirWeaponMap;
60  static DtCodeMap theSCLReverseAirAirWeaponMap;
61  static DtCodeMap theSCLHeloWeaponMap;
62  static DtCodeMap theSCLReconTypeMap;
63  static DtCodeMap theSCLAirliftTypeMap;
64  static DtCodeMap theAtoAircraftTypeMap;
65  */
66 
67 public:
68 
70  static double calcDegrees( const double& deg, const double& min = 0.0, const double& sec = 0.0, char hemisphere = '-' );
72  static string eraseHead( const string& input, const string& prefix );
73 
74 protected:
76  void parseLatLonSec( const string& input, double& lat, double& lon, const string& prefix = "" );
77  void parseLatLonMin( const string& input, double& lat, double& lon, const string& prefix = "" );
78  void parseLatLonCentiSec( const string& input, double& lat, double& lon, const string& prefix = "" );
79  void parseLatLonVLATS( const string& input, double& lat, double& lon, const string& prefix = "" );
80 
84  bool parseDateTime7( const string& input, const ptime& prevTime, ptime& time, const string& prefix = "" );
88  bool parseDateTime9( const string& input, const ptime& prevTime, ptime& time, const string& prefix = "" );
91  bool parseDateTime10( const string& input, const time_period& timeFrame, ptime& time, const string& prefix = "" );
93  bool parseDateTime14( const string& input, ptime& time, const string& prefix = "" );
94 
98  bool checkAndAssign( string& sData, const vector<string>& tokens, size_t tokenIndex, const string& prefix = "" );
99 
100 };
USMTF parser Has been used with USMTF 2004 Baseline.
Definition: usmtfParser.h:31
This class is the base class for parsing out creation information from various textual formats...
Definition: createObjectParser.h:48
virtual ~DtUsmtfParser()
Definition: usmtfParser.h:35
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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)