bpp-popgen3  3.0.0
BasicAlleleInfo.cpp
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #include "BasicAlleleInfo.h"
6 
7 using namespace bpp;
8 
9 // ** Class constructor: *******************************************************/
10 
11 BasicAlleleInfo::BasicAlleleInfo(const std::string& id) : id_(id) {}
12 
13 BasicAlleleInfo::BasicAlleleInfo(const BasicAlleleInfo& allele) : id_(allele.getId()) {}
14 
15 // ** Class destructor: *******************************************************/
16 
18 
19 // ** Other methodes: *********************************************************/
20 
22 {
23  id_ = allele.getId();
24  return *this;
25 }
26 
28 {
29  return id_ == allele.getId();
30 }
31 
33 {
34  return !(id_ == allele.getId());
35 }
36 
37 void BasicAlleleInfo::setId(const std::string& allele_id)
38 {
39  id_ = allele_id;
40 }
41 
42 const std::string& BasicAlleleInfo::getId() const
43 {
44  return id_;
45 }
The BasicAlleleInfo class.
const std::string & getId() const
Get the identitier of the allele.
void setId(const std::string &allele_id)
Set the identifier of the allele.
BasicAlleleInfo(const std::string &id)
Build a new allele.
virtual bool operator==(const BasicAlleleInfo &allele) const
The == operator.
virtual bool operator!=(const BasicAlleleInfo &allele) const
The != operator.
virtual BasicAlleleInfo & operator=(const BasicAlleleInfo &allele)
The assignation operator.