MibTableRow Class Reference

#include <mib.h>

List of all members.

Public Member Functions

 MibTableRow ()
 Default constructor.
 MibTableRow (const Oidx &base)
 Construct a row with specified base.
 MibTableRow (const MibTableRow &)
 Copy Constructor.
virtual ~MibTableRow ()
 Destructor - destroys the row and all the MibLeaf objects it contains.
MibTableRowclone ()
 Clone the receiver.
MibLeafadd (MibLeaf *l)
 Append a MibLeaf instance to the end of the receiver row.
snmpRowStatusadd (snmpRowStatus *l)
 Append a snmpRowStatus instance to the end of the receiver row.
MibLeafget_nth (int i)
 Get the MibLeaf instance at the n-th (starting from 0) column of this row.
MibLeaffirst ()
 Get the MibLeaf object at the first column of this row.
MibLeaflast ()
 Get the MibLeaf object at the last column of this row.
int size ()
 Get the size of this row.
MibLeafget_element (const Oidx &)
 Return the element of the receiver row with a given oid.
boolean remove (int)
 Remove the object at a specified column from this row.
void replace_element (unsigned int, MibLeaf *)
 Replace the element at the given column.
int operator< (const MibTableRow &)
 Operator <.
int operator> (const MibTableRow &)
 Operator >.
int operator== (const MibTableRow &)
 Operator ==.
MibTableRowoperator= (const MibTableRow &)
 Operator =.
boolean contains (const Oidx &) const
 Return whether the receiver row contains an object with a given oid.
int index_of (const Oidx &) const
 Return the index (counted from 0) of the row's object whose OID equals the given oid.
int index_of (MibLeaf *l) const
 Return the index (counted from 0) of the row's object whose that equals the given object.
int index_of_upper (const Oidx &) const
 Return the index (counted from 0) of the row's object whose OID is greater or equal the given oid.
int index_of_lower (const Oidx &) const
 Return the index (counted from 0) of the row's object whose OID is less or equal the given oid.
virtual void set_index (const Oidx &ind)
 Set the index of the receiveržs row.
Oidx get_index ()
 Return the index of the receiver row.
Oidxkey ()
 Return a pointer to the index of the receiver row.
void get_vblist (Vbx *, int, boolean returnVolatileAsNull=FALSE)
 Returns a list of variable bindings representing the object identifiers and values of this row.
snmpRowStatusget_row_status ()
 Return the row status object of the receiver row, if it has one.
void read_only ()
 Convert the row to a read-only row.
void set_access (mib_access)
 Sets the access value of all columnar objects (MibLeaf instances) of this row.

Protected Member Functions

