bpp-popgen  3.0.0
bpp::BasicAlleleInfo Class Reference

The BasicAlleleInfo class. More...

#include <Bpp/PopGen/BasicAlleleInfo.h>

+ Inheritance diagram for bpp::BasicAlleleInfo:
+ Collaboration diagram for bpp::BasicAlleleInfo:

Public Member Functions

 BasicAlleleInfo (const std::string &id)
 Build a new allele. More...
 
 BasicAlleleInfo (const BasicAlleleInfo &allele)
 The BasicAlleleInfo copy constructor. More...
 
virtual ~BasicAlleleInfo ()
 
virtual BasicAlleleInfooperator= (const BasicAlleleInfo &allele)
 The assignation operator. More...
 
virtual bool operator== (const BasicAlleleInfo &allele) const
 The == operator. More...
 
virtual bool operator!= (const BasicAlleleInfo &allele) const
 The != operator. More...
 
The Clonable interface
BasicAlleleInfoclone () const
 
The AlleleInfo interface
void setId (const std::string &allele_id)
 Set the identifier of the allele. More...
 
const std::string & getId () const
 Get the identitier of the allele. More...
 

Private Attributes

std::string id_
 

Detailed Description

The BasicAlleleInfo class.

This is the simplest allele class implementation which contains just an identitier.

Author
Sylvain Gaillard

Definition at line 56 of file BasicAlleleInfo.h.

Constructor & Destructor Documentation

◆ BasicAlleleInfo() [1/2]

BasicAlleleInfo::BasicAlleleInfo ( const std::string &  id)

Build a new allele.

Parameters
idThe identity number of the allele.

Definition at line 46 of file BasicAlleleInfo.cpp.

Referenced by clone().

◆ BasicAlleleInfo() [2/2]

BasicAlleleInfo::BasicAlleleInfo ( const BasicAlleleInfo allele)

The BasicAlleleInfo copy constructor.

Definition at line 48 of file BasicAlleleInfo.cpp.

◆ ~BasicAlleleInfo()

BasicAlleleInfo::~BasicAlleleInfo ( )
virtual

Definition at line 52 of file BasicAlleleInfo.cpp.

Member Function Documentation

◆ clone()

BasicAlleleInfo* bpp::BasicAlleleInfo::clone ( ) const
inlinevirtual

Implements bpp::AlleleInfo.

Definition at line 104 of file BasicAlleleInfo.h.

References BasicAlleleInfo().

◆ getId()

const std::string & BasicAlleleInfo::getId ( ) const
virtual

Get the identitier of the allele.

Implements bpp::AlleleInfo.

Definition at line 77 of file BasicAlleleInfo.cpp.

References id_.

Referenced by operator!=(), operator=(), and operator==().

◆ operator!=()

bool BasicAlleleInfo::operator!= ( const BasicAlleleInfo allele) const
virtual

The != operator.

Definition at line 67 of file BasicAlleleInfo.cpp.

References getId(), and id_.

◆ operator=()

BasicAlleleInfo & BasicAlleleInfo::operator= ( const BasicAlleleInfo allele)
virtual

The assignation operator.

Definition at line 56 of file BasicAlleleInfo.cpp.

References getId(), and id_.

◆ operator==()

bool BasicAlleleInfo::operator== ( const BasicAlleleInfo allele) const
virtual

The == operator.

Definition at line 62 of file BasicAlleleInfo.cpp.

References getId(), and id_.

◆ setId()

void BasicAlleleInfo::setId ( const std::string &  allele_id)
virtual

Set the identifier of the allele.

Implements bpp::AlleleInfo.

Definition at line 72 of file BasicAlleleInfo.cpp.

References id_.

Member Data Documentation

◆ id_

std::string bpp::BasicAlleleInfo::id_
private

Definition at line 60 of file BasicAlleleInfo.h.

Referenced by getId(), operator!=(), operator=(), operator==(), and setId().


The documentation for this class was generated from the following files: