~ubuntu-branches/ubuntu/trusty/libbpp-popgen/trusty

« back to all changes in this revision

Viewing changes to src/Bpp/PopGen/BasicAlleleInfo.h

  • Committer: Package Import Robot
  • Author(s): Julien Dutheil
  • Date: 2013-03-07 10:51:00 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130307105100-7ij3w7iyab9t2mbt
Tags: 2.1.0-1
Bug fixed and warnings removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
   for population genetics analysis.
12
12
 
13
13
   This software is governed by the CeCILL  license under French law and
14
 
   abiding by the rules of distribution of free software.  You can  use, 
 
14
   abiding by the rules of distribution of free software.  You can  use,
15
15
   modify and/ or redistribute the software under the terms of the CeCILL
16
16
   license as circulated by CEA, CNRS and INRIA at the following URL
17
 
   "http://www.cecill.info". 
 
17
   "http://www.cecill.info".
18
18
 
19
19
   As a counterpart to the access to the source code and  rights to copy,
20
20
   modify and redistribute granted by the license, users are provided only
21
21
   with a limited warranty  and the software's author,  the holder of the
22
22
   economic rights,  and the successive licensors  have only  limited
23
 
   liability. 
 
23
   liability.
24
24
 
25
25
   In this respect, the user's attention is drawn to the risks associated
26
26
   with loading,  using,  modifying and/or developing or reproducing the
29
29
   therefore means  that it is reserved for developers  and  experienced
30
30
   professionals having in-depth computer knowledge. Users are therefore
31
31
   encouraged to load and test the software's suitability as regards their
32
 
   requirements in conditions enabling the security of their systems and/or 
33
 
   data to be ensured and,  more generally, to use and operate it in the 
34
 
   same conditions as regards security. 
 
32
   requirements in conditions enabling the security of their systems and/or
 
33
   data to be ensured and,  more generally, to use and operate it in the
 
34
   same conditions as regards security.
35
35
 
36
36
   The fact that you are presently reading this means that you have had
37
37
   knowledge of the CeCILL license and that you accept its terms.
38
 
   */
 
38
 */
39
39
 
40
40
#ifndef _BASICALLELEINFO_H_
41
41
#define _BASICALLELEINFO_H_
46
46
 
47
47
namespace bpp
48
48
{
49
 
 
50
 
  /**
51
 
   * @brief The BasicAlleleInfo class.
52
 
   *
53
 
   * This is the simplest allele class implementation which contains just an identitier.
54
 
   *
55
 
   * @author Sylvain Gaillard
56
 
   */
57
 
  class BasicAlleleInfo:
58
 
    public AlleleInfo
59
 
  {
60
 
    private:
61
 
      std::string id_;
62
 
 
63
 
    public: // Constructors and destructor
64
 
      /**
65
 
       * @brief Build a new allele.
66
 
       *
67
 
       * @param id The identity number of the allele.
68
 
       */
69
 
      BasicAlleleInfo(const std::string& id);
70
 
 
71
 
      /**
72
 
       * @brief The BasicAlleleInfo copy constructor.
73
 
       */
74
 
      BasicAlleleInfo(const BasicAlleleInfo& allele);
75
 
 
76
 
      virtual ~BasicAlleleInfo();
77
 
 
78
 
    public: // Methodes
79
 
      /**
80
 
       * @brief The assignation operator.
81
 
       */
82
 
      virtual BasicAlleleInfo& operator= (const BasicAlleleInfo& allele);
83
 
 
84
 
      /**
85
 
       * @brief The == operator.
86
 
       */
87
 
      virtual bool operator== (const BasicAlleleInfo& allele) const;
88
 
 
89
 
      /**
90
 
       * @brief The != operator.
91
 
       */
92
 
      virtual bool operator!= (const BasicAlleleInfo& allele) const;
93
 
 
94
 
      /**
95
 
       * @name The Clonable interface
96
 
       * @{
97
 
       */
 
49
/**
 
50
 * @brief The BasicAlleleInfo class.
 
51
 *
 
52
 * This is the simplest allele class implementation which contains just an identitier.
 
53
 *
 
54
 * @author Sylvain Gaillard
 
55
 */
 
56
class BasicAlleleInfo :
 
57
  public AlleleInfo
 
58
{
 
59
private:
 
60
  std::string id_;
 
61
 
 
62
public:
 
63
  // Constructors and destructor
 
64
  /**
 
65
   * @brief Build a new allele.
 
66
   *
 
67
   * @param id The identity number of the allele.
 
68
   */
 
69
  BasicAlleleInfo(const std::string& id);
 
70
 
 
71
  /**
 
72
   * @brief The BasicAlleleInfo copy constructor.
 
73
   */
 
74
  BasicAlleleInfo(const BasicAlleleInfo& allele);
 
75
 
 
76
  virtual ~BasicAlleleInfo();
 
77
 
 
78
public:
 
79
  // Methodes
 
80
  /**
 
81
   * @brief The assignation operator.
 
82
   */
 
83
  virtual BasicAlleleInfo& operator=(const BasicAlleleInfo& allele);
 
84
 
 
85
  /**
 
86
   * @brief The == operator.
 
87
   */
 
88
  virtual bool operator==(const BasicAlleleInfo& allele) const;
 
89
 
 
90
  /**
 
91
   * @brief The != operator.
 
92
   */
 
93
  virtual bool operator!=(const BasicAlleleInfo& allele) const;
 
94
 
 
95
  /**
 
96
   * @name The Clonable interface
 
97
   * @{
 
98
   */
98
99
#ifdef NO_VIRTUAL_COV
99
 
      Clonable*
 
100
  Clonable*
100
101
#else
101
 
      BasicAlleleInfo*
 
102
  BasicAlleleInfo*
102
103
#endif
103
 
      clone() const { return new BasicAlleleInfo(*this); }
104
 
      /** @} */
 
104
  clone() const { return new BasicAlleleInfo(*this); }
 
105
  /** @} */
105
106
 
106
 
      /**
107
 
       * @name The AlleleInfo interface
108
 
       */
109
 
      void setId(const std::string& allele_id);
110
 
      const std::string& getId() const;
111
 
      /** @} */
 
107
  /**
 
108
   * @name The AlleleInfo interface
 
109
   */
 
110
  void setId(const std::string& allele_id);
 
111
  const std::string& getId() const;
 
112
  /** @} */
112
113
};
113
 
 
114
 
} //end of namespace bpp;
 
114
} // end of namespace bpp;
115
115
 
116
116
#endif // _BASICALLELEINFO_H_
117
117