virtual void set_base (const Oidx &b)
 Set the base (i.e.
void set_reference_to_table (MibTable *)
 Set a reference to the receiveržs table in all of its columns.
void set_reference_to_row ()
 Set a reference to the receiver in all of its columns.

Protected Attributes

Oidx index
Oidx base
OrderedList< MibLeafrow
snmpRowStatusrow_status

Friends

class MibTable


Constructor & Destructor Documentation

MibTableRow::MibTableRow (  ) 

Default constructor.

MibTableRow::MibTableRow ( const Oidx base  ) 

Construct a row with specified base.

Parameters:
b - A base object identifier (the object identifier of the table's entry object type).

MibTableRow::MibTableRow ( const MibTableRow  ) 

Copy Constructor.

Parameters:
other - Another MibTableRow instance.

virtual MibTableRow::~MibTableRow (  )  [virtual]

Destructor - destroys the row and all the MibLeaf objects it contains.


Member Function Documentation

MibTableRow* MibTableRow::clone (  ) 

Clone the receiver.

Returns:
A pointer to the clone.

MibLeaf* MibTableRow::add ( MibLeaf l  ) 

Append a MibLeaf instance to the end of the receiver row.

Parameters:
l - A pointer to the MibLeaf object to append.
Returns:
The pointer to the added MibLeaf object (always the same as the input pointer).

snmpRowStatus* MibTableRow::add ( snmpRowStatus l  ) 

Append a snmpRowStatus instance to the end of the receiver row.

Each row can only contain zero or one snmpRowStatus object, but that's not checked here.

Parameters:
l - A pointer to the snmpRowStatus object to append.
Returns:
The pointer to the added snmpRowStatus object (always the same as the input pointer).

MibLeaf* MibTableRow::get_nth ( int  i  )  [inline]

Get the MibLeaf instance at the n-th (starting from 0) column of this row.

Parameters:
i - The column index (starting from 0).
Returns:
A pointer to a MibLeaf object.

MibLeaf* MibTableRow::first (  )  [inline]

Get the MibLeaf object at the first column of this row.

Returns:
A pointer to a MibLeaf object.

MibLeaf* MibTableRow::last (  )  [inline]

Get the MibLeaf object at the last column of this row.

Returns:
A pointer to a MibLeaf object.

int MibTableRow::size (  )  [inline]

Get the size of this row.

Returns:
The size of the row.

MibLeaf* MibTableRow::get_element ( const Oidx  ) 

Return the element of the receiver row with a given oid.

Parameters:
oid - The object identifier to search for.
Returns:
A pointer to the found MibLeaf object or 0 if no such object could be found.

boolean MibTableRow::remove ( int   ) 

Remove the object at a specified column from this row.

Parameters:
i - The index (starting from 0) of the column to be removed.
Returns:
TRUE if a such a column existed and has been removed, FALSE otherwise.

void MibTableRow::replace_element ( unsigned  int,
MibLeaf  
)

Replace the element at the given column.

Parameters:
column the column to be replaced (counted from 0).
entry a MibLeaf instance.

int MibTableRow::operator< ( const MibTableRow  ) 

Operator <.

Parameters:
other - The MibTableRow the receiver is compared with.
Returns:
TRUE if the receiver is less than the comparate, FALSE otherwise.

int MibTableRow::operator> ( const MibTableRow  ) 

Operator >.

Parameters:
other - The MibTableRow the receiver is compared with.
Returns:
TRUE if the receiver is greater than the comparate, FALSE otherwise.

int MibTableRow::operator== ( const MibTableRow  ) 

Operator ==.

Parameters:
other - The MibTableRow the receiver is compared with.
Returns:
TRUE if the receiver is equals the comparate, FALSE otherwise.

MibTableRow& MibTableRow::operator= ( const MibTableRow  ) 

Operator =.

Parameters:
other - The MibTableRow the receiver is assigned to.
Returns:
A reference to the receiver itself.

boolean MibTableRow::contains ( const Oidx  )  const

Return whether the receiver row contains an object with a given oid.

Parameters:
oid - The object identfier to search for.
Returns:
TRUE if the receiver row contains an object with the given oid, FALSE otherwise.

int MibTableRow::index_of ( const Oidx  )  const

Return the index (counted from 0) of the row's object whose OID equals the given oid.

Parameters:
oid - The object id to search for.
Returns:
The index (counted from 0) of the found column or -1 if such a column can't be found.

int MibTableRow::index_of ( MibLeaf l  )  const [inline]

Return the index (counted from 0) of the row's object whose that equals the given object.

Parameters:
column a pointer to an MibLeaf column to search for.
Returns:
the index (counted from 0) of the found column or -1 if such a column can't be found.
Since:
3.4.7

int MibTableRow::index_of_upper ( const Oidx  )  const

Return the index (counted from 0) of the row's object whose OID is greater or equal the given oid.

Parameters:
oid - The object id to search for.
Returns:
The index (counted from 0) of the found column or -1 if such a column canžt be found.

int MibTableRow::index_of_lower ( const Oidx  )  const

Return the index (counted from 0) of the row's object whose OID is less or equal the given oid.

Parameters:
oid - The object id to search for.
Returns:
The index (counted from 0) of the found column or -1 if such a column canžt be found.

virtual void MibTableRow::set_index ( const Oidx ind  )  [virtual]

Set the index of the receiveržs row.

Parameters:
ind - The (new) index of the receiveržs row.
Note:
Currently only multi-column Integer (scalar) indecies and single column OID and String indecies are supported for automatic index object initialization.

Oidx MibTableRow::get_index (  )  [inline]

Return the index of the receiver row.

Returns:
The index of the receiver row.

Oidx* MibTableRow::key (  )  [inline]

Return a pointer to the index of the receiver row.

Returns:
a pointer to the index of the receiver row.

void MibTableRow::get_vblist ( Vbx ,
int  ,
boolean  returnVolatileAsNull = FALSE 
)

Returns a list of variable bindings representing the object identifiers and values of this row.

Parameters:
vbs the array of Vbx instances to store the values.
sz the size of the array.
returnVolatileAsNull if set to TRUE (FALSE is the default), volatile columns will return a Null value instead of their real value.
Version:
3.5.22

snmpRowStatus* MibTableRow::get_row_status (  )  [inline]

Return the row status object of the receiver row, if it has one.

Returns:
A pointer to the rowžs snmpRowStatus object, or 0 if the row has no row status.

void MibTableRow::read_only (  ) 

Convert the row to a read-only row.

void MibTableRow::set_access ( mib_access   ) 

Sets the access value of all columnar objects (MibLeaf instances) of this row.

Parameters:
access the mib_access value that should be applied to the row.

virtual void MibTableRow::set_base ( const Oidx b  )  [inline, protected, virtual]

Set the base (i.e.

the table's entry object's oid) oid value. An oid of an object of an SNMP table consists of the following three parts: base + column + index

Parameters:
b - The base oid.

void MibTableRow::set_reference_to_table ( MibTable  )  [protected]

Set a reference to the receiveržs table in all of its columns.

Parameters:
t - The MibTable object the reciever belongs to.

void MibTableRow::set_reference_to_row (  )  [protected]

Set a reference to the receiver in all of its columns.


Friends And Related Function Documentation

friend class MibTable [friend]


Member Data Documentation

Oidx MibTableRow::index [protected]

Oidx MibTableRow::base [protected]


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

Generated on Fri May 29 22:36:54 2009 for AGENT++ by  doxygen 1.5.6