Goby3  3.1.5a
2024.05.23
goby::middleware::Application< Config > Class Template Referenceabstract

Base class for Goby applications. Generally you will want to use SingleThreadApplication or MultiThreadApplication rather than instantiating this class directly. More...

#include <goby/middleware/application/interface.h>

Inheritance diagram for goby::middleware::Application< Config >:
goby::middleware::MultiThreadApplicationBase< Config, Transporter > goby::middleware::SingleThreadApplication< Config, InterProcessPortal > goby::middleware::MultiThreadApplicationBase< Config, InterThreadTransporter > goby::middleware::MultiThreadApplicationBase< Config, InterVehicleForwarder< InterProcessPortal< InterThreadTransporter > > > goby::middleware::MultiThreadStandaloneApplication< Config > goby::middleware::MultiThreadApplication< Config, InterProcessPortal > goby::middleware::MultiThreadTest< Config >

Public Types

using ConfigType = Config
 

Public Member Functions

 Application ()
 
virtual ~Application ()
 

Protected Member Functions

virtual void pre_initialize ()
 Called just before initialize. More...
 
virtual void initialize ()
 Perform any initialize tasks that couldn't be done in the constructor. More...
 
virtual void post_initialize ()
 Called just after initialize. More...
 
virtual void run ()=0
 Runs continuously until quit() is called. More...
 
virtual void pre_finalize ()
 Called just before finalize. More...
 
virtual void finalize ()
 Perform any final cleanup actions just before the destructor is called. More...
 
virtual void post_finalize ()
 Called just after finalize. More...
 
void quit (int return_value=0)
 Requests a clean exit. More...
 
const Config & app_cfg ()
 Accesses configuration object passed at launch. More...
 
const util::UTMGeodesygeodesy ()
 Accesses the geodetic conversion tool if lat_origin and lon_origin were provided. More...
 
bool has_geodesy ()
 Returns if the geodesy tool is configured with a datum. More...
 
std::string app_name ()
 
void configure_geodesy (goby::util::UTMGeodesy::LatLonPoint datum)
 

Detailed Description

template<typename Config>
class goby::middleware::Application< Config >

Base class for Goby applications. Generally you will want to use SingleThreadApplication or MultiThreadApplication rather than instantiating this class directly.

Definition at line 71 of file interface.h.

Member Typedef Documentation

◆ ConfigType

template<typename Config >
using goby::middleware::Application< Config >::ConfigType = Config

Definition at line 80 of file interface.h.

Constructor & Destructor Documentation

◆ Application()

template<typename Config >
goby::middleware::Application< Config >::Application

Definition at line 172 of file interface.h.

◆ ~Application()

template<typename Config >
virtual goby::middleware::Application< Config >::~Application ( )
inlinevirtual

Definition at line 75 of file interface.h.

Member Function Documentation

◆ app_cfg()

template<typename Config >
const Config& goby::middleware::Application< Config >::app_cfg ( )
inlineprotected

Accesses configuration object passed at launch.

Definition at line 114 of file interface.h.

◆ app_name()

template<typename Config >
std::string goby::middleware::Application< Config >::app_name ( )
inlineprotected

Definition at line 128 of file interface.h.

◆ configure_geodesy()

template<typename Config >
void goby::middleware::Application< Config >::configure_geodesy ( goby::util::UTMGeodesy::LatLonPoint  datum)
protected

Definition at line 288 of file interface.h.

◆ finalize()

template<typename Config >
virtual void goby::middleware::Application< Config >::finalize ( )
inlineprotectedvirtual

Perform any final cleanup actions just before the destructor is called.

Definition at line 99 of file interface.h.

◆ geodesy()

template<typename Config >
const util::UTMGeodesy& goby::middleware::Application< Config >::geodesy ( )
inlineprotected

Accesses the geodetic conversion tool if lat_origin and lon_origin were provided.

Definition at line 117 of file interface.h.

◆ has_geodesy()

template<typename Config >
bool goby::middleware::Application< Config >::has_geodesy ( )
inlineprotected

Returns if the geodesy tool is configured with a datum.

Definition at line 126 of file interface.h.

◆ initialize()

template<typename Config >
virtual void goby::middleware::Application< Config >::initialize ( )
inlineprotectedvirtual

Perform any initialize tasks that couldn't be done in the constructor.

Definition at line 87 of file interface.h.

◆ post_finalize()

◆ post_initialize()

template<typename Config >
virtual void goby::middleware::Application< Config >::post_initialize ( )
inlineprotectedvirtual

◆ pre_finalize()

template<typename Config >
virtual void goby::middleware::Application< Config >::pre_finalize ( )
inlineprotectedvirtual

Called just before finalize.

Definition at line 96 of file interface.h.

◆ pre_initialize()

template<typename Config >
virtual void goby::middleware::Application< Config >::pre_initialize ( )
inlineprotectedvirtual

Called just before initialize.

Definition at line 84 of file interface.h.

◆ quit()

template<typename Config >
void goby::middleware::Application< Config >::quit ( int  return_value = 0)
inlineprotected

Requests a clean exit.

Parameters
return_valueThe request return value

Definition at line 107 of file interface.h.

◆ run()

template<typename Config >
virtual void goby::middleware::Application< Config >::run ( )
protectedpure virtual

Runs continuously until quit() is called.


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