FlightGear next
NasalPositioned_cppbind.cxx File Reference
#include "NasalPositioned.hxx"
#include <algorithm>
#include <functional>
#include <simgear/misc/ListDiff.hxx>
#include <simgear/nasal/cppbind/from_nasal.hxx>
#include <simgear/nasal/cppbind/to_nasal.hxx>
#include <simgear/nasal/cppbind/NasalHash.hxx>
#include <simgear/nasal/cppbind/Ghost.hxx>
#include <Airports/airport.hxx>
#include <Airports/dynamics.hxx>
#include <Airports/pavement.hxx>
#include <ATC/CommStation.hxx>
#include <Main/globals.hxx>
#include <Navaids/NavDataCache.hxx>
#include <Navaids/navlist.hxx>
#include <Navaids/navrecord.hxx>
#include <Navaids/fix.hxx>

Go to the source code of this file.

Typedefs

typedef nasal::Ghost< FGPositionedRefNasalPositioned
 
typedef nasal::Ghost< FGRunwayRefNasalRunway
 
typedef nasal::Ghost< FGParkingRefNasalParking
 
typedef nasal::Ghost< FGAirportRefNasalAirport
 
typedef nasal::Ghost< flightgear::CommStationRefNasalCommStation
 
typedef nasal::Ghost< FGNavRecordRefNasalNavRecord
 
typedef nasal::Ghost< FGFixRefNasalFix
 

Functions

naRef to_nasal_helper (naContext c, flightgear::SID *sid)
 
naRef to_nasal_helper (naContext c, flightgear::STAR *star)
 
naRef to_nasal_helper (naContext c, flightgear::Approach *iap)
 
static naRef f_navaid_course (FGNavRecord &nav, naContext)
 
static FGRunwayBaseRef f_airport_runway (FGAirport &apt, const std::string &ident)
 
template<class T, class C1, class C2>
std::vector< T > extract (const std::vector< C1 > &in, T(C2::*getter)() const)
 
static naRef f_airport_comms (FGAirport &apt, const nasal::CallContext &ctx)
 
FGRunwayRef runwayFromNasalArg (const FGAirport &apt, const nasal::CallContext &ctx, size_t index=0)
 
static naRef f_airport_sids (FGAirport &apt, const nasal::CallContext &ctx)
 
static naRef f_airport_stars (FGAirport &apt, const nasal::CallContext &ctx)
 
static naRef f_airport_approaches (FGAirport &apt, const nasal::CallContext &ctx)
 
static FGParkingList f_airport_parking (FGAirport &apt, nasal::CallContext ctx)
 
static bool extractGeod (nasal::CallContext &ctx, SGGeod &result)
 Extract a SGGeod from a nasal function argument list.
 
static SGGeod getPosition (nasal::CallContext &ctx)
 Extract position from ctx or return current aircraft position if not given.
 
static naRef f_airportinfo (nasal::CallContext ctx)
 
static naRef f_findAirportsWithinRange (nasal::CallContext ctx)
 findAirportsWithinRange([<position>,] <range-nm> [, type])
 
static naRef f_findAirportsByICAO (nasal::CallContext ctx)
 findAirportsByICAO(<ident/prefix> [, type])
 
static naRef f_navinfo (nasal::CallContext ctx)
 
static naRef f_findWithinRange (nasal::CallContext ctx)
 
static naRef f_findByIdent (nasal::CallContext ctx)
 
static naRef f_findByName (nasal::CallContext ctx)
 
static naRef f_courseAndDistance (nasal::CallContext ctx)
 
static naRef f_sortByRange (nasal::CallContext ctx)
 
static naRef f_diff (nasal::CallContext ctx)
 
naRef initNasalPositioned_cppbind (naRef globalsRef, naContext c)
 

Typedef Documentation

◆ NasalAirport

typedef nasal::Ghost<FGAirportRef> NasalAirport

Definition at line 50 of file NasalPositioned_cppbind.cxx.

◆ NasalCommStation

Definition at line 51 of file NasalPositioned_cppbind.cxx.

◆ NasalFix

typedef nasal::Ghost<FGFixRef> NasalFix

Definition at line 54 of file NasalPositioned_cppbind.cxx.

◆ NasalNavRecord

typedef nasal::Ghost<FGNavRecordRef> NasalNavRecord

Definition at line 52 of file NasalPositioned_cppbind.cxx.

◆ NasalParking

typedef nasal::Ghost<FGParkingRef> NasalParking

Definition at line 49 of file NasalPositioned_cppbind.cxx.

◆ NasalPositioned

typedef nasal::Ghost<FGPositionedRef> NasalPositioned

Definition at line 47 of file NasalPositioned_cppbind.cxx.

◆ NasalRunway

typedef nasal::Ghost< FGRunwayRef > NasalRunway

Definition at line 48 of file NasalPositioned_cppbind.cxx.

Function Documentation

◆ extract()

template<class T, class C1, class C2>
std::vector< T > extract ( const std::vector< C1 > & in,
T(C2::* getter )() const )

