OpenMS
IdentificationHit Class Reference

Represents a object which can store the information of an analysisXML instance. More...

#include <OpenMS/FORMAT/HANDLERS/MzIdentMLHandler.h>

Inheritance diagram for IdentificationHit:
[legend]
Collaboration diagram for IdentificationHit:
[legend]

Public Member Functions

Constructors, Destructors, Assignment Operators
 IdentificationHit ()=default
 Default constructor. More...
 
 IdentificationHit (const IdentificationHit &)=default
 Copy constructor. More...
 
virtual ~IdentificationHit ()=default
 Virtual destructor. More...
 
 IdentificationHit (IdentificationHit &&) noexcept=default
 Move constructor. More...
 
IdentificationHitoperator= (const IdentificationHit &)=default
 Copy assignment operator. More...
 
IdentificationHitoperator= (IdentificationHit &&) noexcept=default
 Move assignment operator. More...
 
Equality and Inequality Operators
bool operator== (const IdentificationHit &rhs) const noexcept
 Checks for equality with another IdentificationHit object. More...
 
bool operator!= (const IdentificationHit &rhs) const noexcept
 Checks for inequality with another IdentificationHit object. More...
 
- Public Member Functions inherited from MetaInfoInterface
 MetaInfoInterface ()
 Constructor. More...
 
 MetaInfoInterface (const MetaInfoInterface &rhs)
 Copy constructor. More...
 
 MetaInfoInterface (MetaInfoInterface &&) noexcept
 Move constructor. More...
 
 ~MetaInfoInterface ()
 Destructor. More...
 
MetaInfoInterfaceoperator= (const MetaInfoInterface &rhs)
 Assignment operator. More...
 
MetaInfoInterfaceoperator= (MetaInfoInterface &&) noexcept
 Move assignment operator. More...
 
void swap (MetaInfoInterface &rhs)
 Swap contents. More...
 
bool operator== (const MetaInfoInterface &rhs) const
 Equality operator. More...
 
bool operator!= (const MetaInfoInterface &rhs) const
 Equality operator. More...
 
const DataValuegetMetaValue (const String &name) const
 Returns the value corresponding to a string, or DataValue::EMPTY if not found. More...
 
DataValue getMetaValue (const String &name, const DataValue &default_value) const
 Returns the value corresponding to a string, or a default value (e.g.: DataValue::EMPTY) if not found
More...
 
const DataValuegetMetaValue (UInt index) const
 Returns the value corresponding to the index, or DataValue::EMPTY if not found. More...
 
DataValue getMetaValue (UInt index, const DataValue &default_value) const
 Returns the value corresponding to the index, or a default value (e.g.: DataValue::EMPTY) if not found
More...
 
bool metaValueExists (const String &name) const
 Returns whether an entry with the given name exists. More...
 
bool metaValueExists (UInt index) const
 Returns whether an entry with the given index exists. More...
 
void setMetaValue (const String &name, const DataValue &value)
 Sets the DataValue corresponding to a name. More...
 
void setMetaValue (UInt index, const DataValue &value)
 Sets the DataValue corresponding to an index. More...
 
void removeMetaValue (const String &name)
 Removes the DataValue corresponding to name if it exists. More...
 
void removeMetaValue (UInt index)
 Removes the DataValue corresponding to index if it exists. More...
 
void addMetaValues (const MetaInfoInterface &from)
 function to copy all meta values from one object to this one More...
 
void getKeys (std::vector< String > &keys) const
 Fills the given vector with a list of all keys for which a value is set. More...
 
void getKeys (std::vector< UInt > &keys) const
 Fills the given vector with a list of all keys for which a value is set. More...
 
bool isMetaEmpty () const
 Returns if the MetaInfo is empty. More...
 
void clearMetaInfo ()
 Removes all meta values. More...
 

Accessors

std::string id_
 Identifier. More...
 
int charge_ = 0
 Peptide charge. More...
 
double calculated_mass_to_charge_ = 0.0
 Calculated mass to charge ratio. More...
 
double experimental_mass_to_charge_ = 0.0
 Experimental mass to charge ratio. More...
 
std::string name_
 Name. More...
 
bool pass_threshold_ = true
 Pass threshold. More...
 
int rank_ = 0
 Rank of the peptide. More...
 
void setId (const std::string &id) noexcept
 Sets the identifier. More...
 
const std::string & getId () const noexcept
 Returns the identifier. More...
 
void setCharge (int charge) noexcept
 Sets the charge state of the peptide. More...
 
int getCharge () const noexcept
 Returns the charge state of the peptide. More...
 
