exDataProc.cc |
RAVL, Recognition And Vision Library |
// This file is part of RAVL, Recognition And Vision Library
// Copyright (C) 2001, University of Surrey
// This code may be redistributed under the terms of the GNU Lesser
// General Public License (LGPL). See the lgpl.licence file for details or
// see http://www.gnu.org/copyleft/lesser.html
// file-header-ends-here
////////////////////////////////////////////////////
//! author="Charles Galambos"
//! rcsid="$Id: exDataProc.cc,v 1.2 2002/01/31 14:55:30 craftit Exp $"
//! lib=RavlIO
//! file="Ravl/Core/IO/exDataProc.cc"
#include "Ravl/Option.hh"
#include "Ravl/DP/FileIO.hh"
#include "Ravl/DP/Compose.hh"
using namespace RavlN;
RealT MultiplyBy2(const RealT &val)
{ return val * 2; }
// The input file for the example should be a white space seperated list of numbers
int main(int argc,char **argv) {
OptionC option(argc,argv,true);
StringC infile = option.String("","in.dat","Input filename");
StringC outfile = option.String("","out.dat","Output filename");
option.Check();
DPIFileC<RealT>(infile) >> Process(MultiplyBy2) >> DPOFileC<RealT>(outfile);
return 1;
}
Documentation by CxxDoc: Tue Aug 13 09:59:56 2002
|