35 #ifndef _RelatedDoc8643_h_
36 #define _RelatedDoc8643_h_
59 const char*
RelatedLoad (
const std::string _paths[],
size_t _num);
81 char wtc[4] = {0,0,0,0};
84 Doc8643 (
const std::string& _classification,
85 const std::string& _wtc);
106 const char*
Doc8643Load (
const std::string& _path);
126 s (std::move(_s)),
r (std::move(_r)) {}
Definition: XPMPAircraft.h:70
const char * RelatedLoad(RelTxtTy relType, const std::string &_path)
Read the related.txt file, full path passed in.
Definition: RelatedDoc8643.cpp:63
const Doc8643 & Doc8643Get(const std::string &_type)
Return a reference to the matching Doc8643 object.
Definition: RelatedDoc8643.cpp:246
std::map< std::string, int > mapRelatedTy
Map of group membership: ICAO a/c type maps to line in related.txt.
Definition: RelatedDoc8643.h:51
std::map< std::string, Doc8643 > mapDoc8643Ty
Map of Doc8643 information, key is the (icao) type code.
Definition: RelatedDoc8643.h:103
std::list< Obj8DataRefs > listObj8DataRefsTy
a list of Obj8DataRefs definitions
Definition: RelatedDoc8643.h:130
int RelatedGet(RelTxtTy relType, const std::string &_acType)
Find the related group for a given key, 0 if none.
Definition: RelatedDoc8643.cpp:146
const char * Doc8643Load(const std::string &_path)
Load the content of the provided Doc8643.txt file.
Definition: RelatedDoc8643.cpp:182
const char * Obj8DataRefsLoad(const std::string &_path)
Load the content of the provided Obj8DataRefs.txt file.
Definition: RelatedDoc8643.cpp:263
bool Doc8643IsTypeValid(const std::string &_type)
Is the given aircraft type a valid ICAO type as per Doc8643?
Definition: RelatedDoc8643.cpp:253
RelTxtTy
Definition: RelatedDoc8643.h:44
@ REL_TXT_NUM
always last: number of "related" files
Definition: RelatedDoc8643.h:47
@ REL_TXT_DESIGNATOR
related file for plane type (designator), related.txt
Definition: RelatedDoc8643.h:45
@ REL_TXT_OP
related file for operators, relOp.txt
Definition: RelatedDoc8643.h:46
Represents a line in the Doc8643.txt file, of which we use only classification and WTC.
Definition: RelatedDoc8643.h:78
Doc8643()
Definition: RelatedDoc8643.h:83
bool HasRotor() const
Definition: RelatedDoc8643.h:94
bool empty() const
Is empty, doesn't contain anything?
Definition: RelatedDoc8643.h:88
int GetNumEngines() const
Definition: RelatedDoc8643.h:92
char wtc[4]
Definition: RelatedDoc8643.h:81
char GetClassNumEng() const
Definition: RelatedDoc8643.h:91
int GetWakeCat() const
Returns the wake category as per XP12's wake system.
Definition: RelatedDoc8643.cpp:169
char classification[4]
Definition: RelatedDoc8643.h:80
char GetClassEngType() const
Definition: RelatedDoc8643.h:93
char GetClassType() const
Definition: RelatedDoc8643.h:90
A pair of strings, first one to search for, second one to replace it with.
Definition: RelatedDoc8643.h:120
Obj8DataRefs(std::string &&_s, std::string &&_r)
Constructor just loads the strings.
Definition: RelatedDoc8643.h:125
std::string r
if found replace it with this string
Definition: RelatedDoc8643.h:122
std::string s
search the .obj file for this string
Definition: RelatedDoc8643.h:121