C-Breeze
C Compiler Infrastructure

[ Project home page]

constant Class Reference

#include <constant.h>

List of all members.

Public Member Functions

const basic_typebasic () const
 constant (signed char SChar)
signed char SChar () const
void SChar (signed char val)
 constant (unsigned char UChar)
unsigned char UChar () const
void UChar (unsigned char val)
 constant (signed short int SShort)
signed short int SShort () const
void SShort (signed short int val)
 constant (unsigned short int UShort)
unsigned short int UShort () const
void UShort (unsigned short int val)
 constant (signed int SInt)
signed int SInt () const
void SInt (signed int val)
 constant (unsigned int UInt)
unsigned int UInt () const
void UInt (unsigned int val)
 constant (signed long int SLong)
signed long int SLong () const
void SLong (signed long int val)
 constant (unsigned long int ULong)
unsigned long int ULong () const
void ULong (unsigned long int val)
 constant (float Float)
float Float () const
void Float (float val)
 constant (double Double)
double Double () const
void Double (double val)
 constant (const char *Str)
char * Str () const
bool is_str () const
 constant (void *Ptr)
void * Ptr () const
bool is_ptr () const
 constant ()
bool no_val () const
void set_no_val ()
 constant (const constant &other)
 ~constant ()
constantoperator= (const constant &rhs)
unsigned long Integer () const
bool Boolean () const
bool is_zero () const
void make_zero ()
bool is_equal_to (const constant &other) const
bool operator< (const constant &other) const
string to_string (bool wantQuoteChar=true) const

Static Public Member Functions

static constant eval (const Operator *op, const constant &operand1, const constant &operand2)
static constant eval (const Operator *op, const constant &operand)
static constant cast (const basic_type &new_bt, const constant &con)

Static Private Member Functions

static void print_char (int value, ostringstream &ost)

Private Attributes

union {
   signed char   SChar
   unsigned char   UChar
   signed short int   SShort
   unsigned short int   UShort
   signed int   SInt
   unsigned int   UInt
   signed long int   SLong
   unsigned long int   ULong
   float   Float
   double   Double
   char *   Str
   void *   Ptr
_v
basic_type _bt
bool _is_ptr
bool _is_str
bool _no_val


Constructor & Destructor Documentation

constant::constant signed char  SChar  )  [inline]
 

Definition at line 73 of file constant.h.

References _v.

constant::constant unsigned char  UChar  )  [inline]
 

Definition at line 80 of file constant.h.

References _v.

constant::constant signed short int  SShort  )  [inline]
 

Definition at line 87 of file constant.h.

References _v.

constant::constant unsigned short int  UShort  )  [inline]
 

Definition at line 94 of file constant.h.

References _v.

constant::constant signed int  SInt  )  [inline]
 

Definition at line 101 of file constant.h.

References _v.

constant::constant unsigned int  UInt  )  [inline]
 

Definition at line 108 of file constant.h.

References _v.

constant::constant signed long int  SLong  )  [inline]
 

Definition at line 115 of file constant.h.

References _v.

constant::constant unsigned long int  ULong  )  [inline]
 

Definition at line 122 of file constant.h.

References _v.

constant::constant float  Float  )  [inline]
 

Definition at line 129 of file constant.h.

References _v.

constant::constant double  Double  )  [inline]
 

Definition at line 136 of file constant.h.

References _v.

constant::constant const char *  Str  )  [inline]
 

Definition at line 143 of file constant.h.

References _v.

constant::constant void *  Ptr  )  [inline]
 

Definition at line 150 of file constant.h.

References _v.

constant::constant  )  [inline]
 

Definition at line 157 of file constant.h.

Referenced by Double(), Float(), SChar(), SInt(), SLong(), SShort(), UChar(), UInt(), ULong(), and UShort().

constant::constant const constant other  ) 
 

constant::~constant  ) 
 


Member Function Documentation

const basic_type& constant::basic  )  const [inline]
 

Definition at line 71 of file constant.h.

References _bt.

bool constant::Boolean  )  const
 

static constant constant::cast const basic_type new_bt,
const constant con
[static]
 

void constant::Double double  val  )  [inline]
 

Definition at line 141 of file constant.h.

References constant().

double constant::Double  )  const [inline]
 

Definition at line 140 of file constant.h.

References _v.

static constant constant::eval const Operator op,
const constant operand
[static]
 

static constant constant::eval const Operator op,
const constant operand1,
const constant operand2
[static]
 

void constant::Float float  val  )  [inline]
 

Definition at line 134 of file constant.h.

References constant().

float constant::Float  )  const [inline]
 

