OdbDesign
OdbDesign ODB++ Parser - C++ library, gRPC/REST server, CLI, tests
 
Loading...
Searching...
No Matches
Odb::Lib::App::OdbServerAppBase Class Referenceabstract

#include <OdbServerAppBase.h>

Inheritance diagram for Odb::Lib::App::OdbServerAppBase:
[legend]
Collaboration diagram for Odb::Lib::App::OdbServerAppBase:
[legend]

Public Member Functions

 ~OdbServerAppBase () override
 
CrowApp & crow_app () override
 
RequestAuthenticationBase & request_auth () override
 
void request_auth (std::unique_ptr< RequestAuthenticationBase > pRequestAuthentication) override
 
std::shared_ptr< DesignCache > design_cache () override
 
void design_cache (std::shared_ptr< DesignCache > pDesignCache) override
 
virtual void RunGrpcServer (const std::string &server_address, std::shared_ptr< DesignCache > cache)
 
Utils::ExitCode Run () override
 
- Public Member Functions inherited from Odb::Lib::App::OdbAppBase
 OdbAppBase (int argc, char *argv[])
 
virtual ~OdbAppBase ()
 
const OdbDesignArgs & args () const override
 
DesignCache & designs () override
 
- Public Member Functions inherited from Odb::Lib::App::IOdbApp
virtual ~IOdbApp ()
 
- Public Member Functions inherited from Odb::Lib::App::IOdbServerApp
virtual ~IOdbServerApp ()
 

Static Public Member Functions

static void HandleSignal (int signum)
 

Protected Member Functions

 OdbServerAppBase (int argc, char *argv[])
 
void set_grpc_server (std::shared_ptr< grpc::Server > server)
 
std::shared_ptr< grpc::Server > grpc_server () const
 
virtual void add_controllers ()=0
 
virtual bool preServerRun ()
 
virtual bool postServerRun ()
 
- Protected Member Functions inherited from Odb::Lib::App::IOdbApp
 IOdbApp ()=default
 
- Protected Member Functions inherited from Odb::Lib::App::IOdbServerApp
 IOdbServerApp ()=default
 

Protected Attributes

RouteController::Vector m_vecControllers
 
std::atomic< bool > m_shutdownFlag
 
std::shared_ptr< grpc::Server > m_grpcServer
 
std::unique_ptr< std::thread > m_grpcThread
 
- Protected Attributes inherited from Odb::Lib::App::OdbAppBase
DesignCache m_designCache
 
const OdbDesignArgs m_commandLineArgs
 

Additional Inherited Members

- Static Public Attributes inherited from Odb::Lib::App::OdbAppBase
static const char * DEFAULT_DESIGNS_DIR = "designs"
 

Detailed Description

Definition at line 22 of file OdbServerAppBase.h.

Constructor & Destructor Documentation

◆ ~OdbServerAppBase()

Odb::Lib::App::OdbServerAppBase::~OdbServerAppBase ( )
override

Definition at line 102 of file OdbServerAppBase.cpp.

◆ OdbServerAppBase()

Odb::Lib::App::OdbServerAppBase::OdbServerAppBase ( int  argc,
char *  argv[] 
)
protected

Definition at line 82 of file OdbServerAppBase.cpp.

Member Function Documentation

◆ add_controllers()

virtual void Odb::Lib::App::OdbServerAppBase::add_controllers ( )
protectedpure virtual

Implemented in Odb::App::Server::OdbDesignServerApp.

Here is the caller graph for this function:

◆ crow_app()

CrowApp & Odb::Lib::App::OdbServerAppBase::crow_app ( )
overridevirtual

Implements Odb::Lib::App::IOdbServerApp.

Definition at line 261 of file OdbServerAppBase.cpp.

Here is the caller graph for this function:

◆ design_cache() [1/2]

std::shared_ptr< DesignCache > Odb::Lib::App::OdbServerAppBase::design_cache ( )
overridevirtual

Implements Odb::Lib::App::IOdbServerApp.

Definition at line 276 of file OdbServerAppBase.cpp.

◆ design_cache() [2/2]

void Odb::Lib::App::OdbServerAppBase::design_cache ( std::shared_ptr< DesignCache >  pDesignCache)
overridevirtual

Implements Odb::Lib::App::IOdbServerApp.

Definition at line 281 of file OdbServerAppBase.cpp.

◆ grpc_server()

std::shared_ptr< grpc::Server > Odb::Lib::App::OdbServerAppBase::grpc_server ( ) const
inlineprotected

Definition at line 149 of file OdbServerAppBase.cpp.

◆ HandleSignal()

void Odb::Lib::App::OdbServerAppBase::HandleSignal ( int  signum)
static

Definition at line 109 of file OdbServerAppBase.cpp.

◆ postServerRun()

bool Odb::Lib::App::OdbServerAppBase::postServerRun ( )
protectedvirtual

Definition at line 96 of file OdbServerAppBase.cpp.

Here is the caller graph for this function:

◆ preServerRun()

bool Odb::Lib::App::OdbServerAppBase::preServerRun ( )
protectedvirtual

Reimplemented in Odb::App::Server::OdbDesignServerApp.

Definition at line 90 of file OdbServerAppBase.cpp.

Here is the caller graph for this function:

◆ request_auth() [1/2]

RequestAuthenticationBase & Odb::Lib::App::OdbServerAppBase::request_auth ( )
overridevirtual

Implements Odb::Lib::App::IOdbServerApp.

Definition at line 266 of file OdbServerAppBase.cpp.

Here is the caller graph for this function:

◆ request_auth() [2/2]

void Odb::Lib::App::OdbServerAppBase::request_auth ( std::unique_ptr< RequestAuthenticationBase >  pRequestAuthentication)
overridevirtual

Implements Odb::Lib::App::IOdbServerApp.

Definition at line 271 of file OdbServerAppBase.cpp.

◆ Run()

ExitCode Odb::Lib::App::OdbServerAppBase::Run ( )
overridevirtual

Reimplemented from Odb::Lib::App::OdbAppBase.

Definition at line 178 of file OdbServerAppBase.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RunGrpcServer()

void Odb::Lib::App::OdbServerAppBase::RunGrpcServer ( const std::string &  server_address,
std::shared_ptr< DesignCache >  cache 
)
virtual

Reimplemented in Odb::App::Server::OdbDesignServerApp.

Definition at line 118 of file OdbServerAppBase.cpp.

◆ set_grpc_server()

void Odb::Lib::App::OdbServerAppBase::set_grpc_server ( std::shared_ptr< grpc::Server >  server)
protected

Definition at line 144 of file OdbServerAppBase.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ m_grpcServer

std::shared_ptr<grpc::Server> Odb::Lib::App::OdbServerAppBase::m_grpcServer
protected

Definition at line 51 of file OdbServerAppBase.h.

◆ m_grpcThread

std::unique_ptr<std::thread> Odb::Lib::App::OdbServerAppBase::m_grpcThread
protected

Definition at line 52 of file OdbServerAppBase.h.

◆ m_shutdownFlag

std::atomic<bool> Odb::Lib::App::OdbServerAppBase::m_shutdownFlag
protected

Definition at line 48 of file OdbServerAppBase.h.

◆ m_vecControllers

RouteController::Vector Odb::Lib::App::OdbServerAppBase::m_vecControllers
protected

Definition at line 45 of file OdbServerAppBase.h.


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