PUMA Library Reference Manual
Loading...
Searching...
No Matches
Puma::CSemDeclarator Class Reference

#include <Puma/CSemDeclarator.h>

+ Inheritance diagram for Puma::CSemDeclarator:

Description

Class for analysing an entity declarator.

The result of the analysis is a type and the name of the declared entity (name and type of function, object, etc).

Public Member Functions

 CSemDeclarator (ErrorSink *err, CTypeInfo *t, CTree *d, bool lang_c=true)
 Constructor. More...
 
 ~CSemDeclarator ()
 Destructor. More...
 
CT_SimpleNameName () const
 Get the name of the declared entity. More...
 
CTypeInfoType () const
 Get the resulting type. More...
 
void Type (CTypeInfo *t)
 Set the type of the declared entity. More...
 

Constructor & Destructor Documentation

◆ CSemDeclarator()

Puma::CSemDeclarator::CSemDeclarator ( ErrorSink err,
CTypeInfo t,
CTree d,
bool  lang_c = true 
)

Constructor.

Parameters
errThe error stream on which to report errors.
tThe base type of the declared entity (function return type, data type, etc).
dThe declarator to analyse.
lang_cSupport language C.

◆ ~CSemDeclarator()

Puma::CSemDeclarator::~CSemDeclarator ( )
inline

Destructor.

Destroys the resulting type.

Member Function Documentation

◆ Name()

CT_SimpleName * Puma::CSemDeclarator::Name ( ) const
inline

Get the name of the declared entity.

◆ Type() [1/2]

CTypeInfo * Puma::CSemDeclarator::Type ( ) const
inline

Get the resulting type.

◆ Type() [2/2]

void Puma::CSemDeclarator::Type ( CTypeInfo t)
inline

Set the type of the declared entity.

This type will be destroyed in the destructor of this class.

Parameters
tThe type.