Cambridge SMT System
main.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 
4 namespace ucam {
5 namespace util {
6 
7 struct MainClass {
9  boost::scoped_ptr<RegistryPO> rg_;
10  const char **argv_;
11  MainClass(int argc, const char *argv[])
12  :argv_(argv)
13  {
14  rg_.reset(new RegistryPO(argc,argv));
15  util::initLogger ( argc, argv );
16  FORCELINFO ( argv[0] << " starts!" );
17  FORCELINFO ( rg_->dump ( "CONFIG parameters:\n====================="
18  , "=====================" ) );
19 
20  }
21 
22  // To be implemented by each tool;
23  void run();
24 
26  FORCELINFO ( argv_[0] << " ends!" );
27  }
28 
29 };
30 
31 }} // end namespaces
32 
41 int main ( int argc, const char *argv[] ) {
42  (ucam::util::MainClass(argc,argv).run());
43  return 0;
44 }
45 
46 
47 
util::RegistryPO RegistryPO
Definition: main.hpp:8
void initLogger(int argc, const char *argv[])
Inits logger, parses param options checking for –logger.verbose.
#define FORCELINFO(msg)
void run()
Include all necessary headers here.
int main(int argc, const char *argv[])
Main function.
Definition: main.hpp:41
MainClass(int argc, const char *argv[])
Definition: main.hpp:11
const char ** argv_
Definition: main.hpp:10
boost::scoped_ptr< RegistryPO > rg_
Definition: main.hpp:9
Definition: bleu.hpp:14