WSF
wizard::Platform Class Reference

#include <Platform.hpp>

Inherits wkf::Platform.

Public Member Functions

 Platform (const std::string &aName, unsigned int aId, WsfPM_Platform &aPlatform)
 ~Platform () override
void GotoDefinition ()
const WsfPM_PlatformGetPlatform () const noexcept
WsfPM_PlatformGetPlatform () noexcept
bool CheckPlatformDataChange (const QString &aDataName, const QString &aDataValue)
void PlatformInitialize ()
void RemovePlatformFromEditor ()
const std::vector< std::pair< Editor *, UtTextDocumentRange > > GetEditRanges ()
void UpdateRoute (const wkf::RouteBrowserInterface::RouteInfo &aRouteInfo)
void AddNewRouteInText (const wkf::RouteBrowserInterface::RouteInfo &aRouteInfo)
void AddQueuedOperation (int aIndex, bool aIsInsertion)
void RemoveWaypointFromEditor (wkf::AttachmentRoute *aRoutePtr, int aWaypointIndex=-1)
const std::vector< unsigned int > & GetSelectedWaypoints ()
void ClearSelectedWaypoints ()
void UpdateSelectedWaypoints (wkf::AttachmentRoute *aRoute) noexcept
void HandleQueuedDeleteWaypoint ()
void ResetDeletedIndex ()
UtTextDocumentRange GetAttributeDocumentRange (WsfPProxyNode aAttrNode)
UtTextDocumentRange GetAttributeRangeByName (const QString &aAttribute)
void AddWaypointToEditor (const wkf::RouteBrowserInterface::WaypointInfo &aWaypointInfo, const int aWaypointIndex=-1)
size_t GetDtedId () const
bool PlatformHasMover () const noexcept
bool IsRouteable () const noexcept
bool PlatformHasRoute () const noexcept
bool IsUsingGlobalRoute () const noexcept
WsfPM_Route GetProxyRoute () const noexcept
void Wrap () noexcept
void Unwrap () noexcept
bool IsWrapped () const noexcept

Constructor & Destructor Documentation

◆ Platform()

wizard::Platform::Platform ( const std::string & aName,
unsigned int aId,
WsfPM_Platform & aPlatform )

◆ ~Platform()

wizard::Platform::~Platform ( )
override

References wizEnv.

Member Function Documentation

◆ AddNewRouteInText()

void wizard::Platform::AddNewRouteInText ( const wkf::RouteBrowserInterface::RouteInfo & aRouteInfo)

Referenced by AddWaypointToEditor().

◆ AddQueuedOperation()

void wizard::Platform::AddQueuedOperation ( int aIndex,
bool aIsInsertion )
inline

◆ AddWaypointToEditor()

void wizard::Platform::AddWaypointToEditor ( const wkf::RouteBrowserInterface::WaypointInfo & aWaypointInfo,
const int aWaypointIndex = -1 )

◆ CheckPlatformDataChange()

bool wizard::Platform::CheckPlatformDataChange ( const QString & aDataName,
const QString & aDataValue )

This method is called to compare data on this platform with the data associated with it in the text editor if the data is different, it is updated in the text editor currently aDataName should be one of the following: "type","side","icon", "latitude", longitude", "altitude msl", "yaw","pitch", and "roll"

References wizard::ProxyWatcher::EmitOptionChange(), GetPlatform(), and wizard::ProxyWatcher::Instance().

Referenced by wizard::PlatformDataDockWidget::ItemChanged().

◆ ClearSelectedWaypoints()

void wizard::Platform::ClearSelectedWaypoints ( )
inline

◆ GetAttributeDocumentRange()

UtTextDocumentRange wizard::Platform::GetAttributeDocumentRange ( WsfPProxyNode aAttrNode)

Get the document range for a specified attribute proxy node

Parameters
aAttrNodeis the proxy node for the attribute
Returns
the attribute range for the specified attribute proxy node
Note
This function will seek out 'edit platform' and return that range if one exists

References WsfPProxyNode::FindIndexNode(), WsfParseNode::GetParent(), WsfPProxyNode::GetSourceDocumentRange(), wizard::Project::GotoFile(), wizard::Project::Instance(), WsfPProxyIndexNode::mEntries, and WsfParseNode::SubtreeRange().

Referenced by AddWaypointToEditor(), GetAttributeRangeByName(), RemoveWaypointFromEditor(), and UpdateRoute().

◆ GetAttributeRangeByName()

