vrq

CFref Class Reference

Forward reference declaration. More...

#include <cfref.h>

Inheritance diagram for CFref:
CDecl CObject

List of all members.

Public Member Functions

 CFref (CSymbol *symbol, Coord_t *aLoc)
 Create a forward reference.
virtual CDeclClone (CObstack *heap)
 Create a clone of this declaration.
void SetDecl (CDecl *aDecl)
 Set forward declaration's actual declaration.
CDeclGetDecl (void)
 Get forward reference's actual declaration.
void SetRangeInfo (int isArray, CNode *range)
 Set range info for declaration.
CNodeGetMsb (void)
 Get msb of vector range.
CNodeGetLsb (void)
 Get lsb of vector range.
virtual CNodeGetRange ()
 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 (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.

Detailed Description

Forward reference declaration.

This class should only be used by the parser and should never appear in or be created by plugins.


Constructor & Destructor Documentation

CFref::CFref ( CSymbol symbol,
Coord_t aLoc 
)

Create a forward reference.

Parameters:
symbol declarations symbol.
aLoc file coordinates.

Member Function Documentation

virtual CDecl* CFref::Clone ( CObstack heap  )  [inline, virtual]

Create a clone of this declaration.

Parameters:
heap heap to use for allocation.
Returns:
new declaration.

Implements CDecl.

void CFref::ConstrainTypes ( list< Decl_t > &  aTypes  )  [inline]

Add a constraint on valid types for this declaration.

Note eNONE must always be in type list.

Parameters:
aTypes list of valid types (must incude eNONE).
void CFref::Direction ( Decl_t  d  )  [inline]

Set direction of declaration.

Parameters:
d direction type.
Decl_t CFref::Direction (  )  [inline]

Get direction of declaration.

Returns:
d direction type.
virtual void CFref::Dump ( FILE *  f  )  [virtual]

Dump declaration info to file descriptor.

Parameters:
f file descriptor.

Reimplemented from CDecl.

CDecl* CFref::GetDecl ( void   ) 

Get forward reference's actual declaration.

Returns:
actual declaration, NULL if not assigned.
CNode* CFref::GetLsb ( void   )  [virtual]

Get lsb of vector range.

Returns:
lsb expression, NULL if scalar.

Reimplemented from CDecl.

CNode* CFref::GetMsb ( void   )  [virtual]

Get msb of vector range.

Returns:
msb expression, NULL if scalar.

Reimplemented from CDecl.

virtual CNode* CFref::GetRange (  )  [virtual]

Get expression for declaration's range (msb/lsb).

Returns:
range expression, NULL if scalar.
int CFref::IndicesRangeValid (  ) 

Determine if range can be inferred.

Returns:
non-zero if range can be inferred.
int CFref::IsArray (  )  [inline]

Get array flag.

Returns:
non-zero if decl is an array.
void CFref::IsArray ( int  v  )  [inline]

Set array flag.

Parameters:
v non-zero if decl is an array.
int CFref::IsTypeValid ( Decl_t  t  )  [inline]

Test if a give declaration type is valid for this reference.

Parameters:
t declaration type to test for.
Returns:
non-zero if type is compatable with constraints.
int CFref::Lval (  )  [inline]

Get lval flag.

Returns:
non-zero if decl has been used as an lval.
void CFref::Lval ( int  aLval  )  [inline]

Set lval flag.

Parameters:
aLval non-zero means decl has been used as an lval.
void CFref::SetDecl ( CDecl aDecl  ) 

Set forward declaration's actual declaration.

Parameters:
aDecl actual declaration for forward reference.
void CFref::SetRangeInfo ( int  isArray,
CNode range 
)

Set range info for declaration.

Parameters:
isArray non-zero if declaration is an array.
range vector range expression.

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

Generated on 3 Apr 2010 for vrq by  doxygen 1.6.1