GPU-SD  1.4.0
filter.h
00001 
00002 /* Copyright (c) 2011-2012, Stefan Eilemann <eile@eyescale.ch> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef GPUSD_FILTER_H
00019 #define GPUSD_FILTER_H
00020 
00021 #include <gpusd/api.h>
00022 #include <gpusd/types.h>
00023 
00024 #include <string>
00025 
00026 namespace gpusd
00027 {
00028 namespace detail
00029 {
00030     class Filter;
00031     class SessionFilter;
00032 }
00034     class Filter
00035     {
00036     public:
00038         GPUSD_API Filter();
00039 
00041         GPUSD_API virtual ~Filter();
00042 
00049         GPUSD_API FilterPtr operator | ( FilterPtr rhs );
00050 
00057         GPUSD_API FilterPtr operator |= ( FilterPtr rhs );
00058 
00071         GPUSD_API virtual bool operator() ( const GPUInfos& current,
00072                                             const GPUInfo& candidate );
00073     private:
00074         detail::Filter* const impl_;
00075     };
00076 
00078     class DuplicateFilter : public Filter
00079     {
00080     public:
00081         virtual ~DuplicateFilter() {}
00082 
00087         GPUSD_API virtual bool operator() ( const GPUInfos& current,
00088                                             const GPUInfo& candidate );
00089     };
00090 
00092     class MirrorFilter : public Filter
00093     {
00094     public:
00095         virtual ~MirrorFilter() {}
00096 
00102         GPUSD_API virtual bool operator() ( const GPUInfos& current,
00103                                             const GPUInfo& candidate );
00104     };
00105 
00107     class SessionFilter : public Filter
00108     {
00109     public:
00110         GPUSD_API SessionFilter( const std::string& name );
00111         GPUSD_API virtual ~SessionFilter();
00112 
00114         GPUSD_API virtual bool operator() ( const GPUInfos& current,
00115                                             const GPUInfo& candidate );
00116     private:
00117         detail::SessionFilter* const impl_;
00118     };
00119 }
00120 #endif // GPUSD_FILTER_H
00121 
Generated on Mon Jul 16 2012 11:27:39 for GPU-SD 1.4.0 by  doxygen 1.7.6.1