CatapultServer  v0.5.0.1 (Elephant)
catapult::process Namespace Reference

Typedefs

using CreateProcessHost = std::function< std::shared_ptr< void >(config::CatapultConfiguration &&, const crypto::KeyPair &)>
 

Enumerations

enum  ProcessOptions { ProcessOptions::Exit_After_Process_Host_Creation, ProcessOptions::Exit_After_Termination_Signal }
 Process options. More...
 

Functions

boost::filesystem::path GetResourcesPath (int argc, const char **argv)
 
int ProcessMain (int argc, const char **argv, const std::string &host, const CreateProcessHost &createProcessHost)
 
int ProcessMain (int argc, const char **argv, const std::string &host, ProcessOptions processOptions, const CreateProcessHost &createProcessHost)
 
void WaitForTerminationSignal ()
 Pauses until the program receives a termination signal. More...
 

Typedef Documentation

◆ CreateProcessHost

using catapult::process::CreateProcessHost = typedef std::function<std::shared_ptr<void> (config::CatapultConfiguration&&, const crypto::KeyPair&)>

Prototype for creating a process host.

Note
Return value is a shared_ptr because unique_ptr of void is not allowed.

Enumeration Type Documentation

◆ ProcessOptions

Process options.

Enumerator
Exit_After_Process_Host_Creation 

Exit immediately after process host creation.

Exit_After_Termination_Signal 

Wait for termination signal before exiting.

Function Documentation

◆ GetResourcesPath()

boost::filesystem::path catapult::process::GetResourcesPath ( int  argc,
const char **  argv 
)

Extracts the resources path from the command line arguments. argc commmand line arguments are accessible via argv.

Here is the caller graph for this function:

◆ ProcessMain() [1/2]

int catapult::process::ProcessMain ( int  argc,
const char **  argv,
const std::string &  host,
const CreateProcessHost createProcessHost 
)

Main entry point for a catapult process named host with default process options. argc commmand line arguments are accessible via argv. createProcessHost creates the process host.

Here is the caller graph for this function:

◆ ProcessMain() [2/2]

int catapult::process::ProcessMain ( int  argc,
const char **  argv,
const std::string &  host,
ProcessOptions  processOptions,
const CreateProcessHost createProcessHost 
)

Main entry point for a catapult process named host with specified process options (processOptions). argc commmand line arguments are accessible via argv. createProcessHost creates the process host.

Here is the call graph for this function:

◆ WaitForTerminationSignal()

void catapult::process::WaitForTerminationSignal ( )

Pauses until the program receives a termination signal.

Here is the call graph for this function: