Otawa  0.10
otawa::NoType Class Reference

Null value for types. More...

#include <otawa/type.h>

Inheritance diagram for otawa::NoType:
otawa::Type

Public Types

enum  kind_t {
  NONE = 0, BASE = 1, ENUM = 2, ARRAY = 3,
  STRUCT = 4, UNION = 5, PTR = 6, FUN = 7
}
 
typedef enum otawa::Type::kind_t kind_t
 
enum  base_t {
  VOID = 0, BLOCK = 1, BOOL = 2, CHAR = 3,
  INT8 = 4, UINT8 =5, INT16 = 6, UINT16 = 7,
  INT32 = 8, UINT32 = 9, INT64 = 10, UINT64 = 11,
  FLOAT32 = 12, FLOAT64 = 13, FLOAT128 = 14, ADDR32 = 15,
  CSTRING = 16, STRING_ = 17, BASE_TOP = 18
}
 
typedef enum otawa::Type::base_t base_t
 

Public Member Functions

 NoType (void)
 
virtual kind_t kind (void) const
 Get the kind of the type. More...
 
virtual void print (elm::io::Output &output) const
 Print a text representation of the type. More...
 
bool equals (const Type &type) const
 
virtual const BaseTypetoBase (void) const
 If the type is a base type, return it. More...
 
bool operator== (const Type &type) const
 
bool operator!= (const Type &type) const
 

Static Public Member Functions

static const BaseTypegetBaseType (base_t type)
 Get a base type from its base type value. More...
 

Static Public Attributes

static const NoType no_type
 
static const BaseType void_type
 
static const BaseType block_type
 
static const BaseType bool_type
 
static const BaseType char_type
 
static const BaseType int8_type
 
static const BaseType uint8_type
 
static const BaseType int16_type
 
static const BaseType uint16_type
 
static const BaseType int32_type
 
static const BaseType uint32_type
 
static const BaseType int64_type
 
static const BaseType uint64_type
 
static const BaseType float32_type
 
static const BaseType float64_type
 
static const BaseType float128_type
 
static const BaseType addr32_type
 
static const BaseType cstring_type
 
static const BaseType string_type
 

Detailed Description

Null value for types.

Member Typedef Documentation

typedef enum otawa::Type::base_t otawa::Type::base_t
inherited
typedef enum otawa::Type::kind_t otawa::Type::kind_t
inherited

Member Enumeration Documentation

enum otawa::Type::base_t
inherited
Enumerator
VOID 
BLOCK 
BOOL 
CHAR 
INT8 
UINT8 
INT16 
UINT16 
INT32 
UINT32 
INT64 
UINT64 
FLOAT32 
FLOAT64 
FLOAT128 
ADDR32 
CSTRING 
STRING_ 
BASE_TOP 
enum otawa::Type::kind_t
inherited
Enumerator
NONE 
BASE 
ENUM 
ARRAY 
STRUCT 
UNION 
PTR 
FUN 

Constructor & Destructor Documentation

otawa::NoType::NoType ( void  )
inline

Member Function Documentation

bool otawa::Type::equals ( const Type type) const
inlineinherited

References otawa::type().

const BaseType & otawa::Type::getBaseType ( base_t  type)
staticinherited

Get a base type from its base type value.

Parameters
typeBase type.
Returns
Matching base type value.

References otawa::Type::BASE_TOP, and otawa::type().

Type::kind_t otawa::NoType::kind ( void  ) const
virtual

Get the kind of the type.

Returns
The kind of the type.

Implements otawa::Type.

References otawa::Type::NONE.

bool otawa::Type::operator!= ( const Type type) const
inlineinherited
bool otawa::Type::operator== ( const Type type) const
inlineinherited
void otawa::NoType::print ( elm::io::Output output) const
virtual

Print a text representation of the type.

Parameters
outputOutput to display to.

Reimplemented from otawa::Type.

const BaseType * otawa::Type::toBase ( void  ) const
inlinevirtualinherited

If the type is a base type, return it.

Else return null.

Returns
Base type or null.

Reimplemented in otawa::BaseType.

Member Data Documentation

const BaseType otawa::Type::addr32_type
staticinherited
const BaseType otawa::Type::block_type
staticinherited
const BaseType otawa::Type::bool_type
staticinherited
const BaseType otawa::Type::char_type
staticinherited
const BaseType otawa::Type::cstring_type
staticinherited
const BaseType otawa::Type::float128_type
staticinherited
const BaseType otawa::Type::float32_type
staticinherited
const BaseType otawa::Type::float64_type
staticinherited
const BaseType otawa::Type::int16_type
staticinherited
const BaseType otawa::Type::int32_type
staticinherited
const BaseType otawa::Type::int64_type
staticinherited
const BaseType otawa::Type::int8_type
staticinherited
const NoType otawa::Type::no_type
staticinherited
const BaseType otawa::Type::string_type
staticinherited
const BaseType otawa::Type::uint16_type
staticinherited
const BaseType otawa::Type::uint64_type
staticinherited
const BaseType otawa::Type::uint8_type
staticinherited
const BaseType otawa::Type::void_type
staticinherited

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