torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::generic::Commentable Class Reference

Represents all classes that can hold user comments. More...

#include <Commentable.hpp>

+ Inheritance diagram for torc::generic::Commentable:

Public Member Functions

void addComment (const std::string &comment)
 
const std::vector< std::string > & getComments () const
 
void setComments (const std::vector< std::string > &inSource)
 
virtual ~Commentable () throw ()
 

Protected Member Functions

 Commentable ()
 

Private Member Functions

 Commentable (const Commentable &source)
 
Commentableoperator= (const Commentable &source)
 

Private Attributes

std::vector< std::string > mComments
 

Detailed Description

Represents all classes that can hold user comments.

The Commentable class holds a list of user comments that the users can modify. This class is inherited by all classes that can hold comments by user. Comments can be programatically inserted by clients or can be specified in edif files by (comment "string1" ..) syntax.

Definition at line 36 of file Commentable.hpp.

Constructor & Destructor Documentation

torc::generic::Commentable::Commentable ( )
protected

Definition at line 49 of file Commentable.cpp.

49 : mComments() {}
std::vector< std::string > mComments
Definition: Commentable.hpp:77
torc::generic::Commentable::~Commentable ( )
throw (
)
virtual

Definition at line 51 of file Commentable.cpp.

51 {}
torc::generic::Commentable::Commentable ( const Commentable source)
private

Member Function Documentation

void torc::generic::Commentable::addComment ( const std::string &  comment)

Add a comment to the object

Parameters
[in]commentThe comment to add to an existing list of comments

Definition at line 36 of file Commentable.cpp.

36  {
37  mComments.push_back(comment);
38 }
std::vector< std::string > mComments
Definition: Commentable.hpp:77
const std::vector< std::string > & torc::generic::Commentable::getComments ( ) const
inline

Get the list of all comments

Returns
A list of all comments on this object

Definition at line 85 of file Commentable.hpp.

85  {
86  return mComments;
87 }
std::vector< std::string > mComments
Definition: Commentable.hpp:77
Commentable& torc::generic::Commentable::operator= ( const Commentable source)
private
void torc::generic::Commentable::setComments ( const std::vector< std::string > &  inSource)

Get the list of all comments

Parameters
[in]inSourceA list of all comments to be set on this object

Definition at line 45 of file Commentable.cpp.

45  {
46  mComments.insert(mComments.end(), inSource.begin(), inSource.end());
47 }
std::vector< std::string > mComments
Definition: Commentable.hpp:77

Field Documentation

std::vector<std::string> torc::generic::Commentable::mComments
private

Definition at line 77 of file Commentable.hpp.


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