![]() |
![]() |
Forward reference declaration. More...
#include <cfref.h>
Public Member Functions | |
CFref (CSymbol *symbol, Coord_t *aLoc) | |
Create a forward reference. | |
virtual CDecl * | Clone (CObstack *heap) |
Create a clone of this declaration. | |
void | SetDecl (CDecl *aDecl) |
Set forward declaration's actual declaration. | |
CDecl * | GetDecl (void) |
Get forward reference's actual declaration. | |
void | SetRangeInfo (int isArray, CNode *range) |
Set range info for declaration. | |
CNode * | GetMsb (void) |
Get msb of vector range. | |
CNode * | GetLsb (void) |
Get lsb of vector range. | |
void | DisableWidthInferencing () |
Disable width inferencing. | |
virtual int | IsWidthConstant (void) |
Determine if packed width of declaration is constant, ie dependent upon only constants and parameters. | |
virtual int | IsWidthVolatile (void) |
Determine if packed width of declaration is volatile, ie depend upon parameters or variables. | |
virtual int | IsWidthEvaluateable (void) |
Determine if packed width of declaration can be evaluated. | |
virtual INT32 | GetWidth (void) |
Evaluate packed width of declaration. | |
virtual CNode * | GetRange () |
Get expression for declaration's range (msb/lsb) | |
Decl_t | Direction () |
Get direction of declaration. | |
void | Direction (Decl_t d) |
Set direction of declaration. | |
void | Lval (int aLval) |
Set lval flag. | |
int | Lval () |
Get lval flag. | |
void | IsArray (int v) |
Set array flag. | |
int | IsArray () |
Get array flag. | |
int | IndicesRangeValid () |
Determine if range can be inferred. | |
void | ConstrainTypes (const list< Decl_t > &aTypes) |
Add a constraint on valid types for this declaration. | |
int | IsTypeValid (Decl_t t) |
Test if a give declaration type is valid for this reference. | |
virtual void | Dump (FILE *f) |
Dump declaration info to file descriptor. |
Forward reference declaration.
This class should only be used by the parser and should never appear in or be created by plugins.
CFref::CFref | ( | CSymbol * | symbol, |
Coord_t * | aLoc | ||
) |
Create a forward reference.
symbol | declarations symbol. |
aLoc | file coordinates. |
virtual CDecl* CFref::Clone | ( | CObstack * | heap | ) | [inline, virtual] |
Create a clone of this declaration.
heap | heap to use for allocation. |
Implements CDecl.
void CFref::ConstrainTypes | ( | const list< Decl_t > & | aTypes | ) | [inline] |
Add a constraint on valid types for this declaration.
Note eNONE must always be in type list.
aTypes | list of valid types (must incude eNONE). |
Decl_t CFref::Direction | ( | ) | [inline] |
Get direction of declaration.
void CFref::Direction | ( | Decl_t | d | ) | [inline] |
Set direction of declaration.
d | direction type. |
void CFref::DisableWidthInferencing | ( | ) | [inline] |
Disable width inferencing.
virtual void CFref::Dump | ( | FILE * | f | ) | [virtual] |
CDecl* CFref::GetDecl | ( | void | ) |
Get forward reference's actual declaration.
CNode* CFref::GetLsb | ( | void | ) | [virtual] |
CNode* CFref::GetMsb | ( | void | ) | [virtual] |
virtual CNode* CFref::GetRange | ( | ) | [virtual] |
Get expression for declaration's range (msb/lsb)
virtual INT32 CFref::GetWidth | ( | void | ) | [virtual] |
Evaluate packed width of declaration.
int CFref::IndicesRangeValid | ( | ) |
Determine if range can be inferred.
void CFref::IsArray | ( | int | v | ) | [inline] |
Set array flag.
v | non-zero if decl is an array. |
int CFref::IsArray | ( | ) | [inline] |
Get array flag.
int CFref::IsTypeValid | ( | Decl_t | t | ) | [inline] |
Test if a give declaration type is valid for this reference.
t | declaration type to test for. |
virtual int CFref::IsWidthConstant | ( | void | ) | [virtual] |
Determine if packed width of declaration is constant, ie dependent upon only constants and parameters.
virtual int CFref::IsWidthEvaluateable | ( | void | ) | [virtual] |
Determine if packed width of declaration can be evaluated.
virtual int CFref::IsWidthVolatile | ( | void | ) | [virtual] |
Determine if packed width of declaration is volatile, ie depend upon parameters or variables.
void CFref::Lval | ( | int | aLval | ) | [inline] |
Set lval flag.
aLval | non-zero means decl has been used as an lval. |
int CFref::Lval | ( | ) | [inline] |
Get lval flag.
void CFref::SetDecl | ( | CDecl * | aDecl | ) |
Set forward declaration's actual declaration.
aDecl | actual declaration for forward reference. |
void CFref::SetRangeInfo | ( | int | isArray, |
CNode * | range | ||
) |
Set range info for declaration.
isArray | non-zero if declaration is an array. |
range | vector range expression. |