AgentXSearchRange Class Reference

The AgentXSearchRange class represents an item in an AgentX SearchRangeList. More...

#include <agentx_pdu.h>

List of all members.

Public Member Functions

 AgentXSearchRange ()
 Default constructor.
 AgentXSearchRange (const Oidx &, const Oidx &, boolean=FALSE)
 Create a SearchRange with a given lower and a upper bound, optionally define the lower bound as inclusive or exclusive.
 AgentXSearchRange (const AgentXSearchRange &)
 Copy constructor.
 AgentXSearchRange (const OidxRange &)
 Copy constructor from OidxRange.
virtual ~AgentXSearchRange ()
 Destructor.
virtual AgentXSearchRangeclone () const
 Clone.
virtual AgentXSearchRangeoperator= (const AgentXSearchRange &)
virtual int operator== (const AgentXSearchRange &) const
 Compare the receiver with another OID range for equality.
virtual int operator< (const AgentXSearchRange &) const
 Compare the receiver with another OID range.
virtual int operator> (const AgentXSearchRange &) const
 Compare the receiver with another OID range.
void set_include (boolean inc)
 Set whether the lower bound is included or not.
virtual int includes (const Oidx &) const
 Check whether an OID is within the receiver's range.
virtual int includes_excl (const Oidx &) const
 Check whether an OID is within the receiver's range.
virtual boolean is_lower_included () const
 Check whether the lower bound is is itself included or excluded from the search range.
void no_upper_bound ()
 Unset upper bound.
boolean is_unbounded ()
 Return TRUE if search range has no upper bound.
void set_reference (int ref)
 Set the reference to a SNMP subrequest index.
int get_reference () const
 Get the reference for the receiver.
Oidx get_lower () const
 Get the lower bound.
Oidx get_upper () const
 Get the upper bound.

Protected Attributes

OidxRange range
boolean include
int reference


Detailed Description

The AgentXSearchRange class represents an item in an AgentX SearchRangeList.

Author:
Frank Fock
Version:
1.0

Constructor & Destructor Documentation

AgentXSearchRange::AgentXSearchRange (  ) 

Default constructor.

AgentXSearchRange::AgentXSearchRange ( const Oidx &  ,
const Oidx &  ,
boolean  = FALSE 
)

Create a SearchRange with a given lower and a upper bound, optionally define the lower bound as inclusive or exclusive.

Parameters:
lower the lower bound of the search range
upper the upper bound of the search range
includeLower if TRUE the lower bound is included in the search range, otherwise it is excluded.

AgentXSearchRange::AgentXSearchRange ( const AgentXSearchRange  ) 

Copy constructor.

Parameters:
other another SearchRange

AgentXSearchRange::AgentXSearchRange ( const OidxRange &   ) 

Copy constructor from OidxRange.

Parameters:
other an OidxRange instance

virtual AgentXSearchRange::~AgentXSearchRange (  )  [virtual]

Destructor.


Member Function Documentation

virtual AgentXSearchRange* AgentXSearchRange::clone (  )  const [virtual]

Clone.

Returns:
a pointer to a clone of the receiver.

virtual AgentXSearchRange& AgentXSearchRange::operator= ( const AgentXSearchRange  )  [virtual]

virtual int AgentXSearchRange::operator== ( const AgentXSearchRange  )  const [virtual]

Compare the receiver with another OID range for equality.

Parameters:
other another OidxRange instance
Returns:
TRUE if lower and upper bounds of both OID ranges are equal

virtual int AgentXSearchRange::operator< ( const AgentXSearchRange  )  const [virtual]

Compare the receiver with another OID range.

Parameters:
other another OidxRange instance
Returns:
TRUE if the upper bound of the receiver is less than the lower bound of other

virtual int AgentXSearchRange::operator> ( const AgentXSearchRange  )  const [virtual]

Compare the receiver with another OID range.

Parameters:
other another OidxRange instance
Returns:
TRUE if the lower bound of the receiver is greater than the upper bound of other

void AgentXSearchRange::set_include ( boolean  inc  )  [inline]

Set whether the lower bound is included or not.

Parameters:
include if TRUE, the lower bound is included in the search range, if FALSE, the lower bound is excluded.

virtual int AgentXSearchRange::includes ( const Oidx &   )  const [virtual]

Check whether an OID is within the receiver's range.

Parameters:
oid an object identifier
Returns:
TRUE if oid is greater or equal to the receiver's lower bound and less or equal to its upper bound.

virtual int AgentXSearchRange::includes_excl ( const Oidx &   )  const [virtual]

Check whether an OID is within the receiver's range.

Parameters:
oid an object identifier
Returns:
TRUE if oid is greater as the receiver's lower bound and less than its upper bound.

virtual boolean AgentXSearchRange::is_lower_included (  )  const [inline, virtual]

Check whether the lower bound is is itself included or excluded from the search range.

Returns:
TRUE if the lower bound is included

void AgentXSearchRange::no_upper_bound (  )  [inline]

Unset upper bound.

boolean AgentXSearchRange::is_unbounded (  )  [inline]

Return TRUE if search range has no upper bound.

Returns:
TRUE if the receiver has no upper bound, FALSE otherwise.

void AgentXSearchRange::set_reference ( int  ref  )  [inline]

Set the reference to a SNMP subrequest index.

Parameters:
index an index into a SNMP request PDU.

int AgentXSearchRange::get_reference (  )  const [inline]

Get the reference for the receiver.

Returns:
an index into a SNMP request PDU.

Oidx AgentXSearchRange::get_lower (  )  const [inline]

Get the lower bound.

Returns:
a Oidx specifying the lower bound of the search range.

Oidx AgentXSearchRange::get_upper (  )  const [inline]

Get the upper bound.

Returns:
a Oidx specifying the upper bound of the search range.


Member Data Documentation

OidxRange AgentXSearchRange::range [protected]

boolean AgentXSearchRange::include [protected]


The documentation for this class was generated from the following file:

Generated on Tue May 26 23:32:15 2009 for AgentX++ by  doxygen 1.5.6