ACT Library
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Private Attributes | List of all members
ActBody Class Reference

This class is used to hold the contents of the body of any user-defined type or namespace. This is the data structure created during parsing, and stored in the unexpanded versions of namespaces and user-defined types. More...

#include <body.h>

Inheritance diagram for ActBody:
ActBody_Assertion ActBody_Attribute ActBody_Conn ActBody_Genloop ActBody_Inst ActBody_Lang ActBody_Loop ActBody_Namespace ActBody_OverrideAssertion ActBody_Print ActBody_Select

Public Member Functions

 ActBody (int line)
 
virtual ~ActBody ()
 
void Append (ActBody *b)
 
void insertNext (ActBody *b)
 
ActBodyTail ()
 
ActBodyNext ()
 
virtual ActBodyClone ()
 
virtual void Expand (ActNamespace *, Scope *)
 
void Expandlist (ActNamespace *, Scope *)
 
virtual void Print (FILE *)
 
void updateInstType (list_t *namelist, InstType *it)
 
int getLine ()
 

Protected Attributes

int _line
 saved away line number information
 

Private Attributes

ActBodynext
 next pointer for linked list of body items
 

Detailed Description

This class is used to hold the contents of the body of any user-defined type or namespace. This is the data structure created during parsing, and stored in the unexpanded versions of namespaces and user-defined types.

This data structure corresponds to a list of items in the body of a namespace or user-defined type. This is never used directly, but rather used as the base class for all the different types of body items defined. The common functionality across all ActBody derived classes is implemented here.

Constructor & Destructor Documentation

◆ ActBody()

ActBody::ActBody ( int  line)
Parameters
lineis the line number corresponding to this ActBody item

◆ ~ActBody()

virtual ActBody::~ActBody ( )
virtual

Member Function Documentation

◆ Append()

void ActBody::Append ( ActBody b)

Append a new ActBody to the end of the list of items

Parameters
bis the ActBody to be appended

◆ Clone()

virtual ActBody * ActBody::Clone ( )
inlinevirtual

◆ Expand()

virtual void ActBody::Expand ( ActNamespace ,
Scope  
)
inlinevirtual

Expand out the current body item, updating the necessary data structures as the expansion process proceeds.

Reimplemented in ActBody_Inst, ActBody_Attribute, ActBody_Conn, ActBody_Loop, ActBody_Select, ActBody_Genloop, ActBody_Assertion, ActBody_OverrideAssertion, ActBody_Print, ActBody_Namespace, and ActBody_Lang.

◆ Expandlist()

void ActBody::Expandlist ( ActNamespace ,
Scope  
)

Traverse the body item list, expanding each element of the list

◆ getLine()

int ActBody::getLine ( )
inline
Returns
the saved away line number associated with a body

◆ insertNext()

void ActBody::insertNext ( ActBody b)

Insert b right after the current body element in the list of elements

Parameters
bis the list of items to be inserted into the current body

◆ Next()

ActBody * ActBody::Next ( )
inline
Returns
the next element in the body item list

◆ Print()

virtual void ActBody::Print ( FILE *  )
inlinevirtual

Print the body item list to the specified file

Reimplemented in ActBody_Inst, ActBody_Conn, ActBody_Loop, and ActBody_Lang.

◆ Tail()

ActBody * ActBody::Tail ( )

This returns the last element in the body list

Returns
the last element of the list.

◆ updateInstType()

void ActBody::updateInstType ( list_t *  namelist,
InstType it 
)

Look through for the specified list of names, and update their instance type to the new one specified. This is used to support overrides.

Parameters
namelistis a list of names (char * list)
itis the updated instance type for the specified identifiers

Member Data Documentation

◆ _line

int ActBody::_line
protected

saved away line number information

◆ next

ActBody* ActBody::next
private

next pointer for linked list of body items


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