Definition at line 133 of file constant.h.

References _v.

unsigned long constant::Integer  )  const
 

bool constant::is_equal_to const constant other  )  const
 

bool constant::is_ptr  )  const [inline]
 

Definition at line 155 of file constant.h.

References _is_ptr.

bool constant::is_str  )  const [inline]
 

Definition at line 148 of file constant.h.

References _is_str.

bool constant::is_zero  )  const
 

void constant::make_zero  ) 
 

bool constant::no_val  )  const [inline]
 

Definition at line 161 of file constant.h.

References _no_val.

bool constant::operator< const constant other  )  const
 

constant& constant::operator= const constant rhs  ) 
 

static void constant::print_char int  value,
ostringstream &  ost
[static, private]
 

void* constant::Ptr  )  const [inline]
 

Definition at line 154 of file constant.h.

References _v.

void constant::SChar signed char  val  )  [inline]
 

Definition at line 78 of file constant.h.

References constant().

signed char constant::SChar  )  const [inline]
 

Definition at line 77 of file constant.h.

References _v.

void constant::set_no_val  )  [inline]
 

Definition at line 162 of file constant.h.

References _no_val.

void constant::SInt signed int  val  )  [inline]
 

Definition at line 106 of file constant.h.

References constant().

signed int constant::SInt  )  const [inline]
 

Definition at line 105 of file constant.h.

References _v.

void constant::SLong signed long int  val  )  [inline]
 

Definition at line 120 of file constant.h.

References constant().

signed long int constant::SLong  )  const [inline]
 

Definition at line 119 of file constant.h.

References _v.

void constant::SShort signed short int  val  )  [inline]
 

Definition at line 92 of file constant.h.

References constant().

signed short int constant::SShort  )  const [inline]
 

Definition at line 91 of file constant.h.

References _v.

char* constant::Str  )  const [inline]
 

Definition at line 147 of file constant.h.

References _v.

string constant::to_string bool  wantQuoteChar = true  )  const
 

Referenced by constantAnalyzer::print(), and constantAnalyzer::to_string().

void constant::UChar unsigned char  val  )  [inline]
 

Definition at line 85 of file constant.h.

References constant().

unsigned char constant::UChar  )  const [inline]
 

Definition at line 84 of file constant.h.

References _v.

void constant::UInt unsigned int  val  )  [inline]
 

Definition at line 113 of file constant.h.

References constant().

unsigned int constant::UInt  )  const [inline]
 

Definition at line 112 of file constant.h.

References _v.

void constant::ULong unsigned long int  val  )  [inline]
 

Definition at line 127 of file constant.h.

References constant().

unsigned long int constant::ULong  )  const [inline]
 

Definition at line 126 of file constant.h.

References _v.

void constant::UShort unsigned short int  val  )  [inline]
 

Definition at line 99 of file constant.h.

References constant().

unsigned short int constant::UShort  )  const [inline]
 

Definition at line 98 of file constant.h.

References _v.


Member Data Documentation

basic_type constant::_bt [private]
 

Definition at line 64 of file constant.h.

Referenced by basic().

bool constant::_is_ptr [private]
 

Definition at line 65 of file constant.h.

Referenced by is_ptr().

bool constant::_is_str [private]
 

Definition at line 66 of file constant.h.

Referenced by is_str().

bool constant::_no_val [private]
 

Definition at line 67 of file constant.h.

Referenced by no_val(), and set_no_val().

union { ... } constant::_v [private]
 

Referenced by constant(), Double(), Float(), Ptr(), SChar(), SInt(), SLong(), SShort(), Str(), UChar(), UInt(), ULong(), and UShort().

double constant::Double [private]
 

Definition at line 58 of file constant.h.

float constant::Float [private]
 

Definition at line 57 of file constant.h.

void* constant::Ptr [private]
 

Definition at line 61 of file constant.h.

signed char constant::SChar [private]
 

Definition at line 49 of file constant.h.

signed int constant::SInt [private]
 

Definition at line 53 of file constant.h.

signed long int constant::SLong [private]
 

Definition at line 55 of file constant.h.

signed short int constant::SShort [private]
 

Definition at line 51 of file constant.h.

char* constant::Str [private]
 

Definition at line 60 of file constant.h.

unsigned char constant::UChar [private]
 

Definition at line 50 of file constant.h.

unsigned int constant::UInt [private]
 

Definition at line 54 of file constant.h.

unsigned long int constant::ULong [private]
 

Definition at line 56 of file constant.h.

unsigned short int constant::UShort [private]
 

Definition at line 52 of file constant.h.


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

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