FlightGear next
FGRouteMgr Class Reference

Top level route manager class. More...

#include <route_mgr.hxx>

Inherits SGSubsystem, and flightgear::FlightPlan::Delegate.

Public Member Functions

 FGRouteMgr ()
 
 ~FGRouteMgr ()
 
void bind () override
 
void init () override
 
void postinit () override
 
void unbind () override
 
void update (double dt) override
 
bool isRouteActive () const
 
int currentIndex () const
 
void setFlightPlan (const flightgear::FlightPlanRef &plan)
 
flightgear::FlightPlanRef flightPlan () const
 
void clearRoute ()
 
flightgear::WayptcurrentWaypt () const
 
int numLegs () const
 
int numWaypts () const
 
flightgear::WayptwayptAtIndex (int index) const
 
SGPropertyNode_ptr wayptNodeAtIndex (int index) const
 
void removeLegAtIndex (int aIndex)
 
bool activate ()
 Activate a built route.
 
void deactivate ()
 deactivate the route if active
 
void jumpToIndex (int index)
 Set the current waypoint to the specified index.
 
bool saveRoute (const SGPath &p)
 
bool loadRoute (const SGPath &p)
 
flightgear::WayptRef waypointFromString (const std::string &target, int insertPosition)
 Buiild a waypoint from a string description.
 
- Public Member Functions inherited from flightgear::FlightPlan::Delegate
virtual ~Delegate ()
 
virtual void cruiseChanged ()
 
virtual void cleared ()
 
virtual void activated ()
 
virtual void sequence ()
 Invoked when the C++ code determines the active leg is done / next leg should be sequenced.
 
virtual void endOfFlightPlan ()
 
virtual void loaded ()
 

Static Public Member Functions

static const char * staticSubsystemClassId ()
 

Additional Inherited Members

- Protected Member Functions inherited from flightgear::FlightPlan::Delegate
 Delegate ()
 

Detailed Description

Top level route manager class.

Definition at line 25 of file route_mgr.hxx.

Constructor & Destructor Documentation

◆ FGRouteMgr()

FGRouteMgr::FGRouteMgr ( )

Definition at line 227 of file route_mgr.cxx.

◆ ~FGRouteMgr()

FGRouteMgr::~FGRouteMgr ( )

Definition at line 249 of file route_mgr.cxx.

Member Function Documentation

◆ activate()

bool FGRouteMgr::activate ( )

Activate a built route.

This checks for various mandatory pieces of data, such as departure and destination airports, and creates waypoints for them on the route structure.

returns true if the route was activated successfully, or false if the route could not be activated for some reason

Definition at line 818 of file route_mgr.cxx.

◆ bind()

void FGRouteMgr::bind ( )
override

Definition at line 422 of file route_mgr.cxx.

◆ clearRoute()

void FGRouteMgr::clearRoute ( )

Definition at line 591 of file route_mgr.cxx.

◆ currentIndex()

int FGRouteMgr::currentIndex ( ) const

Definition at line 608 of file route_mgr.cxx.

◆ currentWaypt()

Waypt * FGRouteMgr::currentWaypt ( ) const

Definition at line 599 of file route_mgr.cxx.

◆ deactivate()

void FGRouteMgr::deactivate ( )

deactivate the route if active

Definition at line 836 of file route_mgr.cxx.

◆ flightPlan()

FlightPlanRef FGRouteMgr::flightPlan ( ) const

Definition at line 451 of file route_mgr.cxx.

◆ init()

void FGRouteMgr::init ( )
override

Definition at line 271 of file route_mgr.cxx.

◆ isRouteActive()

bool FGRouteMgr::isRouteActive ( ) const

Definition at line 425 of file route_mgr.cxx.

◆ jumpToIndex()

void FGRouteMgr::jumpToIndex ( int index)

Set the current waypoint to the specified index.

Definition at line 846 of file route_mgr.cxx.

◆ loadRoute()

bool FGRouteMgr::loadRoute ( const SGPath & p)

Definition at line 439 of file route_mgr.cxx.

◆ numLegs()

int FGRouteMgr::numLegs ( ) const

Definition at line 626 of file route_mgr.cxx.

◆ numWaypts()

int FGRouteMgr::numWaypts ( ) const
inline

Definition at line 56 of file route_mgr.hxx.

◆ postinit()

void FGRouteMgr::postinit ( )
override

Definition at line 386 of file route_mgr.cxx.

◆ removeLegAtIndex()

void FGRouteMgr::removeLegAtIndex ( int aIndex)

Definition at line 660 of file route_mgr.cxx.

◆ saveRoute()

bool FGRouteMgr::saveRoute ( const SGPath & p)

Definition at line 430 of file route_mgr.cxx.

◆ setFlightPlan()

void FGRouteMgr::setFlightPlan ( const flightgear::FlightPlanRef & plan)

Definition at line 456 of file route_mgr.cxx.

◆ staticSubsystemClassId()

static const char * FGRouteMgr::staticSubsystemClassId ( )
inlinestatic

Definition at line 40 of file route_mgr.hxx.

◆ unbind()

void FGRouteMgr::unbind ( )
override

Definition at line 423 of file route_mgr.cxx.

◆ update()

void FGRouteMgr::update ( double dt)
override

Definition at line 503 of file route_mgr.cxx.

◆ waypointFromString()

WayptRef FGRouteMgr::waypointFromString ( const std::string & target,
int insertPosition )

Buiild a waypoint from a string description.

Passed to the FlightPlan code to do the actual parsing, see that method for details of syntax.

Insert position is used to indicate which existing route waypoint(s) to use, to select between ambiguous names.

Definition at line 1218 of file route_mgr.cxx.

◆ wayptAtIndex()

Waypt * FGRouteMgr::wayptAtIndex ( int index) const

Definition at line 617 of file route_mgr.cxx.

◆ wayptNodeAtIndex()

SGPropertyNode_ptr FGRouteMgr::wayptNodeAtIndex ( int index) const

Definition at line 1330 of file route_mgr.cxx.


The documentation for this class was generated from the following files: