Application with basic command line options. More...

#include <Application.h>

Inheritance diagram for Pulsar::Application:
Reference::Able Reference::HeapTracked

Classes

class  Options
 Describes application command line options. More...
 

Public Member Functions

 Application (const std::string &name, const std::string &description)
 Construct with the application name and a short description.
 
virtual int main (int argc, char **argv)
 Execute the main loop.
 
void add (Options *)
 Add options to the application.
 
std::string get_name () const
 Get the application name.
 
std::string get_description () const
 Get the application description.
 
bool get_verbose () const
 Get the verbosity flag.
 
virtual bool must_save ()
 Return true if the application needs to save data. More...
 
- Public Member Functions inherited from Reference::Able
 Able (const Able &)
 
Ableoperator= (const Able &)
 
unsigned get_reference_count () const
 
- Public Member Functions inherited from Reference::HeapTracked
 HeapTracked (const HeapTracked &)
 
HeapTrackedoperator= (const HeapTracked &)
 
bool __is_on_heap () const
 

Protected Member Functions

virtual void add_options (CommandLine::Menu &)=0
 Add command line options.
 
virtual void parse (int argc, char **argv)
 Parse the command line options.
 
virtual void set_quiet ()
 Operate in quiet mode.
 
virtual void set_verbose ()
 Operate in verbose mode.
 
virtual void set_very_verbose ()
 Operate in very verbose mode.
 
virtual void setup ()
 Any extra setup before running main loop. More...
 
template<typename Compare >
void sort_archives (Compare c)
 
virtual void run ()
 The main loop.
 
virtual Archiveload (const std::string &filename)
 Load file.
 
virtual void process (Archive *)=0
 Data analysis tasks implemented by most derived classes.
 
virtual bool do_finish ()
 Return true if Options::finish tasks should be run after process.
 
virtual Archiveresult ()
 Return pointer to new result constructed by process method. More...
 
virtual void finish (Archive *)
 Finishing work performed on each output archive.
 
virtual void finalize ()
 Any final work after main loop finishes. More...
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Protected Attributes

std::vector< Reference::To< Options > > options
 Available options.
 
bool has_manual
 true if application has an online manual
 
bool update_history
 true if application should update the processing history
 
bool stow_script
 true if application receives a script name as the first file
 
std::string name
 
std::string description
 
std::string version
 
std::string command
 
std::string script
 
std::vector< std::string > filenames
 
std::vector< Reference::To< Archive > > archives
 
std::string metafile
 
bool verbose
 
bool very_verbose
 
bool sort_filenames
 

Additional Inherited Members

- Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 
- Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 
static void operator delete (void *location, void *ptr)
 
static void operator delete (void *location)
 
static size_t get_heap_queue_size ()
 

Detailed Description

Application with basic command line options.

Member Function Documentation

◆ finalize()

void Pulsar::Application::finalize ( )
protectedvirtual

Any final work after main loop finishes.

Final steps, run once at end of program.

◆ must_save()

bool Pulsar::Application::must_save ( )
virtual

Return true if the application needs to save data.

Return true if application must save data.

◆ result()

virtual Archive* Pulsar::Application::result ( )
inlineprotectedvirtual

Return pointer to new result constructed by process method.

The result method was added to enable out-of-place process methods without changing the interface of the base class.

◆ setup()

void Pulsar::Application::setup ( )
protectedvirtual

Any extra setup before running main loop.

Extra setup, run once before main loop.


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

Generated using doxygen 1.8.17