00001 ///////////////////////////////////////////////////////////////////////////// 00002 // File: gnFeature.h 00003 // Purpose: implements the gnBaseFeature for generic features 00004 // Description: 00005 // Changes: 00006 // Version: libGenome 0.5.1 00007 // Author: Aaron Darling 00008 // Modified by: 00009 // Copyright: (c) Aaron Darling 00010 // Licenses: See COPYING file for details 00011 ///////////////////////////////////////////////////////////////////////////// 00012 #ifndef _gnFeature_h_ 00013 #define _gnFeature_h_ 00014 00015 #include "gn/gnDefs.h" 00016 00017 #include <string> 00018 #include <vector> 00019 #include "gn/gnBaseFeature.h" 00020 #include "gn/gnBaseQualifier.h" 00021 00022 /** 00023 * gnFeature stores sequence features in memory. 00024 * It contains a list of locations and qualifiers which are used to describe this feature. 00025 * It can be referred to by ID. 00026 */ 00027 class GNDLLEXPORT gnFeature : public gnBaseFeature 00028 { 00029 public: 00030 /** 00031 * Empty constructor. 00032 */ 00033 gnFeature( ); 00034 /** 00035 * Creates a memory feature with the specified name. 00036 * @param name The name of the feature. 00037 * @param id The id number of the feature 00038 * @param lt The type of sequence location covered by this feature 00039 * @param broken True if the feature was broken by some sequence manipulation, false otherwise. 00040 */ 00041 gnFeature( string& name, uint32 id = 0, gnLocation::gnLocationType lt = gnLocation::LT_Nothing, boolean broken = false ); 00042 /** 00043 * Copy constructor. 00044 * @param s The gnFeature to copy. 00045 */ 00046 gnFeature( const gnFeature& s ); 00047 /** 00048 * Destructor, frees memory. 00049 */ 00050 ~gnFeature(); 00051 // Clone 00052 gnFeature* Clone() const; 00053 00054 private: 00055 }; // class gnFeature 00056 00057 inline 00058 gnFeature* gnFeature::Clone() const 00059 { 00060 return new gnFeature(*this); 00061 } 00062 00063 #endif 00064 // _gnFeature_h_