torc-master
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
generic/Renamable.hpp
Go to the documentation of this file.
1
// Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
2
// $HeadURL$
3
// $Id$
4
5
// This program is free software: you can redistribute it and/or modify it under the terms of the
6
// GNU General Public License as published by the Free Software Foundation, either version 3 of the
7
// License, or (at your option) any later version.
8
//
9
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11
// the GNU General Public License for more details.
12
//
13
// You should have received a copy of the GNU General Public License along with this program. If
14
// not, see <http://www.gnu.org/licenses/>.
15
16
#ifndef TORC_GENERIC_RENAMABLE_HPP
17
#define TORC_GENERIC_RENAMABLE_HPP
18
19
#include <string>
20
21
//BOOST
22
#ifdef GENOM_SERIALIZATION
23
#include <boost/serialization/access.hpp>
24
#endif //GENOM_SERIALIZATION
25
namespace
torc {
26
namespace
generic {
27
28
/**
29
* @brief Represents objects that can be renamed
30
*
31
* EDIF provides a way to store displayable string values with different objects using the
32
* (rename ...) construct. The Renamable interface will be generalized by objects that need to
33
* support this feature.
34
*/
35
class
Renamable
{
36
#ifdef GENOM_SERIALIZATION
37
friend
class
boost::serialization::access;
38
#endif
39
public
:
40
typedef
std::string
Name
;
41
42
/**
43
* Get the new name provided for the object.
44
*
45
* @return Name of the object
46
*/
47
inline
virtual
Name
getOriginalName
()
const
;
48
49
/**
50
* Set the new name provided for the object.
51
*
52
* @param[in] inSource Name of the object
53
*/
54
virtual
void
setOriginalName
(
const
Name
& inSource);
55
56
protected
:
57
Renamable
();
58
59
public
:
60
virtual
~Renamable
() throw ();
61
62
private:
63
Renamable
(const
Renamable
&);
64
Renamable& operator =(const Renamable&);
65
66
private:
67
#ifdef GENOM_SERIALIZATION
68
template
<
class
Archive>
void
serialize(Archive& ar,
unsigned
int
);
69
#endif //GENOM_SERIALIZATION
70
Name
mOriginalName
;
71
};
72
73
/**
74
* Get the new name provided for the object.
75
*
76
* @return Name of the object
77
*/
78
inline
Renamable::Name
Renamable::getOriginalName
()
const
{
79
return
mOriginalName
;
80
}
81
82
}
// namespace generic
83
}
// namespace torc
84
85
#endif // TORC_GENERIC_RENAMABLE_HPP
torc::bitstream::string
std::string string
Definition:
LibGenFactory.hpp:35
torc::generic::Renamable::setOriginalName
virtual void setOriginalName(const Name &inSource)
Definition:
generic/Renamable.cpp:35
torc::generic::Renamable::Renamable
Renamable()
Definition:
generic/Renamable.cpp:39
torc::generic::Renamable::mOriginalName
Name mOriginalName
Definition:
generic/Renamable.hpp:70
torc::generic::Renamable::Name
std::string Name
Definition:
generic/Renamable.hpp:40
torc::generic::Renamable
Represents objects that can be renamed.
Definition:
generic/Renamable.hpp:35
torc::generic::Renamable::~Renamable
virtual ~Renamable()
Definition:
generic/Renamable.cpp:42
torc::generic::Renamable::getOriginalName
virtual Name getOriginalName() const
Definition:
generic/Renamable.hpp:78
src
torc
generic
Renamable.hpp
Generated on Thu Dec 18 2014 16:30:39 for torc-master by
1.8.6