VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
createObjectParser.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
7 
10 
11 #pragma once
12 
13 #include "vrfutil/tokenizer.h"
14 #include <vlpi/entityType.h>
15 #include <vlutil/vlString.h>
16 #include <matrix/vlVector.h>
17 #include <map>
18 
19 #include <terrainCS/coordSystem.h>
20 
22 {
23  ObjectInformation() : force(0), heading(0.), width(0.), floor(0.), ceiling(0.), activeTime(0), deactiveTime(0), usingAGL(false), color(0) {};
24 
25  DtString name;
26  DtEntityType type;
27  int force;
29  std::vector<DtVector> points;
30  double heading;
31  double width;
32  double floor;
33  double ceiling;
36  bool usingAGL;
37  int color;
38 };
39 
41 typedef std::vector<ObjectInformation*> ObjectList;
42 typedef std::map<std::string, DtEntityType> ObjectEntityTypeMap;
43 
44 #include "vrfutil/vrfutilDefines.h"
49 {
50 public:
52  ~DtObjectParser();
53 
54 public:
55 
57  virtual bool parseFile(const string& filename);
58 
60  virtual bool parse(istream& stream){ return false; };
61 
64  virtual ObjectList& getCreateObjectList();
65 
67  virtual void initTypeMap(const std::map<std::string, std::string>& importData);
68 
69  virtual ObjectEntityTypeMap* typeMap();
70 
71 protected:
72 
79  void setSeparatorData(const string& recordSeparator, const string& fieldSeparators,
80  const string& quoteChars, const string& escapeChars);
81 
83  virtual void clear();
84 
85 protected:
86 
92 };
93 
double heading
Object&#39;s location(s) in local coordinates.
Definition: createObjectParser.h:30
double width
Definition: createObjectParser.h:31
ObjectInformation()
Definition: createObjectParser.h:23
bool usingAGL
Definition: createObjectParser.h:36
Coordinate_System * myCoordSystem
Definition: createObjectParser.h:90
This class is the base class for parsing out creation information from various textual formats...
Definition: createObjectParser.h:48
Definition: coordSystem.h:54
Class DtObjectParser is an abstract parser that can be configured to parse object creation informatio...
Definition: createObjectParser.h:21
int activeTime
Definition: createObjectParser.h:34
DtTokenizer myTokenizer
Definition: createObjectParser.h:89
A generic tokenizer class that can be used to read in a stream of data and parse it into tokens...
Definition: tokenizer.h:26
DtString parent
Object&#39;s force type.
Definition: createObjectParser.h:28
std::map< std::string, DtEntityType > ObjectEntityTypeMap
Definition: createObjectParser.h:42
double floor
Definition: createObjectParser.h:32
virtual bool parse(istream &stream)
Derived classes will set up the tokenizer and determine how extract field information for each record...
Definition: createObjectParser.h:60
DtString name
Definition: createObjectParser.h:23
voidpf stream
Definition: ioapi.h:39
std::vector< ObjectInformation * > ObjectList
Map by name of objects in the scenario.
Definition: createObjectParser.h:41
int force
The DIS Enumeration of the object.
Definition: createObjectParser.h:27
std::vector< DtVector > points
Object&#39;s superior or overlay layer.
Definition: createObjectParser.h:29
double ceiling
Object is extruded so grab floor/ceiling.
Definition: createObjectParser.h:33
#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
int color
If true floor/ceiling is meters above ground level, otherwise MSL.
Definition: createObjectParser.h:37
DtEntityType type
The name of the object.
Definition: createObjectParser.h:26
ObjectList myCreateObjectList
vector to keep track of all of the Aco Data that we have parsed
Definition: createObjectParser.h:88
ObjectEntityTypeMap myTypeMap
Definition: createObjectParser.h:91
int deactiveTime
Definition: createObjectParser.h:35

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)