C-Breeze
C Compiler Infrastructure

[ Project home page]

basic_type Class Reference

#include <basic_type.h>

List of all members.

Public Member Functions

 basic_type ()
 basic_type (unsigned int sign, unsigned int length, unsigned int base_type, unsigned int parse_only=0)
bool operator== (const basic_type &bt2) const
bool operator!= (const basic_type &bt2) const
bool operator< (const basic_type &bt2) const
bool is_no_sign () const
void set_no_sign ()
bool is_signed () const
void set_signed ()
bool is_unsigned () const
void set_unsigned ()
bool parse_only () const
void parse_only (bool po)
bool is_no_type () const
void set_no_type ()
bool is_int () const
void set_int ()
bool is_char () const
void set_char ()
bool is_float () const
void set_float ()
bool is_void () const
void set_void ()
bool is_ellipsis () const
void set_ellipsis ()
bool is_no_length () const
void set_no_length ()
bool is_short () const
void set_short ()
bool is_long () const
void set_long ()
bool is_longlong () const
void set_longlong ()
bool is_integer () const
bool is_arithmetic () const
bool is_scalar () const
string to_string () const
string base_name () const
string length_name () const
string sign_name () const
int size ()
int alignment ()
void merge_in (basic_type &other, Coord coord=Coord::Unknown)
void finish ()
int to_num () const

Static Public Attributes

static const basic_type Void
static const basic_type Ellipsis
static const basic_type SChar
static const basic_type UChar
static const basic_type SShort
static const basic_type UShort
static const basic_type SInt
static const basic_type UInt
static const basic_type SLong
static const basic_type ULong
static const basic_type SLongLong
static const basic_type ULongLong
static const basic_type Float
static const basic_type Double
static const basic_type LongDouble
static const basic_type Char
static const basic_type Int
static const basic_type Signed
static const basic_type Unsigned
static const basic_type Short
static const basic_type Long
static const basic_type LongLong
static const basic_type IntParseOnly
static const unsigned int TARGET_MAX_UCHAR
static const unsigned int TARGET_MAX_INT
static const unsigned int TARGET_MAX_UINT
static const unsigned int TARGET_MAX_LONG
static const unsigned int TARGET_MAX_ULONG
static const unsigned int CHAR_SIZE
static const unsigned int CHAR_ALIGN
static const unsigned int SHORT_SIZE
static const unsigned int SHORT_ALIGN
static const unsigned int INT_SIZE
static const unsigned int INT_ALIGN
static const unsigned int FLOAT_SIZE
static const unsigned int FLOAT_ALIGN
static const unsigned int DOUBLE_SIZE
static const unsigned int DOUBLE_ALIGN
static const unsigned int LONGDOUBLE_SIZE
static const unsigned int LONGDOUBLE_ALIGN
static const unsigned int LONG_SIZE
static const unsigned int LONG_ALIGN
static const unsigned int POINTER_SIZE
static const unsigned int POINTER_ALIGN
static const unsigned int BYTE_LENGTH
static const unsigned int WORD_LENGTH

Private Member Functions

unsigned int base_type () const
void base_type (unsigned int bt)
unsigned int length () const
void length (unsigned int l)
unsigned int sign () const
void sign (unsigned int s)

Private Attributes

unsigned int _base_type:3
unsigned int _length:2
unsigned int _sign:2
unsigned int _parse_only:1

Static Private Attributes

static const unsigned int NO_TYPE
static const unsigned int INT
static const unsigned int CHAR
static const unsigned int FLOAT
static const unsigned int VOID
static const unsigned int ELLIPSIS
static const unsigned int NO_LENGTH
static const unsigned int SHORT
static const unsigned int LONG
static const unsigned int LONGLONG
static const unsigned int NO_SIGN
static const unsigned int SIGNED
static const unsigned int UNSIGNED
static const unsigned int PARSE_ONLY


Constructor & Destructor Documentation

basic_type::basic_type  )  [inline]
 

Definition at line 109 of file basic_type.h.

basic_type::basic_type unsigned int  sign,
unsigned int  length,
unsigned int  base_type,
unsigned int  parse_only = 0
[inline]
 

Definition at line 113 of file basic_type.h.


Member Function Documentation

int basic_type::alignment  ) 
 

string basic_type::base_name  )  const
 

void basic_type::base_type unsigned int  bt  )  [inline, private]
 

Definition at line 99 of file basic_type.h.

References _base_type.

unsigned int basic_type::base_type  )  const [inline, private]
 

Definition at line 98 of file basic_type.h.

References _base_type.

Referenced by operator<(), and operator==().

void basic_type::finish  ) 
 

