vrq
Classes | Public Member Functions

CAttr Class Reference

Declaration object for holding lists of verilog attributes and their corresponding expressions. More...

#include <cattr.h>

Inheritance diagram for CAttr:
CDecl CObject

List of all members.

Classes

struct  Entry

Public Member Functions

 CAttr (Coord_t *aLoc)
 Create a attribute object.
virtual CDeclClone (CObstack *heap)
 Create a clone of this declaration.
void AddAttribute (const char *name, CNode *aExp)
 Add an attribute to list.
int GetAttributeCount ()
 Get the number of attributes in list.
const char * GetAttributeName (int index)
 Get an attribute by index.
CNodeGetAttributeExpression (int index)
 Get expression for attribute by index.
CNodeGetAttributeExpression (const char *name)
 Get expression for attribute by name.
int HasAttribute (const char *name)
 Check if attribute is in list.
virtual void Dump (FILE *f)
 Dump attributes to file.

Detailed Description

Declaration object for holding lists of verilog attributes and their corresponding expressions.


Constructor & Destructor Documentation

CAttr::CAttr ( Coord_t aLoc  ) 

Create a attribute object.


Member Function Documentation

void CAttr::AddAttribute ( const char *  name,
CNode aExp 
) [inline]

Add an attribute to list.

Parameters:
name attribute name.
aExp attribute expression.
virtual CDecl* CAttr::Clone ( CObstack heap  )  [virtual]

Create a clone of this declaration.

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

Implements CDecl.

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

Dump attributes to file.

Parameters:
f file descriptor.

Reimplemented from CDecl.

int CAttr::GetAttributeCount (  )  [inline]

Get the number of attributes in list.

Returns:
number of attributes in list.
CNode* CAttr::GetAttributeExpression ( int  index  )  [inline]

Get expression for attribute by index.

Parameters:
index index of attribute.
Returns:
attribute expression.
CNode* CAttr::GetAttributeExpression ( const char *  name  ) 

Get expression for attribute by name.

Parameters:
name name of attribute.
Returns:
attribute expression. NULL if not present.
const char* CAttr::GetAttributeName ( int  index  )  [inline]

Get an attribute by index.

Parameters:
index index of attribute (0 based).
Returns:
attribute name.
int CAttr::HasAttribute ( const char *  name  ) 

Check if attribute is in list.

Parameters:
name name of attribute.
Returns:
non-zero if attribute is in list.

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