Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

SnmpCollection< T > Class Template Reference

#include <collect1.h>

Inheritance diagram for SnmpCollection< T >:

[legend]
Collaboration diagram for SnmpCollection< T >:
[legend]
List of all members.

template<class T>
class SnmpCollection< T >


Public Member Functions

 SnmpCollection ()
 Create an empty collection.

 SnmpCollection (const T &t)
 Create a collection using a single template object.

 SnmpCollection (const SnmpCollection< T > &c)
 Create a collection with another collection (copy constructor).

 ~SnmpCollection ()
 Destroy the collection.

int size () const
 Get the size of the collection.

SnmpCollectionoperator+= (const T &i)
 Append an item to the collection.

SnmpCollectionoperator= (const SnmpCollection< T > &c)
 Assign one collection to another.

operator[] (const int p) const
 Access an element in the collection.

int set_element (const T &i, const int p)
 Set an element in the collection.

int get_element (T &t, const int p) const
 Get an element in the collection.

int get_element (T *&t, const int p) const
 Get a pointer to an element in the collection.

void apply (void f(T &))
 Apply an function to the entire collection, iterator.

int find (const T &i, int &pos) const
 Looks for an element in the collection.

int remove (const T &i)
 Delete an element in the collection.

void clear ()
 Delete all elements within the collection.

 SnmpCollection ()
 Create an empty collection.

 SnmpCollection (const T &t)
 Create a collection using a single template object.

 SnmpCollection (const SnmpCollection< T > &c)
 Create a collection with another collection (copy constructor).

 ~SnmpCollection ()
 Destroy the collection.

int size () const
 Get the size of the collection.

SnmpCollectionoperator+= (const T &i)
 Append an item to the collection.

SnmpCollectionoperator= (const SnmpCollection< T > &c)
 Assign one collection to another.

operator[] (const int p) const
 Access an element in the collection.

int set_element (const T &i, const int p)
 Set an element in the collection.

int get_element (T &t, const int p) const
 Get an element in the collection.

int get_element (T *&t, const int p) const
 Get a pointer to an element in the collection.

void apply (void f(T &))
 Apply an function to the entire collection, iterator.

int find (const T &i, int &pos) const
 Looks for an element in the collection.

int remove (const T &i)
 Delete an element in the collection.

void clear ()
 Delete all elements within the collection.


Private Attributes

int count
cBlock data

Constructor & Destructor Documentation

template<class T>
SnmpCollection< T >::SnmpCollection  )  [inline]
 

Create an empty collection.

Definition at line 50 of file collect1.h.

template<class T>
SnmpCollection< T >::SnmpCollection const T &  t  )  [inline]
 

Create a collection using a single template object.

Definition at line 56 of file collect1.h.

template<class T>
SnmpCollection< T >::SnmpCollection const SnmpCollection< T > &  c  )  [inline]
 

Create a collection with another collection (copy constructor).

Definition at line 65 of file collect1.h.

template<class T>
SnmpCollection< T >::~SnmpCollection  )  [inline]
 

Destroy the collection.

Definition at line 95 of file collect1.h.

template<class T>
SnmpCollection< T >::SnmpCollection  ) 
 

Create an empty collection.

template<class T>
SnmpCollection< T >::SnmpCollection const T &  t  ) 
 

Create a collection using a single template object.

template<class T>
SnmpCollection< T >::SnmpCollection const SnmpCollection< T > &  c  ) 
 

Create a collection with another collection (copy constructor).

template<class T>
SnmpCollection< T >::~SnmpCollection  ) 
 

Destroy the collection.


Member Function Documentation

template<class T>
void SnmpCollection< T >::apply void   f(T &)  ) 
 

Apply an function to the entire collection, iterator.

template<class T>
void SnmpCollection< T >::apply void   f(T &)  )  [inline]
 

Apply an function to the entire collection, iterator.

Definition at line 250 of file collect1.h.

template<class T>
void SnmpCollection< T >::clear  ) 
 

Delete all elements within the collection.

template<class T>
void SnmpCollection< T >::clear  )  [inline]
 

Delete all elements within the collection.

Definition at line 311 of file collect1.h.

template<class T>
int SnmpCollection< T >::find const T &  i,
int &  pos
const
 

Looks for an element in the collection.

Returns:
TRUE if found.

template<class T>
int SnmpCollection< T >::find const T &  i,
int &  pos
const [inline]
 

Looks for an element in the collection.

Returns:
TRUE if found.

Definition at line 265 of file collect1.h.

template<class T>
int SnmpCollection< T >::get_element T *&  t,
const int  p
const
 

Get a pointer to an element in the collection.

Returns:
0 on success and -1 on failure.

template<class T>
int SnmpCollection< T >::get_element T &  t,
const int  p
const
 

Get an element in the collection.

Returns:
0 on success and -1 on failure.

template<class T>
int SnmpCollection< T >::get_element T *&  t,
const int  p
const [inline]
 

Get a pointer to an element in the collection.

Returns:
0 on success and -1 on failure.

Definition at line 234 of file collect1.h.

template<class T>
int SnmpCollection< T >::get_element T &  t,
const int  p
const [inline]
 

Get an element in the collection.

Returns:
0 on success and -1 on failure.

Definition at line 216 of file collect1.h.

Referenced by SnmpCollection< GenAddress >::operator=().

template<class T>
SnmpCollection& SnmpCollection< T >::operator+= const T &  i  ) 
 

Append an item to the collection.

template<class T>
SnmpCollection& SnmpCollection< T >::operator+= const T &  i  )  [inline]
 

Append an item to the collection.

Definition at line 111 of file collect1.h.

template<class T>
SnmpCollection& SnmpCollection< T >::operator= const SnmpCollection< T > &  c  ) 
 

Assign one collection to another.

template<class T>
SnmpCollection& SnmpCollection< T >::operator= const SnmpCollection< T > &  c  )  [inline]
 

Assign one collection to another.

Definition at line 136 of file collect1.h.

template<class T>
T SnmpCollection< T >::operator[] const int  p  )  const
 

Access an element in the collection.

Returns:
The requestet element or an empty element if out of bounds.

template<class T>
T SnmpCollection< T >::operator[] const int  p  )  const [inline]
 

Access an element in the collection.

Returns:
The requestet element or an empty element if out of bounds.

Definition at line 173 of file collect1.h.

template<class T>
int SnmpCollection< T >::remove const T &  i  ) 
 

Delete an element in the collection.

template<class T>
int SnmpCollection< T >::remove const T &  i  )  [inline]
 

Delete an element in the collection.

Definition at line 282 of file collect1.h.

template<class T>
int SnmpCollection< T >::set_element const T &  i,
const int  p
 

Set an element in the collection.

Returns:
0 on success and -1 on failure.

template<class T>
int SnmpCollection< T >::set_element const T &  i,
const int  p
[inline]
 

Set an element in the collection.

Returns:
0 on success and -1 on failure.

Definition at line 197 of file collect1.h.

template<class T>
int SnmpCollection< T >::size  )  const
 

Get the size of the collection.

template<class T>
int SnmpCollection< T >::size  )  const [inline]
 

Get the size of the collection.

Definition at line 103 of file collect1.h.


Member Data Documentation

template<class T>
int SnmpCollection< T >::count [private]
 

Definition at line 134 of file collect2.h.

Referenced by SnmpCollection< GenAddress >::operator=().

template<class T>
cBlock SnmpCollection< T >::data [private]
 

Definition at line 135 of file collect2.h.


The documentation for this class was generated from the following files:
Generated on Tue Jan 4 22:42:20 2005 for SNMP++ by doxygen 1.3.2