www.pudn.com > firev0.01.rar > basefeature.hpp
/* This file is part of the FIRE -- Flexible Image Retrieval System FIRE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. FIRE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with FIRE; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __basefeature_hpp #define __basefeature_hpp /** abstract basic feature class. * * within this class everything is abstract and it only provides an * interface. */ #include#include #include #include template class BaseFeature { public: virtual ~BaseFeature() {}; ///read-only access to the data. virtual const T operator[](const unsigned int a) const=0; /** give the dimension of this feature * @return the dimension of this feature */ virtual const unsigned int size() const=0; }; /** * Print the Feature to a stream. * */ template inline std::ostream& operator<<(std::ostream& os, const BaseFeature & src) { for(unsigned int y=0;y