xorp

ElemRefAny< T > Class Template Reference

Inheritance diagram for ElemRefAny< T >:
Element

List of all members.

Classes

class  ElemInitError
 exception thrown if c-stype string initialization fails. More...

Public Member Functions

 ElemRefAny (const T &val)
 ElemRefAny (const T &val, bool f)
 ElemRefAny (const char *c_str)
 If the c-style constructor of the wrapped class throws and exception, it is caught and an ElemInitError exception is thrown.
bool operator== (const ElemRefAny< T > &rhs) const
 Invokes the == operator on the actual classes being wrapped.
bool operator< (const ElemRefAny< T > &rhs) const
 Invoke the < operator in the wrapped class.
string str () const
 Invokes the str() method of the actual class being wrapped.
const T & val () const
const char * type () const
 ElemRefAny (const ElemRefAny< T > &copy)

Static Public Attributes

static const char * id = "ipv4"
static Hash _hash = HASH_ELEM_IPV4

Private Member Functions

ElemRefAnyoperator= (const ElemRefAny< T > &)

Private Attributes

const T * _val
bool _free

template<class T>
class ElemRefAny< T >


Constructor & Destructor Documentation

template<class T>
ElemRefAny< T >::ElemRefAny ( const char *  c_str) [inline]

If the c-style constructor of the wrapped class throws and exception, it is caught and an ElemInitError exception is thrown.

The original exception is lost.


Member Function Documentation

template<class T>
bool ElemRefAny< T >::operator< ( const ElemRefAny< T > &  rhs) const [inline]

Invoke the < operator in the wrapped class.

Returns:
whether this is less than argument.
Parameters:
rhselement to compare with.
template<class T>
bool ElemRefAny< T >::operator== ( const ElemRefAny< T > &  rhs) const [inline]

Invokes the == operator on the actual classes being wrapped.

Returns:
whether the two values are equal.
Parameters:
rhselement to compare with.
template<class T>
string ElemRefAny< T >::str ( ) const [inline, virtual]

Invokes the str() method of the actual class being wrapped.

Returns:
string representation of element.

Implements Element.

template<class T>
const char* ElemRefAny< T >::type ( ) const [inline, virtual]
Returns:
string representation of element type.

Implements Element.

template<class T>
const T& ElemRefAny< T >::val ( ) const [inline]
Returns:
the actual object of the class being wrapped.

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