bool basic_type::is_arithmetic  )  const [inline]
 

Definition at line 197 of file basic_type.h.

References _base_type, CHAR, FLOAT, and INT.

Referenced by primNode::is_arithmetic().

bool basic_type::is_char  )  const [inline]
 

Definition at line 168 of file basic_type.h.

References _base_type, and CHAR.

Referenced by primNode::is_char().

bool basic_type::is_ellipsis  )  const [inline]
 

Definition at line 177 of file basic_type.h.

References _base_type, and ELLIPSIS.

Referenced by primNode::is_ellipsis().

bool basic_type::is_float  )  const [inline]
 

Definition at line 171 of file basic_type.h.

References _base_type, and FLOAT.

Referenced by primNode::is_float().

bool basic_type::is_int  )  const [inline]
 

Definition at line 165 of file basic_type.h.

References _base_type, and INT.

Referenced by primNode::is_int().

bool basic_type::is_integer  )  const [inline]
 

Definition at line 194 of file basic_type.h.

References _base_type, CHAR, and INT.

Referenced by primNode::is_integer().

bool basic_type::is_long  )  const [inline]
 

Definition at line 186 of file basic_type.h.

References _length, and LONG.

bool basic_type::is_longlong  )  const [inline]
 

Definition at line 189 of file basic_type.h.

References _length, and LONGLONG.

bool basic_type::is_no_length  )  const [inline]
 

Definition at line 180 of file basic_type.h.

References _length, and NO_LENGTH.

bool basic_type::is_no_sign  )  const [inline]
 

Definition at line 150 of file basic_type.h.

References _sign, and NO_SIGN.

bool basic_type::is_no_type  )  const [inline]
 

Definition at line 162 of file basic_type.h.

References _base_type, and NO_TYPE.

bool basic_type::is_scalar  )  const [inline]
 

Definition at line 201 of file basic_type.h.

References _base_type, ELLIPSIS, and VOID.

Referenced by primNode::is_scalar().

bool basic_type::is_short  )  const [inline]
 

Definition at line 183 of file basic_type.h.

References _length, and SHORT.

bool basic_type::is_signed  )  const [inline]
 

Definition at line 153 of file basic_type.h.

References _sign, and SIGNED.

bool basic_type::is_unsigned  )  const [inline]
 

Definition at line 156 of file basic_type.h.

References _sign, and UNSIGNED.

bool basic_type::is_void  )  const [inline]
 

Definition at line 174 of file basic_type.h.

References _base_type, and VOID.

Referenced by primNode::is_void().

void basic_type::length unsigned int  l  )  [inline, private]
 

Definition at line 102 of file basic_type.h.

References _length.

unsigned int basic_type::length  )  const [inline, private]
 

Definition at line 101 of file basic_type.h.

References _length.

Referenced by operator<(), and operator==().

string basic_type::length_name  )  const
 

void basic_type::merge_in basic_type other,
Coord  coord = Coord::Unknown
 

bool basic_type::operator!= const basic_type bt2  )  const [inline]
 

Definition at line 129 of file basic_type.h.

References operator==().

bool basic_type::operator< const basic_type bt2  )  const [inline]
 

Definition at line 135 of file basic_type.h.

References base_type(), length(), and sign().

bool basic_type::operator== const basic_type bt2  )  const [inline]
 

Definition at line 123 of file basic_type.h.

References base_type(), length(), and sign().

Referenced by operator!=().

void basic_type::parse_only bool  po  )  [inline]
 

Definition at line 160 of file basic_type.h.

References _parse_only.

bool basic_type::parse_only  )  const [inline]
 

Definition at line 159 of file basic_type.h.

References _parse_only.

void basic_type::set_char  )  [inline]
 

Definition at line 169 of file basic_type.h.

References _base_type, and CHAR.

void basic_type::set_ellipsis  )  [inline]
 

Definition at line 178 of file basic_type.h.

References _base_type, and ELLIPSIS.

void basic_type::set_float  )  [inline]
 

Definition at line 172 of file basic_type.h.

References _base_type, and FLOAT.

void basic_type::set_int  )  [inline]
 

Definition at line 166 of file basic_type.h.

References _base_type, and INT.

void basic_type::set_long  )  [inline]
 

Definition at line 187 of file basic_type.h.

References _length, and LONG.

void basic_type::set_longlong  )  [inline]
 

Definition at line 190 of file basic_type.h.

References _length, and LONGLONG.

void basic_type::set_no_length  )  [inline]
 

Definition at line 181 of file basic_type.h.

References _length, and NO_LENGTH.

void basic_type::set_no_sign  )  [inline]
 

