code::ExternalFilter Class Reference

Inheritance diagram for code::ExternalFilter:

code::W2Program List of all members.

Detailed Description

Runs an external filter program by providing it an index record as input and then allows access to the resulting index record.

Typical usage is to construct an object of this type, set up all the options required and then call launch()

Author:
Lakshman
Version:
Id
code_ExternalFilter.h,v 1.6 2009/06/02 20:17:39 lakshman Exp


Public Types

typedef std::map< char, Option > OptionMap

Public Member Functions

 ExternalFilter (const std::string &filterName)
 A configuration for this file should exist or this executable should itself be in the PATH.
virtual int launch (const Index::Record &rec, const std::string &outdir)
 launch the program with this input, send the output to the given directory.
std::string getCommandLine () const
 returns the command line so far.
 ExternalFilter ()
 for STL only.
const std::string & getName () const
 get the filter name.
void showUsageLine (const std::string &arg, const std::string &desc) const
void showUsage () const
const OptionMapoptions () const
 Returns the options that this command takes.
OptionMapoptions ()
 Returns the options that this command takes for changing.
void setOption (const Option &opt)
 set or change the value of an option.

Protected Attributes

OptionMap myOptions
XML::Element config


Member Typedef Documentation

typedef std::map< char, Option > code::W2Program::OptionMap [inherited]


Constructor & Destructor Documentation

code::ExternalFilter::ExternalFilter ( const std::string &  filterName  ) 

A configuration for this file should exist or this executable should itself be in the PATH.

code::ExternalFilter::ExternalFilter (  )  [inline]

for STL only.


Member Function Documentation

std::string code::ExternalFilter::getCommandLine (  )  const

returns the command line so far.

const std::string& code::ExternalFilter::getName (  )  const [inline, virtual]

get the filter name.

Reimplemented from code::W2Program.

virtual int code::ExternalFilter::launch ( const Index::Record rec,
const std::string &  outdir 
) [virtual]

launch the program with this input, send the output to the given directory.

Returns:
whether or not the launch succeeded.

Reimplemented from code::W2Program.

OptionMap& code::W2Program::options (  )  [inline, inherited]

Returns the options that this command takes for changing.

const OptionMap& code::W2Program::options (  )  const [inline, inherited]

Returns the options that this command takes.

This information is obtained from the configuration file w2config/filters/executableName

void code::W2Program::setOption ( const Option opt  )  [inherited]

set or change the value of an option.

void code::W2Program::showUsage (  )  const [inherited]

void code::W2Program::showUsageLine ( const std::string &  arg,
const std::string &  desc 
) const [inherited]


Member Data Documentation

XML::Element code::W2Program::config [protected, inherited]

OptionMap code::W2Program::myOptions [protected, inherited]


Generated on Fri May 4 13:40:13 2012 for WDSS-IIw2 by  doxygen 1.4.7