Function.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------------------
00002 // Copyright (c) 2001-2008 by PDFTron Systems Inc. All Rights Reserved.
00003 // Consult legal.txt regarding legal and license information.
00004 //---------------------------------------------------------------------------------------
00005 
00006 #ifndef   H_CPPPDFFunction
00007 #define   H_CPPPDFFunction
00008 
00009 #include <C/PDF/TRN_Function.h>
00010 #include <SDF/Obj.h>
00011 
00012 
00013 namespace pdftron { 
00014         namespace PDF {
00015 
00016 
00029 class Function
00030 {
00031 public:
00032 
00037          Function (SDF::Obj funct_dict = 0);
00038          Function(const Function& f);
00039          Function& operator=(const Function& f);
00040          ~Function();
00041 
00042         enum Type
00043         {
00044                 e_sampled     = 0, // uses a table of sample values to define the function.
00045                 e_exponential = 2, // defines a set of coefficients for an exponential function.
00046                 e_stitching   = 3, // a combination of other functions, partitioned across a domain.
00047                 e_postscript  = 4  // A PostScript calculator function.
00048         };
00049 
00053          Type GetType() const;
00054 
00058          int GetInputCardinality();
00059 
00063          int GetOutputCardinality();
00064 
00072          void Eval(double *in, double *out);
00073 
00077          SDF::Obj GetSDFObj ();
00078 
00080          Function(TRN_Function impl);
00081         TRN_Function mp_func;
00083 };
00084 
00085 
00086 #include <Impl/Function.inl>
00087 
00088         };      // namespace PDF
00089 };      // namespace pdftron
00090 
00091 #endif
00092 

© 2002-2008 PDFTron Systems Inc.