void setCalculatedMassToCharge (double mz) noexcept
 Sets the calculated mass to charge ratio. More...
 
double getCalculatedMassToCharge () const noexcept
 Returns the calculated mass to charge ratio. More...
 
void setExperimentalMassToCharge (double mz) noexcept
 Sets the experimental mass to charge ratio. More...
 
double getExperimentalMassToCharge () const noexcept
 Returns the experimental mass to charge ratio. More...
 
void setName (const std::string &name) noexcept
 Sets the name. More...
 
const std::string & getName () const noexcept
 Returns the name. More...
 
void setPassThreshold (bool pass) noexcept
 Sets whether the peptide passed the threshold. More...
 
bool getPassThreshold () const noexcept
 Returns whether the peptide passed the threshold. More...
 
void setRank (int rank) noexcept
 Sets the rank of the peptide. More...
 
int getRank () const noexcept
 Returns the rank of the peptide. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MetaInfoInterface
static MetaInfoRegistrymetaRegistry ()
 Returns a reference to the MetaInfoRegistry. More...
 
- Protected Member Functions inherited from MetaInfoInterface
void createIfNotExists_ ()
 Creates the MetaInfo object if it does not exist. More...
 
- Protected Attributes inherited from MetaInfoInterface
MetaInfometa_
 Pointer to the MetaInfo object (0 by default) More...
 

Detailed Description

Represents a object which can store the information of an analysisXML instance.

Constructor & Destructor Documentation

◆ IdentificationHit() [1/3]

IdentificationHit ( )
default

Default constructor.

◆ IdentificationHit() [2/3]

IdentificationHit ( const IdentificationHit )
default

Copy constructor.

◆ ~IdentificationHit()

virtual ~IdentificationHit ( )
virtualdefault

Virtual destructor.

◆ IdentificationHit() [3/3]

IdentificationHit ( IdentificationHit &&  )
defaultnoexcept

Move constructor.

Member Function Documentation

◆ getCalculatedMassToCharge()

double getCalculatedMassToCharge ( ) const
noexcept

Returns the calculated mass to charge ratio.

◆ getCharge()

int getCharge ( ) const
noexcept

Returns the charge state of the peptide.

◆ getExperimentalMassToCharge()

double getExperimentalMassToCharge ( ) const
noexcept

Returns the experimental mass to charge ratio.

◆ getId()

const std::string& getId ( ) const
noexcept

Returns the identifier.

◆ getName()

const std::string& getName ( ) const
noexcept

Returns the name.

◆ getPassThreshold()

bool getPassThreshold ( ) const
noexcept

Returns whether the peptide passed the threshold.

◆ getRank()

int getRank ( ) const
noexcept

Returns the rank of the peptide.

◆ operator!=()

bool operator!= ( const IdentificationHit rhs) const
noexcept

Checks for inequality with another IdentificationHit object.

◆ operator=() [1/2]

IdentificationHit& operator= ( const IdentificationHit )
default

Copy assignment operator.

◆ operator=() [2/2]

IdentificationHit& operator= ( IdentificationHit &&  )
defaultnoexcept

Move assignment operator.

◆ operator==()

bool operator== ( const IdentificationHit rhs) const
noexcept

Checks for equality with another IdentificationHit object.

◆ setCalculatedMassToCharge()

void setCalculatedMassToCharge ( double  mz)
noexcept

Sets the calculated mass to charge ratio.

◆ setCharge()

void setCharge ( int  charge)
noexcept

Sets the charge state of the peptide.

◆ setExperimentalMassToCharge()

void setExperimentalMassToCharge ( double  mz)
noexcept

Sets the experimental mass to charge ratio.

◆ setId()

void setId ( const std::string &  id)
noexcept

Sets the identifier.

◆ setName()

void setName ( const std::string &  name)
noexcept

Sets the name.

◆ setPassThreshold()

void setPassThreshold ( bool  pass)
noexcept

Sets whether the peptide passed the threshold.

◆ setRank()

void setRank ( int  rank)
noexcept

Sets the rank of the peptide.

Member Data Documentation

◆ calculated_mass_to_charge_

double calculated_mass_to_charge_ = 0.0
private

Calculated mass to charge ratio.

◆ charge_

int charge_ = 0
private

Peptide charge.

◆ experimental_mass_to_charge_

double experimental_mass_to_charge_ = 0.0
private

Experimental mass to charge ratio.

◆ id_

std::string id_
private

Identifier.

◆ name_

std::string name_
private

Name.

◆ pass_threshold_

bool pass_threshold_ = true
private

Pass threshold.

◆ rank_

int rank_ = 0
private

Rank of the peptide.