AGENT++  4.0.3
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
MibTableRow Class Reference

#include <mib.h>

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.
 
bool 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 =.
 
bool 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, bool 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

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).
MibTableRow* MibTableRow::clone ( )

Clone the receiver.

Returns
A pointer to the clone.
bool 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.
MibLeaf* MibTableRow::first ( )
inline

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

Returns
A pointer to a MibLeaf object.
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.
Oidx MibTableRow::get_index ( )
inline

Return the index of the receiver row.

Returns
The index of the receiver row.
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.
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::get_vblist ( Vbx ,
int  ,
bool  returnVolatileAsNull = FALSE 
)

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

Parameters
vbsthe array of Vbx instances to store the values.
szthe size of the array.
returnVolatileAsNullif set to TRUE (FALSE is the default), volatile columns will return a Null value instead of their real value.
Version
3.5.22
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
columna 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_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.
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.
Oidx* MibTableRow::key ( )
inline

Return a pointer to the index of the receiver row.

Returns
a pointer to the index of the receiver row.
MibLeaf* MibTableRow::last ( )
inline

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

Returns
A pointer to a MibLeaf object.
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.
MibTableRow& MibTableRow::operator= ( const MibTableRow )

Operator =.

Parameters
other- The MibTableRow the receiver is assigned to.
Returns
A reference to the receiver itself.
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.
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.
void MibTableRow::read_only ( )

Convert the row to a read-only row.

bool 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
columnthe column to be replaced (counted from 0).
entrya MibLeaf instance.
void MibTableRow::set_access ( mib_access  )

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

Parameters
accessthe mib_access value that should be applied to the row.
virtual void MibTableRow::set_base ( const Oidx b)
inlineprotectedvirtual

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.
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.
void MibTableRow::set_reference_to_row ( )
protected

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

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.
int MibTableRow::size ( )
inline

Get the size of this row.

Returns
The size of the row.

Friends And Related Function Documentation

friend class MibTable
friend

Member Data Documentation

Oidx MibTableRow::base
protected
Oidx MibTableRow::index
protected
OrderedList<MibLeaf> MibTableRow::row
protected
snmpRowStatus* MibTableRow::row_status
protected

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