Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

ExternalTypeHandler Class Reference

This class calls an external program or "helper application" to decode stuff. More...

#include <externaltypehandler.hh>

Inheritance diagram for ExternalTypeHandler:

TypeHandler List of all members.

Public Member Functions


Detailed Description

This class calls an external program or "helper application" to decode stuff.

The helper program must accept input data via standard input, and write to standard output.

Bug:
If there is an error running the external program, you will receve a SIGPIPE (Broken Pipe) signal.

Definition at line 46 of file externaltypehandler.hh.


Constructor & Destructor Documentation

ExternalTypeHandler::ExternalTypeHandler string  name,
char **  decmd,
char **  encmd = 0,
string  file_ext = "?"
 

Constructor: given a program name and arguments.

data to decode is passed through given command with arguments: program name should be in decmd[0]. (PATH environment variable will be searched for program to run)

Parameters:
decmd program name and arguments for decoding
encmd program name and arguments for encoding
file_ext "Filename extension" for this type.

Definition at line 161 of file externaltypehandler.cc.

ExternalTypeHandler::ExternalTypeHandler string  name,
char *  decmd,
char *  encmd = 0,
string  file_ext = "?"
 

simpler version of ExternalTypeHandler(char *decmd[]); takes a program name with no arguments.

Parameters:
decmd program for decoding.
encmd program for encoding.
file_ext Filename "extension" for this type.

Definition at line 185 of file externaltypehandler.cc.

ExternalTypeHandler::~ExternalTypeHandler  )  [virtual]
 

Destructor.

Frees internally allocated memory.

Definition at line 199 of file externaltypehandler.cc.


Member Function Documentation

void ExternalTypeHandler::decode string &  data,
TypeParams params
[virtual]
 

Call the external program to decode the data.

Parameters:
data data to pass to external program to decode.
params Map of parameters from type identifier.
Returns:
the new data.

Reimplemented from TypeHandler.

Definition at line 243 of file externaltypehandler.cc.

void ExternalTypeHandler::encode string &  data,
TypeParams params
[virtual]
 

Call external program to encode data.

Parameters:
data data to pass to external program to encode
params parameters
Returns:
the new data.

Reimplemented from TypeHandler.

Definition at line 247 of file externaltypehandler.cc.


The documentation for this class was generated from the following files:
Generated on Tue Aug 12 03:55:53 2003 for Interreality Project - VOS by doxygen 1.3.2