|
degate 0.1.1
|
Representation for a container type, which holds a list of Rule Check Violations. More...
#include <RCVContainer.h>
Public Types | |
| typedef std::list < RCViolation_shptr > | container_type |
| typedef container_type::iterator | iterator |
| typedef container_type::const_iterator | const_iterator |
Public Member Functions | |
| RCVContainer () | |
| The ctor. | |
| ~RCVContainer () | |
| The dtor. | |
| void | push_back (RCViolation_shptr rcv) |
| Add a RC violation to the container. | |
| iterator | begin () |
| Get an iterator to the start of the list. | |
| iterator | end () |
| Get an iterator to the end of the list. | |
| const_iterator | begin () const |
| Get a const iterator for the start of the list. | |
| const_iterator | end () const |
| Get a const iterator for the end of the list. | |
| void | clear () |
| Clear entire list of RC violations. | |
| iterator | find (RCViolation_shptr rcv) |
| Find a RC violation in the container. | |
| const_iterator | find (RCViolation_shptr rcv) const |
| Find a RC violation and return a const iterator. | |
| size_t | size () const |
| Get the number of entries. | |
| bool | contains (RCViolation_shptr rcv) const |
| Check if the container has already stored a specific RC violation. | |
| bool | erase (RCViolation_shptr rcv) |
| Erase a specific RC violation. | |
Private Attributes | |
| container_type | violations |
Representation for a container type, which holds a list of Rule Check Violations.
Definition at line 40 of file RCVContainer.h.
| typedef container_type::const_iterator degate::RCVContainer::const_iterator |
Definition at line 44 of file RCVContainer.h.
| typedef std::list<RCViolation_shptr> degate::RCVContainer::container_type |
Definition at line 42 of file RCVContainer.h.
| typedef container_type::iterator degate::RCVContainer::iterator |
Definition at line 43 of file RCVContainer.h.
| RCVContainer::RCVContainer | ( | ) |
| RCVContainer::~RCVContainer | ( | ) |
| RCVContainer::iterator RCVContainer::begin | ( | ) |
Get an iterator to the start of the list.
Definition at line 37 of file RCVContainer.cc.
References violations.
Referenced by find().
{
return violations.begin();
}

| RCVContainer::const_iterator RCVContainer::begin | ( | ) | const |
Get a const iterator for the start of the list.
Definition at line 45 of file RCVContainer.cc.
References violations.
{
return violations.begin();
}
| void RCVContainer::clear | ( | ) |
Clear entire list of RC violations.
Definition at line 53 of file RCVContainer.cc.
References violations.
Referenced by degate::RCBase::clear_rc_violations().
{
violations.clear();
}

| bool RCVContainer::contains | ( | RCViolation_shptr | rcv | ) | const |
Check if the container has already stored a specific RC violation.
| rcv | The RC violation for which the presence should be checked. |
Definition at line 61 of file RCVContainer.cc.

| RCVContainer::const_iterator RCVContainer::end | ( | ) | const |
Get a const iterator for the end of the list.
Definition at line 49 of file RCVContainer.cc.
References violations.
{
return violations.end();
}
| RCVContainer::iterator RCVContainer::end | ( | ) |
Get an iterator to the end of the list.
Definition at line 41 of file RCVContainer.cc.
References violations.
Referenced by contains(), erase(), and find().
{
return violations.end();
}

| bool RCVContainer::erase | ( | RCViolation_shptr | rcv | ) |
Erase a specific RC violation.
| rcv | The RC violation, which should be removed. |
Definition at line 65 of file RCVContainer.cc.
References end(), find(), and violations.
{
iterator iter = find(rcv);
if(iter != end()) {
violations.erase(iter);
return true;
}
return false;
}

| RCVContainer::const_iterator RCVContainer::find | ( | RCViolation_shptr | rcv | ) | const |
Find a RC violation and return a const iterator.
Definition at line 81 of file RCVContainer.cc.
References begin(), and end().
{
for(const_iterator iter = begin(); iter != end(); ++iter) {
if((*iter)->equals(rcv)) return iter;
}
return end();
}

| RCVContainer::iterator RCVContainer::find | ( | RCViolation_shptr | rcv | ) |
Find a RC violation in the container.
Definition at line 74 of file RCVContainer.cc.
References begin(), and end().
Referenced by contains(), and erase().
{
for(iterator iter = begin(); iter != end(); ++iter) {
if((*iter)->equals(rcv)) return iter;
}
return end();
}


| void RCVContainer::push_back | ( | RCViolation_shptr | rcv | ) |
Add a RC violation to the container.
Definition at line 33 of file RCVContainer.cc.
References violations.
Referenced by degate::RCBase::add_rc_violation(), and degate::RCVBlacklistImporter::parse_list().
{
violations.push_back(rcv);
}

| size_t RCVContainer::size | ( | ) | const |
Get the number of entries.
Definition at line 57 of file RCVContainer.cc.
References violations.
{
return violations.size();
}
Definition at line 47 of file RCVContainer.h.
Referenced by begin(), clear(), end(), erase(), push_back(), and size().
1.7.4