|
#define | WARN_ASYNC_LOAD_ONGOING "Async load operation ongoing while object is being destroyed for %s" |
|
#define | WARN_REF_CNT "Reference counter is %u while object is being destroyed for %s" |
|
#define | WARN_REF_CNT_ZERO "Reference counter already 0, can't be decreaed, for %s" |
|
#define | DEBUG_OBJ_LOADING "Async load starting for %s from %s" |
|
#define | DEBUG_OBJ_LOADED "Async load succeeded for %s from %s" |
|
#define | DEBUG_OBJ_UNLOADED "Object %s / %s unloaded" |
|
#define | ERR_OBJ_OBJ_NOT_FOUND "Async load for %s: CSLObj in CSLModel object not found!" |
|
#define | ERR_OBJ_NOT_FOUND "Async load for %s: CSLModel object not found!" |
|
#define | ERR_OBJ_NOT_LOADED "Async load FAILED for %s from %s" |
|
#define | XSB_AIRCRAFT_TXT "xsb_aircraft.txt" |
| The file holding package information. More...
|
|
#define | DEBUG_XSBACTXT_READ "Processing %s" |
|
#define | INFO_XSBACTXT_DONE "Read %3d aircraft %s from %s" |
|
#define | WARN_XSBACTXT_IGNORED "Ignored %d aircraft %s due to outdated format (OBJECT or AIRCRAFT) from %s" |
|
#define | INFO_TOTAL_NUM_MODELS "Total number of known models now is %lu" |
|
#define | WARN_NO_XSBACTXT_FOUND "No xsb_aircraft.txt found" |
|
#define | WARN_DUP_PKG_NAME "Package name (EXPORT_NAME) '%s' in folder '%s' is already in use by '%s'" |
|
#define | WARN_DUP_MODEL "Duplicate model '%s', additional definitions ignored, originally defined in line %d of %s" |
|
#define | WARN_OBJ8_ONLY "Line %d: Only supported format is OBJ8, ignoring model definition %s" |
|
#define | WARN_PKG_DPDCY_FAILED "Line %d: Dependent package '%s' not known! May lead to follow-up issues when proessing this package." |
|
#define | WARN_DIFF_TYPE "Line %d: Different aircraft type (%s instead of %s) for model '%s' ignored, rest processed" |
|
#define | ERR_TOO_FEW_PARAM "Line %d: %s expects at least %d parameters" |
|
#define | ERR_PKG_NAME_INVALID "Line %d: Package path invalid: %s" |
|
#define | ERR_PKG_UNKNOWN "Line %d: Package '%s' unknown in package path %s" |
|
#define | ERR_OBJ_FILE_NOT_FOUND "Line %d: The file '%s' could not be found at %s" |
|
#define | ERR_COULD_NOT_OPEN "Could not open '%s' for reading!" |
|
#define | WARN_IGNORED_COMMANDS "Following commands ignored: " |
|
#define | WARN_OBJ8_ONLY_VERTOFS "Version is '%s', unsupported for reading vertical offset, file %s" |
|
#define | ERR_MATCH_NO_MODELS "MATCH ABORTED - There is not any single CSL model available!" |
|
#define | DEBUG_MATCH_INPUT "MATCH INPUT: Type=%s (WTC=%s,Class=%s,Related=%d), Airline=%s (relOp=%d), Livery=%s" |
|
#define | DEBUG_MATCH_FOUND "MATCH FOUND: Type=%s (WTC=%s,Class=%s,Related=%d), Airline=%s (relOp=%d), Livery=%s / Quality = %d -> %s" |
|
#define | DEBUG_MATCH_NOTFOUND "MATCH ERROR: Using a RANDOM model: %s %s %s - model %s" |
|
|
std::string | XPMP2::CSLModelGetKeyStr (int _related, const std::string &_type, const std::string &_id) |
| compiles the string used as key in the CSL model map More...
|
|
std::string | XPMP2::CSLModelsConvPackagePath (const std::string &pkgPath, int lnNr, bool bPkgOptional=false) |
| Turn a relative package path into a full path. More...
|
|
void | XPMP2::CSLModelsAdd (CSLModel &_csl) |
| Adds a readily defined CSL model to all the necessary maps. More...
|
|
const char * | XPMP2::CSLModelsReadPkgId (const std::string &path) |
| Scans an xsb_aircraft.txt file for EXPORT_NAME entries to fill the list of packages. More...
|
|
const char * | XPMP2::CSLModelsFindPkgs (const std::string &_path, std::vector< std::string > &paths, int _maxDepth=5) |
| Recursively scans folders to find xsb_aircraft.txt files of CSL packages. More...
|
|
void | XPMP2::AcTxtLine_DEPENDENCY (std::vector< std::string > &tokens, int lnNr) |
| Process an DEPENDENCY line of an xsb_aircraft.txt file. More...
|
|
void | XPMP2::AcTxtLine_OBJ8_AIRCRAFT (CSLModel &csl, const std::string &ln, const std::string &xsbAircraftPath, const std::string &exportName, int lnNr) |
| Process an OBJ8_AIRCRAFT line of an xsb_aircraft.txt file. More...
|
|
void | XPMP2::AcTxtLine_OBJECT_AIRCRAFT (CSLModel &csl, const std::string &, int) |
| Process an OBJECT or AIRCRAFT line of an xsb_aircraft.txt file (which are no longer supported) More...
|
|
void | XPMP2::AcTxtLine_OBJ8 (CSLModel &csl, std::vector< std::string > &tokens, int lnNr) |
|
void | XPMP2::AcTxtLine_VERT_OFFSET (CSLModel &csl, std::vector< std::string > &tokens, int lnNr) |
| Process an VERT_OFFSET line of an xsb_aircraft.txt file. More...
|
|
void | XPMP2::AcTxtLine_OFFSET (CSLModel &csl, std::vector< std::string > &tokens, int lnNr) |
|
void | XPMP2::AcTxtLine_MATCHES (CSLModel &csl, std::vector< std::string > &tokens, int lnNr) |
| Process an ICAO, AIRLINE, LIVERY, or MATCHES line of an xsb_aircraft.txt file. More...
|
|
int | XPMP2::StrCntString (const mapStrIntTy &m, std::string &s) |
| Compiles a string from a map of string->int like "(A320 x 5, A388 x 12)". More...
|
|
const char * | XPMP2::CSLModelsProcessAcFile (const std::string &path) |
| Process one xsb_aircraft.txt file for importing OBJ8 models. More...
|
|
void | XPMP2::CSLModelsInit () |
| Initialization. More...
|
|
void | XPMP2::CSLModelsCleanup () |
| Grace cleanup. More...
|
|
const char * | XPMP2::CSLModelsLoad (const std::string &_path, int _maxDepth=5) |
| Read the CSL Models found in the given path and below. More...
|
|
CSLModel * | XPMP2::CSLModelById (const std::string &_cslId, mapCSLModelTy::iterator *_pOutIter=nullptr) |
| Find a model by unique id. More...
|
|
CSLModel * | XPMP2::CSLModelByKey (const std::string &_cslKey, mapCSLModelTy::iterator *_pOutIter=nullptr) |
| Find a model by (even more) unique key. More...
|
|
CSLModel * | XPMP2::CSLModelByPkgShortId (std::uint16_t _pkgHash, const std::string &_shortId) |
| Find a model by package name hash and short id. More...
|
|
template<class IteratorT > |
IteratorT | XPMP2::iterRnd (IteratorT lower, IteratorT upper) |
| Returns any random value in the range [cslLower; cslUpper) , or upper if there is no value in that range. More...
|
|
bool | XPMP2::CSLFindMatch (const std::string &_type, const std::string &_airline, const std::string &_livery, bool bIgnoreNoMatch, int &quality, CSLModel *&pModel) |
| Tries finding a match using both aircraft and Doc8643 attributes. More...
|
|
int | XPMP2::CSLModelMatching (const std::string &_type, const std::string &_airline, const std::string &_livery, CSLModel *&pModel) |
| Find a matching model. More...
|
|
Managing CSL Models, including matching and loading.
- Author
- Birger Hoppe
- Copyright
- (c) 2020 Birger Hoppe
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.