File: gnBaseFilter.h

package info (click to toggle)
libgenome 1.3.1-7
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,156 kB
  • ctags: 1,212
  • sloc: cpp: 10,910; sh: 8,264; makefile: 79
file content (86 lines) | stat: -rw-r--r-- 1,939 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/////////////////////////////////////////////////////////////////////////////
// File:            gnBaseFilter.h
// Purpose:         Generic filter interface
// Description:     Filters sequences, translates, reverse complement, converts
//                   additions, etc.
// Changes:        
// Version:         libGenome 0.5.1 
// Author:          Aaron Darling 
// Modified by:     
// Copyright:       (c) Aaron Darling 
// Licenses:        See COPYING file for details 
/////////////////////////////////////////////////////////////////////////////
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#ifndef _gnBaseFilter_h_
#define _gnBaseFilter_h_

#include "libGenome/gnDefs.h"

#include <string>
#include "libGenome/gnClone.h"
#include "libGenome/gnDefs.h"


namespace genome {

class GNDLLEXPORT gnBaseFilter : public gnClone
{
public:		
	virtual gnBaseFilter* Clone() const = 0;
	
	/**
	 * Gets the name of this filter
	 * @return the filter name 
	 */
	virtual std::string GetName() const;
	/**
	 * Sets the name of this filter
	 * @param name the new filter name
	 */
	virtual void SetName( std::string name );
	
	/**
	 * Filter the given character
	 * @param ch The character to filter
	 * @return The filtered character
	 */
	virtual gnSeqC Filter( const gnSeqC ch ) const = 0;

	/**
	 * Filter the given character array
	 * @param seq A pointer to the character array
	 * @param len the length of the character array to filter
	 * @return The filtered character
	 */
	virtual void Filter( gnSeqC** seq, gnSeqI& len ) const = 0;

	/**
	 * Filters the given std::string
	 * @param seq The std::string to filter
	 */
	virtual void Filter( std::string &seq ) const = 0;

protected:
	std::string m_name;

};//class gnBaseFilter

inline
std::string gnBaseFilter::GetName() const
{
	return m_name;
}
inline
void gnBaseFilter::SetName( std::string name )
{
	m_name = name;
}


}	// end namespace genome

#endif
	// _gnBaseFilter_h_