XPMP2
X-Plane multiplayer library 2 - using instancing
Aircraft.h
Go to the documentation of this file.
1 
21 #ifndef _Aircraft_h_
22 #define _Aircraft_h_
23 
24 namespace XPMP2 {
25 
27 class [[deprecated("Don't use directly, only defined to support deprecated global XPMP functions")]]
28 LegacyAircraft : public XPCAircraft {
29 protected:
31  XPMPPlaneData_f dataFunc = nullptr;
33  void* refcon = nullptr;
34 public:
36  LegacyAircraft(const char* inICAOCode,
37  const char* inAirline,
38  const char* inLivery,
39  XPMPPlaneData_f inDataFunc,
40  void * inRefcon,
41  XPMPPlaneID inModeS_id = 0,
42  const char * inModelName = nullptr);
43 
45  virtual XPMPPlaneCallbackResult GetPlanePosition(XPMPPlanePosition_t* outPosition);
47  virtual XPMPPlaneCallbackResult GetPlaneSurfaces(XPMPPlaneSurfaces_t* outSurfaces);
49  virtual XPMPPlaneCallbackResult GetPlaneRadar(XPMPPlaneRadar_t* outRadar);
51  virtual XPMPPlaneCallbackResult GetInfoTexts(XPMPInfoTexts_t * outInfoTexts);
52 };
53 
57 typedef std::map<XPMPPlaneID,Aircraft*> mapAcTy;
58 
59 //
60 // MARK: Global Functions
61 //
62 
64 void AcInit ();
65 
67 void AcCleanup ();
68 
69 } // namespace XPMP2
70 
71 #endif
XPMPPlaneCallbackResult(* XPMPPlaneData_f)(XPMPPlaneID inPlane, XPMPPlaneDataType inDataType, void *ioData, void *inRefcon)
Callback function your plugin provides to return updated plane data.
Definition: XPMPMultiplayer.h:616
XPMPPlaneCallbackResult
Definfes the different responses to asking for information.
Definition: XPMPMultiplayer.h:240
unsigned XPMPPlaneID
Unique ID for an aircraft created by a plugin.
Definition: XPMPMultiplayer.h:252
Textual information of planes to be passed on via shared dataRefs to other plugins.
Definition: XPMPMultiplayer.h:208
This data structure contains the basic position info for an aircraft.
Definition: XPMPMultiplayer.h:88
defines information about an aircraft visible to radar.
Definition: XPMPMultiplayer.h:198
External physical configuration of the plane.
Definition: XPMPMultiplayer.h:156
Legacy wrapper class as provided by original libxplanemp.
Definition: XPCAircraft.h:37
This class helps creating aircraft via the legacy global functions. It provides standard implementati...
Definition: Aircraft.h:28
Definition: XPMPAircraft.h:70
std::map< XPMPPlaneID, Aircraft * > mapAcTy
Map of all aircraft, key is tthe plane id.
Definition: Aircraft.h:57
void AcCleanup()
Grace cleanup, esp. remove all aircraft.
Definition: Aircraft.cpp:1084
void AcInit()
Initialize the module.
Definition: Aircraft.cpp:1054