Definition at line 104 of file NasalPositioned_cppbind.cxx.

◆ extractGeod()

static bool extractGeod ( nasal::CallContext & ctx,
SGGeod & result )
static

Extract a SGGeod from a nasal function argument list.

<lat>, <lon> {"lat": <lat-deg>, "lon": <lon-deg>} geo.Coord.new() (aka. {"_lat": <lat-rad>, "_lon": <lon-rad>})

Definition at line 220 of file NasalPositioned_cppbind.cxx.

◆ f_airport_approaches()

static naRef f_airport_approaches ( FGAirport & apt,
const nasal::CallContext & ctx )
static

Definition at line 180 of file NasalPositioned_cppbind.cxx.

◆ f_airport_comms()

static naRef f_airport_comms ( FGAirport & apt,
const nasal::CallContext & ctx )
static

Definition at line 115 of file NasalPositioned_cppbind.cxx.

◆ f_airport_parking()

static FGParkingList f_airport_parking ( FGAirport & apt,
nasal::CallContext ctx )
static

Definition at line 205 of file NasalPositioned_cppbind.cxx.

◆ f_airport_runway()

static FGRunwayBaseRef f_airport_runway ( FGAirport & apt,
const std::string & ident )
static

Definition at line 90 of file NasalPositioned_cppbind.cxx.

◆ f_airport_sids()

static naRef f_airport_sids ( FGAirport & apt,
const nasal::CallContext & ctx )
static

Definition at line 160 of file NasalPositioned_cppbind.cxx.

◆ f_airport_stars()

static naRef f_airport_stars ( FGAirport & apt,
const nasal::CallContext & ctx )
static

Definition at line 170 of file NasalPositioned_cppbind.cxx.

◆ f_airportinfo()

static naRef f_airportinfo ( nasal::CallContext ctx)
static

Definition at line 296 of file NasalPositioned_cppbind.cxx.

◆ f_courseAndDistance()

static naRef f_courseAndDistance ( nasal::CallContext ctx)
static

Definition at line 408 of file NasalPositioned_cppbind.cxx.

◆ f_diff()

static naRef f_diff ( nasal::CallContext ctx)
static

Definition at line 450 of file NasalPositioned_cppbind.cxx.

◆ f_findAirportsByICAO()

static naRef f_findAirportsByICAO ( nasal::CallContext ctx)
static

findAirportsByICAO(<ident/prefix> [, type])

Definition at line 337 of file NasalPositioned_cppbind.cxx.

◆ f_findAirportsWithinRange()

static naRef f_findAirportsWithinRange ( nasal::CallContext ctx)
static

findAirportsWithinRange([<position>,] <range-nm> [, type])

Definition at line 320 of file NasalPositioned_cppbind.cxx.

◆ f_findByIdent()

static naRef f_findByIdent ( nasal::CallContext ctx)
static

Definition at line 387 of file NasalPositioned_cppbind.cxx.

◆ f_findByName()

static naRef f_findByName ( nasal::CallContext ctx)
static

Definition at line 397 of file NasalPositioned_cppbind.cxx.

◆ f_findWithinRange()

static naRef f_findWithinRange ( nasal::CallContext ctx)
static

Definition at line 374 of file NasalPositioned_cppbind.cxx.

◆ f_navaid_course()

static naRef f_navaid_course ( FGNavRecord & nav,
naContext  )
static

Definition at line 78 of file NasalPositioned_cppbind.cxx.

◆ f_navinfo()

static naRef f_navinfo ( nasal::CallContext ctx)
static

Definition at line 359 of file NasalPositioned_cppbind.cxx.

◆ f_sortByRange()

static naRef f_sortByRange ( nasal::CallContext ctx)
static

Definition at line 428 of file NasalPositioned_cppbind.cxx.

◆ getPosition()

static SGGeod getPosition ( nasal::CallContext & ctx)
static

Extract position from ctx or return current aircraft position if not given.

Definition at line 279 of file NasalPositioned_cppbind.cxx.

◆ initNasalPositioned_cppbind()

naRef initNasalPositioned_cppbind ( naRef globalsRef,
naContext c )

Definition at line 470 of file NasalPositioned_cppbind.cxx.

◆ runwayFromNasalArg()

FGRunwayRef runwayFromNasalArg ( const FGAirport & apt,
const nasal::CallContext & ctx,
size_t index = 0 )

Definition at line 133 of file NasalPositioned_cppbind.cxx.

◆ to_nasal_helper() [1/3]

naRef to_nasal_helper ( naContext c,
flightgear::Approach * iap )

Definition at line 71 of file NasalPositioned_cppbind.cxx.

◆ to_nasal_helper() [2/3]

naRef to_nasal_helper ( naContext c,
flightgear::SID * sid )

Definition at line 57 of file NasalPositioned_cppbind.cxx.

◆ to_nasal_helper() [3/3]

naRef to_nasal_helper ( naContext c,
flightgear::STAR * star )

Definition at line 64 of file NasalPositioned_cppbind.cxx.