Container of all sets.
More...
#include <set_map.hh>
List of all members.
Classes |
| class | SetMapError |
| | Exception thrown on error, such as deleting a set in use. More...
|
Public Member Functions |
| const Element & | getSet (const string &name) const |
| | Throws exception if set is not found.
|
| void | create (const string &name) |
| | Create a new set.
|
| void | update_set (const string &type, const string &name, const string &elements, set< string > &modified) |
| | Replace the elements of a set.
|
| void | delete_set (const string &name) |
| | Attempts to delete a set.
|
| void | add_to_set (const string &type, const string &name, const string &element, set< string > &modified) |
| | Add an element to a set.
|
| void | delete_from_set (const string &type, const string &name, const string &element, set< string > &modified) |
| | Delete an element from a set.
|
| void | add_dependency (const string &setname, const string &policyname) |
| | Add a dependency of a policy using a set.
|
| void | del_dependency (const string &setname, const string &policyname) |
| | Delete a dependency of a policy using a set.
|
| string | str () const |
|
void | sets_by_type (SETS &s, const string &type) const |
Private Types |
|
typedef Dependency< Element > | Dep |
Private Attributes |
|
Dep | _deps |
|
ElementFactory | _ef |
Detailed Description
Container of all sets.
The SetMap owns all sets in the policy configuration. It also tracks dependencies between sets and policies.
Member Function Documentation
| void SetMap::add_dependency |
( |
const string & |
setname, |
|
|
const string & |
policyname |
|
) |
| |
Add a dependency of a policy using a set.
Throws an exception if set is not found.
- Parameters:
-
| setname | name of set in which dependency should be added. |
| policyname | name of policy which uses the set. |
| void SetMap::add_to_set |
( |
const string & |
type, |
|
|
const string & |
name, |
|
|
const string & |
element, |
|
|
set< string > & |
modified |
|
) |
| |
Add an element to a set.
Throws an expcetion if set does not exist.
- Parameters:
-
| type | type of the set. |
| name | name of the set. |
| element | the element to add. |
| modified | set filled with policies which are now modified. |
| void SetMap::create |
( |
const string & |
name | ) |
|
Create a new set.
Throws exception if set exists.
- Parameters:
-
| void SetMap::del_dependency |
( |
const string & |
setname, |
|
|
const string & |
policyname |
|
) |
| |
Delete a dependency of a policy using a set.
Throws an exception if set or policy is not found.
- Parameters:
-
| setname | name of set in which dependency should be removed. |
| policyname | name of policy which no longer uses the set. |
| void SetMap::delete_from_set |
( |
const string & |
type, |
|
|
const string & |
name, |
|
|
const string & |
element, |
|
|
set< string > & |
modified |
|
) |
| |
Delete an element from a set.
Throws an expcetion if set does not exist.
- Parameters:
-
| type | type of the set. |
| name | name of the set. |
| element | the element to delete. |
| modified | set filled with policies which are now modified. |
| void SetMap::delete_set |
( |
const string & |
name | ) |
|
Attempts to delete a set.
Throws an exception if set is in use.
- Parameters:
-
| const Element & SetMap::getSet |
( |
const string & |
name | ) |
const |
Throws exception if set is not found.
- Returns:
- set requested.
- Parameters:
-
| string SetMap::str |
( |
| ) |
const |
- Returns:
- string representation of all sets.
| void SetMap::update_set |
( |
const string & |
type, |
|
|
const string & |
name, |
|
|
const string & |
elements, |
|
|
set< string > & |
modified |
|
) |
| |
Replace the elements of a set.
Throws an expcetion if set does not exist.
- Parameters:
-
| type | type of the set. |
| name | name of the set. |
| elements | the new elements comma separated. |
| modified | set filled with policies which are now modified. |
The documentation for this class was generated from the following files:
- /home/greearb/git/xorp.ct.github/xorp/policy/set_map.hh
- /home/greearb/git/xorp.ct.github/xorp/policy/set_map.cc