vrq
Public Member Functions | Protected Attributes
CBlock Class Reference

Declaration class for block constructs. More...

#include <cblock.h>

Inheritance diagram for CBlock:
CDecl CObject CFunction CModule CSpecify

List of all members.

Public Member Functions

 CBlock (CSymbol *name, Coord_t *aLoc)
 Constructor for BLOCK declarations.
 CBlock (CSymbol *name, Coord_t *aLoc, Decl_t dtype)
 Constructor for BLOCK declarations.
virtual ~CBlock ()
 Object destructor.
virtual CDeclClone (CObstack *heap)
 Create a clone of this declaration.
virtual void Add (CInstance *instance)
virtual void Add (CParam *param)
virtual void Add (CNet *net)
virtual void Add (CVar *var)
virtual void Add (CBlock *child)
virtual void Add (CFref *fref)
virtual void Add (CGenvar *genvar)
virtual void Add (CNode *code)
 Add parse tree code to this block.
void SetParent (CBlock *parent)
 Set this block's parent block.
CBlockGetParent (void)
 Get this block's parent block.
virtual void Dump (FILE *f)
 Dump information about block to a file.
vector< CNet * > * GetNetList ()
 Get list of object's nets.
vector< CVar * > * GetVarList ()
 Get list of object's registers.
vector< CParam * > * GetParamList ()
 Get list of object's parameters.
vector< CGenvar * > * GetGenvarList ()
 Get list of object's genvars.
virtual CNodeGetCodeList ()
 Get blocks parse tree.
virtual void SetCodeList (CNode *list)
 Set block's parse tree.
vector< CBlock * > * GetChildList ()
 Get list of block's child blocks.
virtual vector< CPortDir * > * GetPortDirList ()
 Get list of block's port declarations.
virtual void SetSymtab (CSymtab< CDecl > &symtab)
 Set block's symbol table.
virtual CSymtab< CDecl > & GetSymtab ()
 Get block's symbol table.

Protected Attributes

vector< CParam * > paramList
vector< CVar * > varList
vector< CGenvar * > genvarList
vector< CFref * > frefList
vector< CNet * > netList
CBlockparent
vector< CBlock * > children
CSymtab< CDeclsymtab

Detailed Description

Declaration class for block constructs.


Constructor & Destructor Documentation

CBlock::CBlock ( CSymbol name,
Coord_t aLoc 
)

Constructor for BLOCK declarations.

Parameters:
namename of block.
aLocfile coordinates of block.
CBlock::CBlock ( CSymbol name,
Coord_t aLoc,
Decl_t  dtype 
)

Constructor for BLOCK declarations.

Parameters:
namename of block.
aLocfile coordinates of block.
dtypeblock type.
virtual CBlock::~CBlock ( ) [inline, virtual]

Object destructor.


Member Function Documentation

virtual void CBlock::Add ( CInstance instance) [virtual]
Todo:
This routine will eventually be eliminated.

Currently the construct must be added with this routine as well as by adding a node to the code tree.

Add instance to block.

Parameters:
instancepointer to block object

Reimplemented in CModule.

virtual void CBlock::Add ( CParam param) [virtual]
Todo:
This routine will eventually be eliminated.

Currently the construct must be added with this routine as well as by adding a node to the code tree.

Add parameter to block.

Parameters:
parampointer to parameter object

Reimplemented in CModule.

virtual void CBlock::Add ( CNet net) [virtual]
Todo:
This routine will eventually be eliminated.

Currently the construct must be added with this routine as well as by adding a node to the code tree.

Add net to block.

Parameters:
netpointer to net object

Reimplemented in CModule.

virtual void CBlock::Add ( CVar var) [virtual]
Todo:
This routine will eventually be eliminated.

Currently the construct must be added with this routine as well as by adding a node to the code tree.

Add register to block.

Parameters:
varpointer to variable object

Reimplemented in CModule.

virtual void CBlock::Add ( CBlock child) [virtual]
Todo:
This routine will eventually be eliminated.

Currently the construct must be added with this routine as well as by adding a node to the code tree.

Add child block to this block.

Parameters:
childpointer to child block object
virtual void CBlock::Add ( CFref fref) [virtual]
Todo:
This routine will eventually be eliminated.

Currently the construct must be added with this routine as well as by adding a node to the code tree.

Add forward reference to this block.

Parameters:
frefpointer to forward reference object

Reimplemented in CModule.

virtual void CBlock::Add ( CGenvar genvar) [virtual]
Todo:
This routine will eventually be eliminated.

Currently the construct must be added with this routine as well as by adding a node to the code tree.

Add genvar to this block.

Parameters:
genvarpointer to genvar reference object
virtual void CBlock::Add ( CNode code) [virtual]

Add parse tree code to this block.

Parameters:
codepointer to parse tree

Reimplemented in CModule.

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

Create a clone of this declaration.

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

Implements CDecl.

Reimplemented in CModule.

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

Dump information about block to a file.

Parameters:
ffile descriptor to output.

Reimplemented from CDecl.

Reimplemented in CModule, CFunction, and CSpecify.

Get list of block's child blocks.

Returns:
array of child block objects.
virtual CNode* CBlock::GetCodeList ( ) [virtual]

Get blocks parse tree.

Returns:
parse tree.

Get list of object's genvars.

Returns:
array of genvar objects.
vector<CNet*>* CBlock::GetNetList ( )

Get list of object's nets.

Returns:
array of net objects.

Get list of object's parameters.

Returns:
array of parameter objects.

Get this block's parent block.

Returns:
pointer to parent block object.
virtual vector<CPortDir*>* CBlock::GetPortDirList ( ) [inline, virtual]

Get list of block's port declarations.

Returns:
array of port direction objects.

Reimplemented in CModule, and CFunction.

virtual CSymtab<CDecl>& CBlock::GetSymtab ( ) [inline, virtual]

Get block's symbol table.

Returns:
reference to block's symbol table.
vector<CVar*>* CBlock::GetVarList ( )

Get list of object's registers.

Returns:
array of register objects.
virtual void CBlock::SetCodeList ( CNode list) [virtual]

Set block's parse tree.

Parameters:
listblock's parse tree.
void CBlock::SetParent ( CBlock parent)

Set this block's parent block.

Parameters:
parentpointer to parent block object.
virtual void CBlock::SetSymtab ( CSymtab< CDecl > &  symtab) [virtual]

Set block's symbol table.

Parameters:
symtabreference to new symbol table.

Member Data Documentation

vector<CBlock*> CBlock::children [protected]
vector<CFref*> CBlock::frefList [protected]
vector<CGenvar*> CBlock::genvarList [protected]
vector<CNet*> CBlock::netList [protected]
vector<CParam*> CBlock::paramList [protected]
CBlock* CBlock::parent [protected]
vector<CVar*> CBlock::varList [protected]

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