#include <tool.h>
Public Member Functions | |
virtual | ~Tool () |
const std::string & | name () const |
virtual int | Main (int argc, char *argv[])=0 |
Protected Member Functions | |
Tool (const std::string &name) | |
void | Warn (const std::string &msg) const |
void | Error (const std::string &msg) const |
std::istream & | OpenInputOrDie (const std::string &filename) |
std::ostream & | OpenOutputOrDie (const std::string &filename) |
void | OpenNamedInputOrDie (const std::string &, std::ifstream &) |
void | OpenNamedOutputOrDie (const std::string &, std::ofstream &) |
Static Protected Member Functions | |
static int | CommonOptionStyle () |
Definition at line 36 of file tool.h.
Moses::PCFG::Tool::Tool | ( | const std::string & | name | ) | [inline, protected] |
static int Moses::PCFG::Tool::CommonOptionStyle | ( | ) | [inline, static, protected] |
void Moses::PCFG::Tool::Error | ( | const std::string & | msg | ) | const [inline, protected] |
Definition at line 60 of file tool.h.
Referenced by Moses::PCFG::PcfgScore::Main(), Moses::PCFG::PcfgExtract::Main(), OpenInputOrDie(), OpenNamedInputOrDie(), OpenNamedOutputOrDie(), and OpenOutputOrDie().
virtual int Moses::PCFG::Tool::Main | ( | int | argc, | |
char * | argv[] | |||
) | [pure virtual] |
Implemented in Moses::PCFG::PcfgExtract, and Moses::PCFG::PcfgScore.
std::istream & Moses::PCFG::Tool::OpenInputOrDie | ( | const std::string & | filename | ) | [protected] |
void Moses::PCFG::Tool::OpenNamedInputOrDie | ( | const std::string & | filename, | |
std::ifstream & | stream | |||
) | [protected] |
Definition at line 59 of file tool.cc.
References Error().
Referenced by Moses::PCFG::PcfgScore::Main().
void Moses::PCFG::Tool::OpenNamedOutputOrDie | ( | const std::string & | filename, | |
std::ofstream & | stream | |||
) | [protected] |
std::ostream & Moses::PCFG::Tool::OpenOutputOrDie | ( | const std::string & | filename | ) | [protected] |
void Moses::PCFG::Tool::Warn | ( | const std::string & | msg | ) | const [inline, protected] |
Definition at line 56 of file tool.h.
Referenced by Moses::PCFG::PcfgScore::Main(), and Moses::PCFG::PcfgExtract::Main().