xorp

PolicyTags Class Reference

A set of policy tags. More...

#include <policytags.hh>

List of all members.

Classes

class  PolicyTagsError
 Exception thrown on failed initialization of tags. More...

Public Member Functions

 PolicyTags ()
 Empty policytags may be safely created.
 PolicyTags (const XrlAtomList &xrlatoms)
 Attempt to create policy tags from an XrlAtomList.
string str () const
bool operator== (const PolicyTags &rhs) const
Elementelement () const
 Convert to an ElemSet.
Elementelement_tag () const
void set_tag (const Element &e)
void set_ptags (const Element &e)
XrlAtomList xrl_atomlist () const
 Convert to XrlAtomList of xrlatom_uint32's.
void insert (const PolicyTags &pt)
 Insert policy tags from another PolicyTags.
void insert (uint32_t tag)
bool contains_atleast_one (const PolicyTags &tags) const
 Check if intersection is not empty.

Private Types

typedef set< uint32_t > Set

Private Attributes

Set _tags
uint32_t _tag

Detailed Description

A set of policy tags.

A policytag is a marker for a route.

A policytag marks a route. This is needed to match the source part of an export policy. Export filters are in the destination protocol, so no information about the origin of the route is available then. Thus, routes need to be tagged in the source protocol, so the export filter may match against tags.


Constructor & Destructor Documentation

PolicyTags::PolicyTags ( )

Empty policytags may be safely created.

No exception thrown

PolicyTags::PolicyTags ( const XrlAtomList xrlatoms)

Attempt to create policy tags from an XrlAtomList.

It must contain unsigned 32bit integer atoms.

Parameters:
xrlatomslist of xrlatom_uint32 atoms to initialize from.

Member Function Documentation

bool PolicyTags::contains_atleast_one ( const PolicyTags tags) const

Check if intersection is not empty.

Returns:
true if atleast one tag is contained in the other tags.
Parameters:
tagstags to check with.
Element * PolicyTags::element ( ) const

Convert to an ElemSet.

Returns:
ElemSet representation. Caller is responsible for delete.
void PolicyTags::insert ( const PolicyTags pt)

Insert policy tags from another PolicyTags.

Parameters:
ptPolicyTags to insert.
bool PolicyTags::operator== ( const PolicyTags rhs) const
Returns:
true if set is equal.
Parameters:
rhsPolicyTags to compare with.
string PolicyTags::str ( ) const
Returns:
string representation of policytags.
XrlAtomList PolicyTags::xrl_atomlist ( ) const

Convert to XrlAtomList of xrlatom_uint32's.

Returns:
XrlAtomList representation.

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations