bpp-seq3
3.0.0
Commentable.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 BPP_SEQ_COMMENTABLE_H
6
#define BPP_SEQ_COMMENTABLE_H
7
8
9
// From the STL:
10
#include <string>
11
#include <iostream>
12
13
namespace
bpp
14
{
21
typedef
std::vector<std::string>
Comments
;
22
23
class
Commentable
24
{
25
public
:
26
Commentable
() {}
27
virtual
~Commentable
() {}
28
34
virtual
const
Comments
&
getComments
()
const
= 0;
35
41
virtual
void
setComments
(
const
Comments
& comments) = 0;
42
43
virtual
void
clearComments
() = 0;
44
};
45
46
class
SimpleCommentable
:
47
public
virtual
Commentable
48
{
49
protected
:
50
Comments
comments_
;
51
52
public
:
53
SimpleCommentable
() :
54
comments_
()
55
{}
56
57
SimpleCommentable
(
const
Comments
& comments) :
58
comments_
(comments)
59
{}
60
61
SimpleCommentable
(
const
SimpleCommentable
& com) :
62
comments_
(com.
comments_
)
63
{}
64
65
SimpleCommentable
&
operator=
(
const
SimpleCommentable
& com)
66
{
67
comments_
= com.
comments_
;
68
return
*
this
;
69
}
70
71
virtual
~SimpleCommentable
()
72
{}
73
79
const
Comments
&
getComments
()
const override
{
return
comments_
; }
80
86
void
setComments
(
const
Comments
& comments)
override
{
comments_
= comments; }
87
88
void
clearComments
()
override
{
comments_
.clear(); }
89
};
90
}
// end of namespace bpp.
91
#endif
// BPP_SEQ_COMMENTABLE_H
bpp::Commentable
Definition:
Commentable.h:24
bpp::Commentable::getComments
virtual const Comments & getComments() const =0
Get the comments.
bpp::Commentable::setComments
virtual void setComments(const Comments &comments)=0
Set the comments.
bpp::Commentable::Commentable
Commentable()
Definition:
Commentable.h:26
bpp::Commentable::~Commentable
virtual ~Commentable()
Definition:
Commentable.h:27
bpp::Commentable::clearComments
virtual void clearComments()=0
bpp::SimpleCommentable
Definition:
Commentable.h:48
bpp::SimpleCommentable::getComments
const Comments & getComments() const override
Get the comments.
Definition:
Commentable.h:79
bpp::SimpleCommentable::comments_
Comments comments_
Definition:
Commentable.h:50
bpp::SimpleCommentable::SimpleCommentable
SimpleCommentable()
Definition:
Commentable.h:53
bpp::SimpleCommentable::operator=
SimpleCommentable & operator=(const SimpleCommentable &com)
Definition:
Commentable.h:65
bpp::SimpleCommentable::~SimpleCommentable
virtual ~SimpleCommentable()
Definition:
Commentable.h:71
bpp::SimpleCommentable::SimpleCommentable
SimpleCommentable(const Comments &comments)
Definition:
Commentable.h:57
bpp::SimpleCommentable::clearComments
void clearComments() override
Definition:
Commentable.h:88
bpp::SimpleCommentable::SimpleCommentable
SimpleCommentable(const SimpleCommentable &com)
Definition:
Commentable.h:61
bpp::SimpleCommentable::setComments
void setComments(const Comments &comments) override
Set the comments.
Definition:
Commentable.h:86
bpp
This alphabet is used to deal NumericAlphabet.
bpp::Comments
std::vector< std::string > Comments
Declaration of Comments type.
Definition:
Commentable.h:21
Bpp
Seq
Commentable.h
Generated on Fri Jul 19 2024 12:16:01 for bpp-seq3 by
1.9.1