latest version v1.9 - last update 10 Apr 2010 |
00001 /* 00002 * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 00003 * Lehrstuhl fuer Technische Informatik, RWTH-Aachen, Germany 00004 * 00005 * This file is part of the LTI-Computer Vision Library (LTI-Lib) 00006 * 00007 * The LTI-Lib is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public License (LGPL) 00009 * as published by the Free Software Foundation; either version 2.1 of 00010 * the License, or (at your option) any later version. 00011 * 00012 * The LTI-Lib is distributed in the hope that it will be 00013 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty 00014 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with the LTI-Lib; see the file LICENSE. If 00019 * not, write to the Free Software Foundation, Inc., 59 Temple Place - 00020 * Suite 330, Boston, MA 02111-1307, USA. 00021 */ 00022 00023 00024 /*---------------------------------------------------------------- 00025 * project ....: LTI Digital Image/Signal Processing Library 00026 * file .......: ltiMathObject.h 00027 * authors ....: Pablo Alvarado 00028 * organization: LTI, RWTH Aachen 00029 * creation ...: 01.04.99 00030 * revisions ..: $Id: ltiMathObject.h,v 1.6 2006/02/08 12:34:17 ltilib Exp $ 00031 */ 00032 00033 #ifndef _LTI_MATHOBJECT_H_ 00034 #define _LTI_MATHOBJECT_H_ 00035 00036 // #include "ltiObject.h" 00037 // #include <iostream> 00038 // #include "ltiAssert.h" 00039 // #include "ltiException.h" 00040 #include "ltiIoObject.h" 00041 // #include "ltiTypes.h" 00042 #include "ltiIoHandler.h" 00043 // #include "ltiMath.h" 00044 00045 namespace lti { 00046 00047 /** 00048 * Base object for the math-classes. 00049 * 00050 * Derived classes must provide: 00051 * - The clone() method 00052 * - The read(ioHandler,const bool complete) method 00053 * - The write(ioHandler,const bool complete) const method 00054 * 00055 * It is recommended that the derived classes define the type value_type, 00056 * but it is not absolutely necessary. 00057 */ 00058 class mathObject : public ioObject { 00059 public: 00060 /** 00061 * returns the name of this class 00062 */ 00063 virtual const char* getTypeName() const { 00064 return "mathObject"; 00065 }; 00066 00067 /** 00068 * returns a copy of this object 00069 */ 00070 virtual mathObject* clone() const = 0; 00071 00072 /** 00073 * write the object in the given ioHandler 00074 */ 00075 virtual bool write(ioHandler& handler, 00076 const bool complete = true) const; 00077 00078 /** 00079 * read the object from the given ioHandler 00080 */ 00081 virtual bool read(ioHandler& handler,const bool complete = true); 00082 }; 00083 00084 /** 00085 * write the mathObject in the given ioHandler. 00086 * The complete flag indicates 00087 * if the enclosing begin and end should be also be written or not 00088 */ 00089 bool write(ioHandler& handler,const mathObject& mo, 00090 const bool complete = true); 00091 00092 /** 00093 * read the mathObject from the given ioHandler. 00094 * The complete flag indicates 00095 * if the enclosing begin and end should be also be written or not 00096 */ 00097 bool read(ioHandler& handler,mathObject& mo, 00098 const bool complete = true); 00099 } 00100 00101 #endif