BasicFramework.hpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
4 //
5 // The GNSSTk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published
7 // by the Free Software Foundation; either version 3.0 of the License, or
8 // any later version.
9 //
10 // The GNSSTk is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with GNSSTk; if not, write to the Free Software Foundation,
17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 //
19 // This software was developed by Applied Research Laboratories at the
20 // University of Texas at Austin.
21 // Copyright 2004-2022, The Board of Regents of The University of Texas System
22 //
23 //==============================================================================
24 
25 //==============================================================================
26 //
27 // This software was developed by Applied Research Laboratories at the
28 // University of Texas at Austin, under contract to an agency or agencies
29 // within the U.S. Department of Defense. The U.S. Government retains all
30 // rights to use, duplicate, distribute, disclose, or release this software.
31 //
32 // Pursuant to DoD Directive 523024
33 //
34 // DISTRIBUTION STATEMENT A: This software has been approved for public
35 // release, distribution is unlimited.
36 //
37 //==============================================================================
38 
44 #ifndef GNSSTK_BASICFRAMEWORK_HPP
45 #define GNSSTK_BASICFRAMEWORK_HPP
46 
47 #include "CommandOptionParser.hpp"
48 #include <iostream>
49 #include "Exception.hpp"
50 
51 namespace gnsstk
52 {
53 
371 
373 
388  {
389  public:
392  static const int EXCEPTION_ERROR = 1;
395  static const int GENERAL_ERROR = 1;
399  static const int OPTION_ERROR = 2;
402  static const int EXIST_ERROR = 2;
403 
410  BasicFramework( const std::string& applName,
411  const std::string& applDesc )
412  noexcept;
413 
414 
416  virtual ~BasicFramework() {};
417 
418 
431  virtual bool initialize( int argc,
432  char *argv[],
433  bool pretty = true )
434  noexcept;
435 
436 
442  bool run() noexcept;
443 
444 
450  int exitCode;
451 
452 
453  protected:
454 
457  std::string argv0;
458  std::string appDesc;
459 
466 
467 
473  virtual void completeProcessing();
474 
475 
482  virtual void additionalSetup()
483  {}
484 
485 
490  virtual void spinUp()
491  {}
492 
493 
498  virtual void process()
499  {}
500 
501 
507  virtual void shutDown()
508  {}
509 
510  private:
511 
512 
513  // Do not allow the use of the default constructor.
514  BasicFramework();
515 
516  }; // End of class 'BasicFramework'
517 
519 
520 } // End of namespace gnsstk
521 #endif // GNSSTK_BASICFRAMEWORK_HPP
gnsstk::BasicFramework::BasicFramework
BasicFramework()
gnsstk::BasicFramework::debugLevel
int debugLevel
Debug level for this run of the program.
Definition: BasicFramework.hpp:455
gnsstk::BasicFramework::GENERAL_ERROR
static const int GENERAL_ERROR
Definition: BasicFramework.hpp:395
gnsstk::BasicFramework::argv0
std::string argv0
Name of the program.
Definition: BasicFramework.hpp:457
gnsstk::BasicFramework::appDesc
std::string appDesc
Description of program's function.
Definition: BasicFramework.hpp:458
gnsstk::CommandOptionHelpUsage
Definition: CommandOption.hpp:769
gnsstk::BasicFramework::helpOption
CommandOptionHelpUsage helpOption
Request command-line option usage.
Definition: BasicFramework.hpp:465
CommandOptionParser.hpp
gnsstk::BasicFramework::EXCEPTION_ERROR
static const int EXCEPTION_ERROR
Definition: BasicFramework.hpp:392
gnsstk::CommandOptionNoArg
Definition: CommandOption.hpp:295
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::BasicFramework::additionalSetup
virtual void additionalSetup()
Definition: BasicFramework.hpp:482
gnsstk::BasicFramework::verboseOption
CommandOptionNoArg verboseOption
Enable/increase informational output.
Definition: BasicFramework.hpp:463
gnsstk::BasicFramework
Definition: BasicFramework.hpp:387
gnsstk::BasicFramework::OPTION_ERROR
static const int OPTION_ERROR
Definition: BasicFramework.hpp:399
gnsstk::BasicFramework::debugOption
CommandOptionNoArg debugOption
Enable/increase debugging output.
Definition: BasicFramework.hpp:461
gnsstk::BasicFramework::completeProcessing
virtual void completeProcessing()
Definition: BasicFramework.cpp:155
gnsstk::BasicFramework::run
bool run() noexcept
Definition: BasicFramework.cpp:126
gnsstk::BasicFramework::EXIST_ERROR
static const int EXIST_ERROR
Definition: BasicFramework.hpp:402
Exception.hpp
std
Definition: Angle.hpp:142
gnsstk::BasicFramework::exitCode
int exitCode
Definition: BasicFramework.hpp:450
gnsstk::BasicFramework::verboseLevel
int verboseLevel
Verbose level for this run of the program.
Definition: BasicFramework.hpp:456
gnsstk::BasicFramework::initialize
virtual bool initialize(int argc, char *argv[], bool pretty=true) noexcept
Definition: BasicFramework.cpp:71
gnsstk::BasicFramework::shutDown
virtual void shutDown()
Definition: BasicFramework.hpp:507
gnsstk::BasicFramework::process
virtual void process()
Definition: BasicFramework.hpp:498
gnsstk::BasicFramework::~BasicFramework
virtual ~BasicFramework()
Destructor.
Definition: BasicFramework.hpp:416
gnsstk::BasicFramework::spinUp
virtual void spinUp()
Definition: BasicFramework.hpp:490


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:38