![]() |
|
class for describing simple builtin data types More...
#include <csimpletype.h>
Public Member Functions | |
| CSimpleType (VarDataType_t vt) | |
| Create data type instance. | |
| CSimpleType (VarDataType_t vt, list< CNode * > &rangeList) | |
| Create data type instance. | |
| virtual CDataType * | Clone (CObstack *heap) |
| Create a new copy with a deep copy. | |
| virtual int | GetSignedAttr () const |
| Get declaration's signed attribute. | |
| virtual int | GetUnsignedAttr () const |
| Get declaration's unsigned attribute. | |
| virtual void | SetSignedAttr (int v) |
| Set declaration's signed attribute. | |
| virtual void | SetUnsignedAttr (int v) |
| Set declaration's unsigned attribute. | |
| virtual int | GetSigned () const |
| Get declartion's signed property. | |
| virtual int | GetTwoState () const |
| Get declaration's 2 state property. | |
| virtual NodeType_t | GetNodeType (void) const |
| Get data type. | |
| virtual int | IsBaseWidthConstant (void) const |
| Determine if base width (sans packed dimensions) of declaration is constant, ie dependent upon only constants and parameters. | |
| virtual int | IsBaseWidthVolatile (void) const |
| Determine if base width (sans packed dimensions) of declaration is volatile, ie depend upon parameters or variables. | |
| virtual int | IsBaseWidthEvaluateable (void) const |
| Determine if base width (sans packed dimensions) of declaration can be evaluated. | |
| virtual INT32 | GetBaseWidth (void) const |
| Evaluate base width (sans packed dimensions) of declaration. | |
| virtual CNode * | GetBaseWidthExp () const |
| Get expression for datatype's base width (sans packed dimensions). | |
| virtual int | IsVector () const |
| Determine if complete data structure is a vector. | |
| virtual int | IsPacked () const |
| Determine if complete data structure is packed. | |
| virtual CNode * | GetPackedMsb () const |
| Get expression for declaration's msb. | |
| virtual CNode * | GetPackedLsb () const |
| Get expression for declaration's lsb. | |
| virtual CNode * | GetPackedRange () const |
| Get expression for datatype's overall packed or vector range (msb/lsb). | |
| virtual INT32 | GetPackedWidth (void) const |
| Evaluate packed or vector width of declaration. | |
| virtual CNode * | GetPackedWidthExp () const |
| Get expression for datatype's overall packed or vetor width. | |
| virtual int | PackedWidthDirection (void) const |
| Evaluate current decl width direction. | |
| virtual INT32 | GetNumberOfPackedDimensions (void) const |
| Get number of packed dimensions of declaration. | |
| virtual CNode * | GetPackedMsi (INT32 dim) const |
| Get expression tree for upper limit of given packed array dimension. | |
| virtual CNode * | GetPackedLsi (INT32 dim) const |
| Get expression tree for lower limit of packed array dimension. | |
| virtual CNode * | GetPackedRange (INT32 dim) const |
| Get expression for range of packed array for dimension. | |
| virtual void | Dump (FILE *f) const |
| Dump data type info to file descriptor. | |
Protected Member Functions | |
| void | Copy (CObstack *heap, const CSimpleType &o) |
| Perform deep copy of given object to this one This should never be call directly, only by subclasses. | |
| int | GetVectorWidth () const |
| Get width of vector. | |
class for describing simple builtin data types
| CSimpleType::CSimpleType | ( | VarDataType_t | vt | ) |
Create data type instance.
| vt | variable simple data type |
| CSimpleType::CSimpleType | ( | VarDataType_t | vt, | |
| list< CNode * > & | rangeList | |||
| ) |
Create data type instance.
| vt | variable simple data type | |
| rangeList | vector of packed ranges for declaration. |
Create a new copy with a deep copy.
| heap | heap to use for allocation. |
Implements CDataType.
| void CSimpleType::Copy | ( | CObstack * | heap, | |
| const CSimpleType & | o | |||
| ) | [protected] |
Perform deep copy of given object to this one This should never be call directly, only by subclasses.
| heap | heap to use for allocation. | |
| o | declaration to copy. |
| virtual void CSimpleType::Dump | ( | FILE * | f | ) | const [virtual] |
| virtual INT32 CSimpleType::GetBaseWidth | ( | void | ) | const [virtual] |
Evaluate base width (sans packed dimensions) of declaration.
Implements CDataType.
| virtual CNode* CSimpleType::GetBaseWidthExp | ( | ) | const [virtual] |
Get expression for datatype's base width (sans packed dimensions).
Implements CDataType.
| virtual NodeType_t CSimpleType::GetNodeType | ( | void | ) | const [virtual] |
| virtual INT32 CSimpleType::GetNumberOfPackedDimensions | ( | void | ) | const [virtual] |
Get number of packed dimensions of declaration.
Reimplemented from CDataType.
| virtual CNode* CSimpleType::GetPackedLsb | ( | ) | const [virtual] |
Get expression for declaration's lsb.
Valid only for Packed and Vector declarations.
Reimplemented from CDataType.
Get expression tree for lower limit of packed array dimension.
| dim | dimension. |
Reimplemented from CDataType.
| virtual CNode* CSimpleType::GetPackedMsb | ( | ) | const [virtual] |
Get expression for declaration's msb.
Valid only for Packed and Vector declarations.
Reimplemented from CDataType.
Get expression tree for upper limit of given packed array dimension.
| dim | dimension. |
Reimplemented from CDataType.
| virtual CNode* CSimpleType::GetPackedRange | ( | ) | const [virtual] |
Get expression for datatype's overall packed or vector range (msb/lsb).
Reimplemented from CDataType.
Get expression for range of packed array for dimension.
| dim | dimension to get. |
Reimplemented from CDataType.
| virtual INT32 CSimpleType::GetPackedWidth | ( | void | ) | const [virtual] |
Evaluate packed or vector width of declaration.
Reimplemented from CDataType.
| virtual CNode* CSimpleType::GetPackedWidthExp | ( | ) | const [virtual] |
Get expression for datatype's overall packed or vetor width.
Reimplemented from CDataType.
| virtual int CSimpleType::GetSigned | ( | ) | const [virtual] |
| virtual int CSimpleType::GetSignedAttr | ( | ) | const [inline, virtual] |
Get declaration's signed attribute.
| virtual int CSimpleType::GetTwoState | ( | ) | const [virtual] |
| virtual int CSimpleType::GetUnsignedAttr | ( | ) | const [inline, virtual] |
Get declaration's unsigned attribute.
| int CSimpleType::GetVectorWidth | ( | ) | const [protected] |
Get width of vector.
Only valid for vector types
| virtual int CSimpleType::IsBaseWidthConstant | ( | void | ) | const [inline, virtual] |
Determine if base width (sans packed dimensions) of declaration is constant, ie dependent upon only constants and parameters.
Implements CDataType.
| virtual int CSimpleType::IsBaseWidthEvaluateable | ( | void | ) | const [inline, virtual] |
Determine if base width (sans packed dimensions) of declaration can be evaluated.
Implements CDataType.
| virtual int CSimpleType::IsBaseWidthVolatile | ( | void | ) | const [inline, virtual] |
Determine if base width (sans packed dimensions) of declaration is volatile, ie depend upon parameters or variables.
Implements CDataType.
| virtual int CSimpleType::IsPacked | ( | ) | const [virtual] |
Determine if complete data structure is packed.
Packed data structures can be treated as a single vector.
Implements CDataType.
| virtual int CSimpleType::IsVector | ( | ) | const [virtual] |
Determine if complete data structure is a vector.
Vectors are a multi-bit intergal type.
Implements CDataType.
| virtual int CSimpleType::PackedWidthDirection | ( | void | ) | const [virtual] |
Evaluate current decl width direction.
Expression must be constant.
Reimplemented from CDataType.
| virtual void CSimpleType::SetSignedAttr | ( | int | v | ) | [inline, virtual] |
Set declaration's signed attribute.
| v | value of signed attribute. |
| virtual void CSimpleType::SetUnsignedAttr | ( | int | v | ) | [inline, virtual] |
Set declaration's unsigned attribute.
| v | value of unsigned attribute. |
1.7.1