Moses::PCFG::Tool Class Reference

#include <tool.h>

Inheritance diagram for Moses::PCFG::Tool:

Inheritance graph
[legend]
Collaboration diagram for Moses::PCFG::Tool:

Collaboration graph
[legend]

List of all members.

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 ()


Detailed Description

Definition at line 36 of file tool.h.


Constructor & Destructor Documentation

virtual Moses::PCFG::Tool::~Tool (  )  [inline, virtual]

Definition at line 39 of file tool.h.

Moses::PCFG::Tool::Tool ( const std::string &  name  )  [inline, protected]

Definition at line 48 of file tool.h.


Member Function Documentation

static int Moses::PCFG::Tool::CommonOptionStyle (  )  [inline, static, protected]

Definition at line 51 of file tool.h.

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().

Here is the caller graph for this function:

virtual int Moses::PCFG::Tool::Main ( int  argc,
char *  argv[] 
) [pure virtual]

const std::string& Moses::PCFG::Tool::name (  )  const [inline]

Definition at line 41 of file tool.h.

std::istream & Moses::PCFG::Tool::OpenInputOrDie ( const std::string &  filename  )  [protected]

Definition at line 27 of file tool.cc.

References Error().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::PCFG::Tool::OpenNamedOutputOrDie ( const std::string &  filename,
std::ofstream &  stream 
) [protected]

Definition at line 69 of file tool.cc.

References Error().

Here is the call graph for this function:

std::ostream & Moses::PCFG::Tool::OpenOutputOrDie ( const std::string &  filename  )  [protected]

Definition at line 43 of file tool.cc.

References Error().

Here is the call graph for this function:

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().

Here is the caller graph for this function:


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

Generated on Thu Jun 4 00:32:53 2015 for Moses by  doxygen 1.5.9