Definition at line 151 of file basic_type.h.

References _sign, and NO_SIGN.

void basic_type::set_no_type  )  [inline]
 

Definition at line 163 of file basic_type.h.

References _base_type, and NO_TYPE.

void basic_type::set_short  )  [inline]
 

Definition at line 184 of file basic_type.h.

References _length, and SHORT.

void basic_type::set_signed  )  [inline]
 

Definition at line 154 of file basic_type.h.

References _sign, and SIGNED.

void basic_type::set_unsigned  )  [inline]
 

Definition at line 157 of file basic_type.h.

References _sign, and UNSIGNED.

void basic_type::set_void  )  [inline]
 

Definition at line 175 of file basic_type.h.

References _base_type, and VOID.

void basic_type::sign unsigned int  s  )  [inline, private]
 

Definition at line 105 of file basic_type.h.

References _sign.

unsigned int basic_type::sign  )  const [inline, private]
 

Definition at line 104 of file basic_type.h.

References _sign.

Referenced by operator<(), and operator==().

string basic_type::sign_name  )  const
 

int basic_type::size  ) 
 

int basic_type::to_num  )  const
 

string basic_type::to_string  )  const
 


Member Data Documentation

unsigned int basic_type::_base_type [private]
 

Definition at line 93 of file basic_type.h.

Referenced by base_type(), is_arithmetic(), is_char(), is_ellipsis(), is_float(), is_int(), is_integer(), is_no_type(), is_scalar(), is_void(), set_char(), set_ellipsis(), set_float(), set_int(), set_no_type(), and set_void().

unsigned int basic_type::_length [private]
 

Definition at line 94 of file basic_type.h.

Referenced by is_long(), is_longlong(), is_no_length(), is_short(), length(), set_long(), set_longlong(), set_no_length(), and set_short().

unsigned int basic_type::_parse_only [private]
 

Definition at line 96 of file basic_type.h.

Referenced by parse_only().

unsigned int basic_type::_sign [private]
 

Definition at line 95 of file basic_type.h.

Referenced by is_no_sign(), is_signed(), is_unsigned(), set_no_sign(), set_signed(), set_unsigned(), and sign().

const unsigned int basic_type::BYTE_LENGTH [static]
 

Definition at line 85 of file basic_type.h.

const basic_type basic_type::Char [static]
 

Definition at line 75 of file basic_type.h.

const unsigned int basic_type::CHAR [static, private]
 

Definition at line 51 of file basic_type.h.

Referenced by is_arithmetic(), is_char(), is_integer(), and set_char().

const unsigned int basic_type::CHAR_ALIGN [static]
 

Definition at line 85 of file basic_type.h.

const unsigned int basic_type::CHAR_SIZE [static]
 

Definition at line 85 of file basic_type.h.

const basic_type basic_type::Double [static]
 

Definition at line 71 of file basic_type.h.

const unsigned int basic_type::DOUBLE_ALIGN [static]
 

Definition at line 85 of file basic_type.h.

const unsigned int basic_type::DOUBLE_SIZE [static]
 

Definition at line 85 of file basic_type.h.

const basic_type basic_type::Ellipsis [static]
 

Definition at line 67 of file basic_type.h.

const unsigned int basic_type::ELLIPSIS [static, private]
 

Definition at line 51 of file basic_type.h.

Referenced by is_ellipsis(), is_scalar(), and set_ellipsis().

const basic_type basic_type::Float [static]
 

Definition at line 71 of file basic_type.h.

const unsigned int basic_type::FLOAT [static, private]
 

Definition at line 51 of file basic_type.h.

Referenced by is_arithmetic(), is_float(), and set_float().

const unsigned int basic_type::FLOAT_ALIGN [static]
 

Definition at line 85 of file basic_type.h.

const unsigned int basic_type::FLOAT_SIZE [static]
 

Definition at line 85 of file basic_type.h.

const basic_type basic_type::Int [static]
 

Definition at line 75 of file basic_type.h.

const unsigned int basic_type::INT [static, private]
 

Definition at line 51 of file basic_type.h.

Referenced by is_arithmetic(), is_int(), is_integer(), and set_int().

const unsigned int basic_type::INT_ALIGN [static]
 

Definition at line 85 of file basic_type.h.

const unsigned int basic_type::INT_SIZE [static]
 

Definition at line 85 of file basic_type.h.

const basic_type basic_type::IntParseOnly [static]
 

Definition at line 78 of file basic_type.h.

const basic_type basic_type::Long [static]
 

Definition at line 77 of file basic_type.h.

const unsigned int basic_type::LONG [static, private]
 

Definition at line 54 of file basic_type.h.

