ACT Library
|
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>
Public Member Functions | |
ActBody (int line) | |
virtual | ~ActBody () |
void | Append (ActBody *b) |
void | insertNext (ActBody *b) |
ActBody * | Tail () |
ActBody * | Next () |
virtual ActBody * | Clone () |
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 | |
ActBody * | next |
next pointer for linked list of body items | |
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.
ActBody::ActBody | ( | int | line | ) |
line | is the line number corresponding to this ActBody item |
|
virtual |
void ActBody::Append | ( | ActBody * | b | ) |
|
inlinevirtual |
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.
|
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.
void ActBody::Expandlist | ( | ActNamespace * | , |
Scope * | |||
) |
Traverse the body item list, expanding each element of the list
|
inline |
void ActBody::insertNext | ( | ActBody * | b | ) |
Insert b right after the current body element in the list of elements
b | is the list of items to be inserted into the current body |
|
inline |
|
inlinevirtual |
Print the body item list to the specified file
Reimplemented in ActBody_Inst, ActBody_Conn, ActBody_Loop, and ActBody_Lang.
ActBody * ActBody::Tail | ( | ) |
This returns the last element in the body list
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.
namelist | is a list of names (char * list) |
it | is the updated instance type for the specified identifiers |
|
protected |
saved away line number information
|
private |
next pointer for linked list of body items