Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

gnBaseFilter.h

Go to the documentation of this file.
00001 /////////////////////////////////////////////////////////////////////////////
00002 // File:            gnBaseFilter.h
00003 // Purpose:         Generic filter interface
00004 // Description:     Filters sequences, translates, reverse complement, converts
00005 //                   additions, etc.
00006 // Changes:        
00007 // Version:         libGenome 0.5.1 
00008 // Author:          Aaron Darling 
00009 // Modified by:     
00010 // Copyright:       (c) Aaron Darling 
00011 // Licenses:        See COPYING file for details 
00012 /////////////////////////////////////////////////////////////////////////////
00013 #ifndef _gnBaseFilter_h_
00014 #define _gnBaseFilter_h_
00015 
00016 #include "gn/gnDefs.h"
00017 
00018 #include <string>
00019 #include "gn/gnClone.h"
00020 #include "gn/gnDefs.h"
00021 
00022 class GNDLLEXPORT gnBaseFilter : public gnClone
00023 {
00024 public:         
00025         virtual gnBaseFilter* Clone() const = 0;
00026         
00027         /**
00028          * Gets the name of this filter
00029          * @return the filter name 
00030          */
00031         virtual string GetName() const;
00032         /**
00033          * Sets the name of this filter
00034          * @param name the new filter name
00035          */
00036         virtual void SetName( string name );
00037         
00038         /**
00039          * Filter the given character
00040          * @param ch The character to filter
00041          * @return The filtered character
00042          */
00043         virtual gnSeqC Filter( const gnSeqC ch ) const = 0;
00044 
00045         /**
00046          * Filter the given character array
00047          * @param seq A pointer to the character array
00048          * @param len the length of the character array to filter
00049          * @return The filtered character
00050          */
00051         virtual void Filter( gnSeqC** seq, uint32& len ) const = 0;
00052 
00053         /**
00054          * Filters the given string
00055          * @param seq The string to filter
00056          */
00057         virtual void Filter( string &seq ) const = 0;
00058 
00059 protected:
00060         string m_name;
00061 
00062 };//class gnBaseFilter
00063 
00064 inline
00065 string gnBaseFilter::GetName() const
00066 {
00067         return m_name;
00068 }
00069 inline
00070 void gnBaseFilter::SetName( string name )
00071 {
00072         m_name = name;
00073 }
00074 
00075 #endif
00076         // _gnBaseFilter_h_

Generated on Mon Feb 3 02:34:38 2003 for libGenome by doxygen1.3-rc3