UtTextDocumentRange wizard::Platform::GetAttributeRangeByName ( const QString & aAttribute)

Gets the attribute range for a the given platform's attribute

Parameters
aAttributeis the attribute to find
Returns
the attribute range for the specified attribute

References WsfPM_Waypoint::cOFFSET, GetAttributeDocumentRange(), GetPlatform(), WsfPM_Waypoint::GetWaypointType(), IsUsingGlobalRoute(), and PlatformHasRoute().

◆ GetDtedId()

size_t wizard::Platform::GetDtedId ( ) const
inline

◆ GetEditRanges()

const std::vector< std::pair< wizard::Editor *, UtTextDocumentRange > > wizard::Platform::GetEditRanges ( )

◆ GetPlatform() [1/2]

const WsfPM_Platform & wizard::Platform::GetPlatform ( ) const
inlinenoexcept

◆ GetPlatform() [2/2]

WsfPM_Platform & wizard::Platform::GetPlatform ( )
inlinenoexcept

Get the proxy platform

Returns
the proxy platform

◆ GetProxyRoute()

WsfPM_Route wizard::Platform::GetProxyRoute ( ) const
noexcept

Get the proxy route node

Return values
the WsfPM_Route nodeif there is a route
an empty WsfPM_Route nodeif there is no route

References GetPlatform(), WsfPM_Mover::InitialRoute(), and WsfPM_Platform::Mover().

Referenced by PlatformHasRoute().

◆ GetSelectedWaypoints()

const std::vector< unsigned int > & wizard::Platform::GetSelectedWaypoints ( )
inline

Gets the selected waypoints

Returns
a list of the selected waypoints
Note
returned by value so that programmatic edits don't modify the returned result

◆ GotoDefinition()

◆ HandleQueuedDeleteWaypoint()

void wizard::Platform::HandleQueuedDeleteWaypoint ( )

◆ IsRouteable()

bool wizard::Platform::IsRouteable ( ) const
noexcept

Determines whether this platform can have a route

Returns
whether this platform can have a route

References GetPlatform(), and PlatformHasMover().

◆ IsUsingGlobalRoute()

bool wizard::Platform::IsUsingGlobalRoute ( ) const
noexcept

Determines whether this platform uses a global route

Returns
whether this platform uses a global route

References GetPlatform(), and PlatformHasMover().

Referenced by GetAttributeRangeByName().

◆ IsWrapped()

bool wizard::Platform::IsWrapped ( ) const
noexcept

Determine the "wrapped" flag status

Returns
whether the VtkInterface wrapped the platform

◆ PlatformHasMover()

bool wizard::Platform::PlatformHasMover ( ) const
noexcept

Determines whether this platform has a mover

Returns
whether this platform has a mover

References GetPlatform().

Referenced by IsRouteable(), IsUsingGlobalRoute(), and PlatformHasRoute().

◆ PlatformHasRoute()

bool wizard::Platform::PlatformHasRoute ( ) const
noexcept

Determines whether this platform has a route

Returns
whether this platform has a route

References GetProxyRoute(), and PlatformHasMover().

Referenced by GetAttributeRangeByName().

◆ PlatformInitialize()

void wizard::Platform::PlatformInitialize ( )

References wizEnv.

Referenced by Platform().

◆ RemovePlatformFromEditor()

◆ RemoveWaypointFromEditor()

void wizard::Platform::RemoveWaypointFromEditor ( wkf::AttachmentRoute * aRoutePtr,
int aWaypointIndex = -1 )

◆ ResetDeletedIndex()

void wizard::Platform::ResetDeletedIndex ( )
inline

◆ Unwrap()

void wizard::Platform::Unwrap ( )
noexcept

Unsets the "wrapped" flag

Note
the VtkInterface to avoid a move of both the platform and the first waypoint

◆ UpdateRoute()

void wizard::Platform::UpdateRoute ( const wkf::RouteBrowserInterface::RouteInfo & aRouteInfo)

◆ UpdateSelectedWaypoints()

void wizard::Platform::UpdateSelectedWaypoints ( wkf::AttachmentRoute * aRoute)
noexcept

Updates this platform's selected waypoint list with the selected waypoints of its route

Parameters
aRouteis this platform's route

Referenced by RemoveWaypointFromEditor().

◆ Wrap()

void wizard::Platform::Wrap ( )
noexcept

Sets the "wrapped" flag

Note
the VtkInterface to avoid a move of both the platform and the first waypoint

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved