class Code

This class represents the intermediate language code. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods


Detailed Description

It contains the actual code for the policy, its target, and names of the sets referenced. It also contains the policytags referenced.

Target (class)

Target

A target consists of a protocol and a filter type. It identifies exactly which filter of which protocol has to be configured with this code.

typedef set<Target> TargetSet

TargetSet

typedef set<uint32_t> TagSet

TagSet

const Code::Target&  target ()

target

[const]

Get the target.

Returns: a reference to the target.

void  set_target (const Code::Target target)

set_target

Set the target.

Parameters:

targetthe target.
void  set_target_protocol (const string& protocol)

set_target_protocol

Set the target protocol.

Parameters:

protocolthe target protocol name.
void  set_target_filter (const filter::Filter& filter)

set_target_filter

Set the target filter type.

Parameters:

filterthe target filter type.
const string&  code ()

code

[const]

Get the actual code.

Returns: a reference to the actual code.

void  set_code (const string& code)

set_code

Set the actual code.

Parameters:

codethe actual code.
void  add_code (const string& code)

add_code

Add to the actual code.

Parameters:

codethe code to add.
const set<string>  referenced_set_names ()

referenced_set_names

[const]

Get the names of the sets referenced by this code.

Returns: a reference to the names of the sets referenced by this code.

void  set_referenced_set_names (const set<string>& set_names)

set_referenced_set_names

Set the names of the sets referenced by this code.

Parameters:

set_namesthe names of the sets referenced by this code.
void  add_referenced_set_name (const string& set_name)

add_referenced_set_name

Add the name of a set referenced by this code.

Parameters:

set_namethe name of the set referenced by this code.
void  clear_referenced_set_names ()

clear_referenced_set_names

Remove the names of all sets referenced by this code.

const set<string>&  source_protocols ()

source_protocols

[const]

void  add_source_protocol (const string& protocol)

add_source_protocol

Add a source protocol.

Parameters:

protocolthe protocol to add.
const Code::TagSet&  all_tags ()

all_tags

[const]

Get the set with all tags.

Returns: a reference to the set with all tags.

const Code::TagSet&  redist_tags ()

redist_tags

[const]

Get the set with the tags used for route redistribution to other protocols.

Returns: a reference to the set with tags used for route redistribution.

void  add_tag (uint32_t tag, bool is_redist_tag)

add_tag

Add a tag.

Parameters:

tagthe tag to add.
is_redist_tagif true, the tag is used for route redistribution to other protocols.
void  add_subr (const string& policy, const string& code)

add_subr

const SUBR&  subr ()

subr

[const]

string  str ()

str

Returns: string representation of code.

Code&  operator += (const Code& rhs)

operator +=

Appends code to current code. It enables for chunks of code to be linked.

Parameters:

rhscode to link.

Returns: reference to the updated code.


Generated by: pavlin on kobe.xorp.net on Wed Jan 7 19:11:02 2009, using kdoc 2.0a54+XORP.