vrq
Public Member Functions

CParam Class Reference

Declaration object for parameters. More...

#include <cparam.h>

Inheritance diagram for CParam:
CDecl CObject

List of all members.

Public Member Functions

 CParam (CSymbol *symbol, Coord_t *aLoc, Decl_t type, CDataType *dataType)
 Create parameter declaration.
virtual CDeclClone (CObstack *heap)
 Create a clone of this declaration.
void Specify (int v)
 Set specify attribute.
int Specify (void)
 Get specify attribute.
void SetExpression (CNode *aExp)
 Set expression assigned to parameter.
CNodeGetExpression (void)
 Get expression assigned to parameter.
virtual NodeType_t GetNodeType (void)
 Get node expression type.
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 CNodeGetWidthExp (void)
 Get expression representing width of declaration.
virtual CNodeGetMsb ()
 Get expression for declaration's msb.
virtual CNodeGetLsb ()
 Get expression for declaration's lsb.
virtual void Dump (FILE *f)
 Dump parameter declaration info to file descriptor.
void SetInlined (int v)
 Set inlined attribute.
int GetInlined ()
 Get inlined attribute.

Detailed Description

Declaration object for parameters.


Constructor & Destructor Documentation

CParam::CParam ( CSymbol symbol,
Coord_t aLoc,
Decl_t  type,
CDataType dataType 
)

Create parameter declaration.

Parameters:
symbol name of declaration.
aLoc file coordinates.
type declaration type: eLOCALPARAM, ePARAM.
dataType parameter data type

Member Function Documentation

virtual CDecl* CParam::Clone ( CObstack heap  )  [virtual]

Create a clone of this declaration.

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

Implements CDecl.

virtual void CParam::Dump ( FILE *  f  )  [virtual]

Dump parameter declaration info to file descriptor.

Parameters:
f file descriptor.

Reimplemented from CDecl.

CNode* CParam::GetExpression ( void   ) 

Get expression assigned to parameter.

Returns:
expression assigned to parameter.
int CParam::GetInlined (  )  [inline]

Get inlined attribute.

Returns:
v non-zero if parameter declaration was inlined in module definition.
virtual CNode* CParam::GetLsb (  )  [virtual]

Get expression for declaration's lsb.

Returns:
lsb expression, NULL if scalar.

Reimplemented from CDecl.

virtual CNode* CParam::GetMsb (  )  [virtual]

Get expression for declaration's msb.

Returns:
msb expression, NULL if scalar.

Reimplemented from CDecl.

virtual NodeType_t CParam::GetNodeType ( void   )  [virtual]

Get node expression type.

Returns:
expression type.

Reimplemented from CDecl.

virtual INT32 CParam::GetWidth ( void   )  [virtual]

Evaluate packed width of declaration.

Returns:
packed width of declaration.
virtual CNode* CParam::GetWidthExp ( void   )  [virtual]

Get expression representing width of declaration.

Returns:
expression representing width of declaration.
virtual int CParam::IsWidthConstant ( void   )  [virtual]

Determine if packed width of declaration is constant, ie dependent upon only constants and parameters.

Returns:
non-zero of packed width of declaration is constant.
virtual int CParam::IsWidthEvaluateable ( void   )  [virtual]

Determine if packed width of declaration can be evaluated.

Returns:
non-zero of packed width of declaration can be evaluated.
virtual int CParam::IsWidthVolatile ( void   )  [virtual]

Determine if packed width of declaration is volatile, ie depend upon parameters or variables.

Returns:
non-zero of packed width of declaration is volatile.
void CParam::SetExpression ( CNode aExp  ) 

Set expression assigned to parameter.

Parameters:
aExp value expression.
void CParam::SetInlined ( int  v  )  [inline]

Set inlined attribute.

Parameters:
v non-zero if parameter declaration was inlined in module definition.
void CParam::Specify ( int  v  )  [inline]

Set specify attribute.

Parameters:
v non-zero if declaration is a specparam.
int CParam::Specify ( void   )  [inline]

Get specify attribute.

Returns:
non-zero if declaration is a specparam.

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