|
xorp
|
Container of all policies. More...
#include <policy_map.hh>
Classes | |
| class | PolicyMapError |
| Exception thrown on errors such as when a policy is not found. More... | |
Public Types | |
|
typedef Dependency < PolicyStatement >::KEYS | KEYS |
Public Member Functions | |
| PolicyStatement & | find (const string &name) const |
| Find a policy. | |
| bool | exists (const string &name) |
| Checks if a policy exists. | |
| void | create (const string &name, SetMap &smap) |
| Attempts to create a policy and update depndencies. | |
| void | delete_policy (const string &name) |
| Attempts to delete a policy. | |
| void | add_dependency (const string &policyname, const string &protocol) |
| Indicates the use of a policy by a protocol. | |
| void | del_dependency (const string &policyname, const string &protocol) |
| Remove the use of a policy by a protocol. | |
| string | str () |
| Dumps all policies in human readable format. | |
| void | clear () |
| void | policy_deps (const string &policy, DEPS &deps) |
| void | policies (KEYS &out) |
Private Types | |
|
typedef Dependency < PolicyStatement > | Dep |
Private Attributes | |
| Dep | _deps |
Container of all policies.
It relates policy names with actual policies and deals with dependencies.
| void PolicyMap::add_dependency | ( | const string & | policyname, |
| const string & | protocol | ||
| ) |
Indicates the use of a policy by a protocol.
| policyname | policy name. |
| protocol | name of protocol which uses policy. |
| void PolicyMap::create | ( | const string & | name, |
| SetMap & | smap | ||
| ) |
Attempts to create a policy and update depndencies.
Throws an exception on error.
| name | name of policy. |
| smap | SetMap used for updating dependencies. |
| void PolicyMap::del_dependency | ( | const string & | policyname, |
| const string & | protocol | ||
| ) |
Remove the use of a policy by a protocol.
| policyname | policy name. |
| protocol | name of protocol which no longer uses policy. |
| void PolicyMap::delete_policy | ( | const string & | name | ) |
Attempts to delete a policy.
Throws an exception on error.
| name | policy name. |
| bool PolicyMap::exists | ( | const string & | name | ) |
Checks if a policy exists.
| name | name of policy. |
| PolicyStatement & PolicyMap::find | ( | const string & | name | ) | const |
Find a policy.
Throws an exception if not found.
| name | name of policy wanted. |
| string PolicyMap::str | ( | ) |
Dumps all policies in human readable format.