Q:/Codes/PPF/FullPPF/ppftypes.hpp

Go to the documentation of this file.
00001 // PPF types (types common to all objects)
00002 
00003 #ifndef __PPFTYPES_HPP__
00004 #define __PPFTYPES_HPP__
00005 
00006 using namespace std;
00007 
00008 namespace ppf
00009 {
00010         // enumerations and constants ----------------------------------------------
00011 
00013         typedef int accessflag;
00014         static const accessflag read=0x01;      
00015         static const accessflag write=0x02;     
00016 
00018         enum processflag
00019         {
00020                 nearest,        
00021                 linear,         
00022 //              cubic,          ///< Use cubic interpolation.
00023 //              window,         ///< Use symmetric averaging window.
00024 //              prewindow,      ///< Use averaging window with indexes less than current index only.
00025 //              postwindow,     ///< Use averaging window with indexes greater than current index only.
00026 //              gaussian        ///< Use symmetric gaussian averaging window.
00027 //      insert      ///< Insert new element in array
00028         };
00029 
00031         typedef int ioflag;
00032         static const ioflag tvector=0x01;               
00033         static const ioflag xvector=0x02;               
00034         static const ioflag noxvector=0x04;                     
00035         static const ioflag notvector=0x08;                     
00036         static const ioflag lastxvector=0x10;                   
00037         static const ioflag lasttvector=0x20;                   
00038 
00039         // classes -----------------------------------------------------------------
00040 
00042         class coord
00043         {
00044                 public:
00045                 // variables
00046                         float t;    
00047                         float x;    
00048                         float d;        
00049 
00050                 // constructor
00051                     coord() : t(0), x(0), d(0) {};
00052 
00053         };
00054 
00056         class ppf_error
00057         {
00058                 public:
00059                 // variables
00060                         const int code;           // ppf system error message code
00061                         const string method;      // ppf system method which failed
00062                         const string message;     // string to hold error message
00063 
00064                 // constructors/destructors
00065 
00066                         // basic constructors ----------------------------------------------
00067 
00069                         ppf_error() : method(""), code(0), message("An error occurred accessing the PPF system.") {};
00070 
00071                         // initiating constructors -----------------------------------------------
00072 
00076                         ppf_error(string errormsg) : method(""), code(0), message(errormsg) {};
00077 
00082                         ppf_error(string name, int value) : method(name), code(value), message("An error occurred accessing the PPF system.") {};
00083 
00089                         ppf_error(string name, int value, string errormsg) : method(name), code(value), message(errormsg) {};
00090         };
00091 
00092 };
00093 
00094 #endif

Generated on Tue May 23 15:11:51 2006 for PPF C++ by  doxygen 1.4.6-NO