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

This class is used to hold information about an instance in the body of a namespace and/or user-defined type. More...

#include <body.h>

Inheritance diagram for ActBody_Inst:
ActBody

Public Member Functions

 ActBody_Inst (int line, InstType *, const char *)
 
void Expand (ActNamespace *, Scope *)
 
TypeBaseType ()
 
void Print (FILE *fp)
 
InstTypegetType ()
 
const char * getName ()
 
void updateInstType (InstType *u)
 
ActBodyClone ()
 
- Public Member Functions inherited from ActBody
 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 ()
 

Private Attributes

InstTypet
 the type
 
const char * id
 the name of the identifier to be instantiated
 

Additional Inherited Members

- Protected Attributes inherited from ActBody
int _line
 saved away line number information
 

Detailed Description

This class is used to hold information about an instance in the body of a namespace and/or user-defined type.

Constructor & Destructor Documentation

◆ ActBody_Inst()

ActBody_Inst::ActBody_Inst ( int  line,
InstType ,
const char *   
)

An instance on the specified line, consisting of a type specifier and string corresponding to the name of the instance. Note that array specifiers will be part of the type.

Member Function Documentation

◆ BaseType()

Type * ActBody_Inst::BaseType ( )
Returns
the "base" type for the instance in this particular body item

◆ Clone()

ActBody * ActBody_Inst::Clone ( )
virtual

Make a deep copy of this instance

Reimplemented from ActBody.

◆ Expand()

void ActBody_Inst::Expand ( ActNamespace ,
Scope  
)
virtual

Expand the instance, and add it to the scope table

Reimplemented from ActBody.

◆ getName()

const char * ActBody_Inst::getName ( )
inline
Returns
the name of the identifier being instantiated

◆ getType()

InstType * ActBody_Inst::getType ( )
inline
Returns
the actual instance type for this body item

◆ Print()

void ActBody_Inst::Print ( FILE *  fp)
virtual

Print the instance item to a file

Parameters
fpis the file pointer

Reimplemented from ActBody.

◆ updateInstType()

void ActBody_Inst::updateInstType ( InstType u)

Update the instance type with a new type. This is used by overrides.

Parameters
uis the new instance type

Member Data Documentation

◆ id

const char* ActBody_Inst::id
private

the name of the identifier to be instantiated

◆ t

InstType* ActBody_Inst::t
private

the type


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