Main Page   Class Hierarchy   Compound List   File List   Compound Members  

Fragment.h

00001 #ifndef FRAGMENT_H
00002 #define FRAGMENT_H
00003 
00004 #include <iosfwd>
00005 #include <string>
00006 #include <vector>
00007 
00011 class Fragment
00012 {
00013   friend std::ostream& operator<<( std::ostream& p_Out, const Fragment& p_Fragment );
00014   
00015  public:
00019   Fragment( void );
00020 
00024   virtual ~Fragment(){};
00025   
00029   void initialise( void );
00030 
00034   inline void incrementOccurenceCount( void );
00035 
00039   inline void decreaseOccurenceCount( void );
00040 
00044   inline void resetOccurenceCount( void );
00045 
00049   inline int getFragmentId( void ) const;
00050 
00054   inline void setFragmentId( int p_id );
00055 
00059   inline std::string getReferenceFragmentId( void ) const;
00060 
00064   inline void setReferenceFragmentId( std::string p_id );
00065 
00069   inline const std::vector<double>& getProperties( void ) const;
00070 
00074   inline unsigned int getNbrProperties( void ) const;
00075   
00079   inline void setProperties( std::vector<double>& p_properties );
00080 
00084   inline void addProperty( double p_property ) {m_properties.push_back( p_property );}
00085 
00089   inline std::string getLibraryName( void ) const;
00090 
00094   inline void setLibraryName( std::string p_Name );
00095 
00099   inline unsigned long int  getOccurenceCount( void ) const;
00100 
00104   inline void addGoodness( const float p_goodness );
00105   
00109   inline float getGoodness( void ) const;
00110 
00114   inline void resetGoodness( void );
00115 
00119   class CompareFragmentByOccurence
00120   {
00121   public:
00122     int operator()( Fragment* fragment1, Fragment* fragment2 )
00123     {
00124       // descending order of good occurence (best first)
00125       return fragment1->getOccurenceCount() > fragment2->getOccurenceCount();
00126     }
00127   };
00128 
00132   class CompareFragmentByGoodness
00133   {
00134   public:
00135     int operator()( Fragment* fragment1, Fragment* fragment2 )
00136     {
00137       // descending order of goodness (best first)
00138       return fragment1->getGoodness() > fragment2->getGoodness();
00139     }
00140   };
00141 
00142  protected:
00143   
00144  private:
00145   
00146   int m_fragment_id;
00147   std::string m_ReferenceFragmentId;
00148   unsigned long int m_OccurenceCount;
00149   float m_Goodness;
00150   std::string m_LibraryName;
00151   std::vector<double> m_properties;
00152   
00153 };
00154 
00155 #include "Fragment.inline.cc"
00156 
00157 #endif
00158 _OccurenceCount;
00159   float m_Goodness;
00160   std::string m_LibraryName;
00161   std::vector<double> m_properties;
00162   
00163 };
00164 
00165 #include "Fragment.inline.cc"
00166 
00167 #endif

Generated on Sat Nov 4 15:58:59 2006 for GLARE by doxygen1.2.18