bpp-popgen3  3.0.0
BasicAlleleInfo.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef _BASICALLELEINFO_H_
6 #define _BASICALLELEINFO_H_
7 
8 // From local Pop
9 #include "AlleleInfo.h"
10 #include "GeneralExceptions.h"
11 
12 namespace bpp
13 {
22  public AlleleInfo
23 {
24 private:
25  std::string id_;
26 
27 public:
28  // Constructors and destructor
34  BasicAlleleInfo(const std::string& id);
35 
39  BasicAlleleInfo(const BasicAlleleInfo& allele);
40 
41  virtual ~BasicAlleleInfo();
42 
43 public:
44  // Methodes
48  virtual BasicAlleleInfo& operator=(const BasicAlleleInfo& allele);
49 
53  virtual bool operator==(const BasicAlleleInfo& allele) const;
54 
58  virtual bool operator!=(const BasicAlleleInfo& allele) const;
59 
64 #ifdef NO_VIRTUAL_COV
65  Clonable*
66 #else
68 #endif
69  clone() const { return new BasicAlleleInfo(*this); }
76  void setId(const std::string& allele_id);
77  const std::string& getId() const;
79 };
80 } // end of namespace bpp;
81 
82 #endif // _BASICALLELEINFO_H_
The AlleleInfo interface.
Definition: AlleleInfo.h:25
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 * clone() const
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.