Goby3  3.0.1
2021.08.17
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...
 
std::string app_name ()
 

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 72 of file interface.h.

Member Typedef Documentation

◆ ConfigType

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

Definition at line 81 of file interface.h.

Constructor & Destructor Documentation

◆ Application()

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

Definition at line 164 of file interface.h.

◆ ~Application()

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

Definition at line 76 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 115 of file interface.h.

◆ app_name()

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

Definition at line 126 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 100 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 118 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 88 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 97 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 85 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 108 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: