xorp

Code::Target Class Reference

A target represents where the code should be placed. More...

#include <code.hh>

List of all members.

Public Member Functions

 Target ()
 Default constructor.
 Target (const string &p, filter::Filter f)
 Construct a target [protocol/filter pair].
bool operator< (const Target &rhs) const
 Operator to compare Targets.
bool operator== (const Target &rhs) const
bool operator!= (const Target &rhs) const
const string protocol () const
 Get the protocol.
void set_protocol (const string &protocol)
 Set the protocol.
filter::Filter filter () const
 Get the filter type.
void set_filter (const filter::Filter &filter)
 Set the filter type.
string str () const

Private Attributes

string _protocol
filter::Filter _filter

Detailed Description

A target represents where the code should be placed.

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.


Constructor & Destructor Documentation

Code::Target::Target ( const string &  p,
filter::Filter  f 
) [inline]

Construct a target [protocol/filter pair].

Parameters:
ptarget protocol.
ftarget filter.

Member Function Documentation

filter::Filter Code::Target::filter ( ) const [inline]

Get the filter type.

Returns:
the filter type.
bool Code::Target::operator< ( const Target rhs) const

Operator to compare Targets.

Needed for STL set storage.

Returns:
true if target is less than argument
Parameters:
rhstarget to compare with
const string Code::Target::protocol ( ) const [inline]

Get the protocol.

Returns:
the protocol.
void Code::Target::set_filter ( const filter::Filter &  filter) [inline]

Set the filter type.

Parameters:
filterthe filter type.
void Code::Target::set_protocol ( const string &  protocol) [inline]

Set the protocol.

Parameters:
protocolthe protocol name.
string Code::Target::str ( ) const
Returns:
string representation of target.

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