Referenced by is_long(), and set_long().

const unsigned int basic_type::LONG_ALIGN [static]
 

Definition at line 85 of file basic_type.h.

const unsigned int basic_type::LONG_SIZE [static]
 

Definition at line 85 of file basic_type.h.

const basic_type basic_type::LongDouble [static]
 

Definition at line 71 of file basic_type.h.

const unsigned int basic_type::LONGDOUBLE_ALIGN [static]
 

Definition at line 85 of file basic_type.h.

const unsigned int basic_type::LONGDOUBLE_SIZE [static]
 

Definition at line 85 of file basic_type.h.

const basic_type basic_type::LongLong [static]
 

Definition at line 77 of file basic_type.h.

const unsigned int basic_type::LONGLONG [static, private]
 

Definition at line 54 of file basic_type.h.

Referenced by is_longlong(), and set_longlong().

const unsigned int basic_type::NO_LENGTH [static, private]
 

Definition at line 54 of file basic_type.h.

Referenced by is_no_length(), and set_no_length().

const unsigned int basic_type::NO_SIGN [static, private]
 

Definition at line 57 of file basic_type.h.

Referenced by is_no_sign(), and set_no_sign().

const unsigned int basic_type::NO_TYPE [static, private]
 

Definition at line 51 of file basic_type.h.

Referenced by is_no_type(), and set_no_type().

const unsigned int basic_type::PARSE_ONLY [static, private]
 

Definition at line 60 of file basic_type.h.

const unsigned int basic_type::POINTER_ALIGN [static]
 

Definition at line 85 of file basic_type.h.

const unsigned int basic_type::POINTER_SIZE [static]
 

Definition at line 85 of file basic_type.h.

const basic_type basic_type::SChar [static]
 

Definition at line 68 of file basic_type.h.

const basic_type basic_type::Short [static]
 

Definition at line 77 of file basic_type.h.

const unsigned int basic_type::SHORT [static, private]
 

Definition at line 54 of file basic_type.h.

Referenced by is_short(), and set_short().

const unsigned int basic_type::SHORT_ALIGN [static]
 

Definition at line 85 of file basic_type.h.

const unsigned int basic_type::SHORT_SIZE [static]
 

Definition at line 85 of file basic_type.h.

const basic_type basic_type::Signed [static]
 

Definition at line 76 of file basic_type.h.

const unsigned int basic_type::SIGNED [static, private]
 

Definition at line 57 of file basic_type.h.

Referenced by is_signed(), and set_signed().

const basic_type basic_type::SInt [static]
 

Definition at line 69 of file basic_type.h.

const basic_type basic_type::SLong [static]
 

Definition at line 69 of file basic_type.h.

const basic_type basic_type::SLongLong [static]
 

Definition at line 70 of file basic_type.h.

const basic_type basic_type::SShort [static]
 

Definition at line 69 of file basic_type.h.

const unsigned int basic_type::TARGET_MAX_INT [static]
 

Definition at line 82 of file basic_type.h.

const unsigned int basic_type::TARGET_MAX_LONG [static]
 

Definition at line 82 of file basic_type.h.

const unsigned int basic_type::TARGET_MAX_UCHAR [static]
 

Definition at line 82 of file basic_type.h.

const unsigned int basic_type::TARGET_MAX_UINT [static]
 

Definition at line 82 of file basic_type.h.

const unsigned int basic_type::TARGET_MAX_ULONG [static]
 

Definition at line 82 of file basic_type.h.

const basic_type basic_type::UChar [static]
 

Definition at line 68 of file basic_type.h.

const basic_type basic_type::UInt [static]
 

Definition at line 69 of file basic_type.h.

const basic_type basic_type::ULong [static]
 

Definition at line 69 of file basic_type.h.

const basic_type basic_type::ULongLong [static]
 

Definition at line 70 of file basic_type.h.

const basic_type basic_type::Unsigned [static]
 

Definition at line 76 of file basic_type.h.

const unsigned int basic_type::UNSIGNED [static, private]
 

Definition at line 57 of file basic_type.h.

Referenced by is_unsigned(), and set_unsigned().

const basic_type basic_type::UShort [static]
 

Definition at line 69 of file basic_type.h.

const basic_type basic_type::Void [static]
 

Definition at line 66 of file basic_type.h.

const unsigned int basic_type::VOID [static, private]
 

Definition at line 51 of file basic_type.h.

Referenced by is_scalar(), is_void(), and set_void().

const unsigned int basic_type::WORD_LENGTH [static]
 

Definition at line 85 of file basic_type.h.


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

Generated on February 1, 2006
Back to the C-Breeze home page