degate  0.1.2
Public Types | Public Member Functions | Private Attributes
degate::RCVContainer Class Reference

Representation for a container type, which holds a list of Rule Check Violations. More...

#include <RCVContainer.h>

List of all members.

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

Detailed Description

Representation for a container type, which holds a list of Rule Check Violations.

Definition at line 40 of file RCVContainer.h.


Member Typedef Documentation

typedef container_type::const_iterator degate::RCVContainer::const_iterator

Definition at line 44 of file RCVContainer.h.

Definition at line 42 of file RCVContainer.h.

typedef container_type::iterator degate::RCVContainer::iterator

Definition at line 43 of file RCVContainer.h.


Constructor & Destructor Documentation

The ctor.

Definition at line 27 of file RCVContainer.cc.

                           {
}

The dtor.

Definition at line 30 of file RCVContainer.cc.

                            {
}

Member Function Documentation

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(); 
}

Here is the caller graph for this function:

Get a const iterator for the start of the list.

Definition at line 45 of file RCVContainer.cc.

References violations.

                                                     { 
  return violations.begin(); 
}

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(); 
}

Here is the caller graph for this function:

Check if the container has already stored a specific RC violation.

Parameters:
rcvThe RC violation for which the presence should be checked.
Returns:
Returns true, if the RC violation is present in the container.

Definition at line 61 of file RCVContainer.cc.

References end(), and find().

                                                       { 
  return find(rcv) != end();
}

Here is the call graph for this function:

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(); 
}

Here is the caller graph for this function:

Get a const iterator for the end of the list.

Definition at line 49 of file RCVContainer.cc.

References violations.

                                                   { 
  return violations.end(); 
}

Erase a specific RC violation.

Parameters:
rcvThe RC violation, which should be removed.
Returns:
Returns true, if the RC violation was found and removed. Else false is returned.

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;
}

Here is the call graph for this function:

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();
}

Here is the call graph for this function:

Here is the caller graph for this function:

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();
}

Here is the call graph for this function:

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);
}

Here is the caller graph for this function:

size_t RCVContainer::size ( ) const

Get the number of entries.

Definition at line 57 of file RCVContainer.cc.

References violations.

                                { 
  return violations.size(); 
}

Member Data Documentation

Definition at line 47 of file RCVContainer.h.

Referenced by begin(), clear(), end(), erase(), push_back(), and size().


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