xorp

ElemInt32 Class Reference

32bit signed integer. More...

#include <element.hh>

Inheritance diagram for ElemInt32:
Element

List of all members.

Public Member Functions

 ElemInt32 (const char *c_str)
 Construct via c-style string.
 ElemInt32 (const int32_t val)
string str () const
int32_t val () const
const char * type () const

Static Public Attributes

static const char * id = "i32"
 The identifier [type] of the element.
static Hash _hash = HASH_ELEM_INT32

Private Attributes

int32_t _val

Detailed Description

32bit signed integer.


Constructor & Destructor Documentation

ElemInt32::ElemInt32 ( const char *  c_str) [inline]

Construct via c-style string.

This is necessary in order to create elements via the ElementFactory. If c_str is null, then the element is assigned a default value. Null c_str is used by the semantic checker, to obtain "dummy" elements for validity checks.

Parameters:
c_strinitialize via string, or assign default value if null.

Member Function Documentation

string ElemInt32::str ( ) const [inline, virtual]
Returns:
string representation of integer

Implements Element.

const char* ElemInt32::type ( ) const [inline, virtual]
Returns:
string representation of element type.

Implements Element.

int32_t ElemInt32::val ( ) const [inline]
Returns:
value of the element.

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