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

#include <Puma/CSemDeclSpecs.h>

Description

Class for analysing a sequence of declaration specifiers.

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

Public Member Functions

 CSemDeclSpecs (ErrorSink *es, CT_DeclSpecSeq *dss, bool support_implicit_int=false)
 Constructor. More...
 
 ~CSemDeclSpecs ()
 Destructor. More...
 
CTypeInfomake_type () const
 Get a copy of the resulting type. More...
 
CT_DeclSpecSeqDeclSpecSeq () const
 Get the declaration specifier sequence. More...
 
bool declared (CT_PrimDeclSpec::Type dst) const
 Check if the given declaration specifier was declared. More...
 
bool defClass () const
 Check if a class was defined in the declaration specifier sequence. More...
 
bool defUnion () const
 Check if an union was defined in the declaration specifier sequence. More...
 
bool defEnum () const
 Check if an enumeration was defined in the declaration specifier sequence. More...
 

Constructor & Destructor Documentation

◆ CSemDeclSpecs()

Puma::CSemDeclSpecs::CSemDeclSpecs ( ErrorSink es,
CT_DeclSpecSeq dss,
bool  support_implicit_int = false 
)

Constructor.

Parameters
esThe error stream on which to report errors.
dssThe declaration specifier sequence to be analysed.
support_implicit_intTrue if implicit type int shall be supported.

◆ ~CSemDeclSpecs()

Puma::CSemDeclSpecs::~CSemDeclSpecs ( )
inline

Destructor.

Destroys the created type.

Member Function Documentation

◆ declared()

bool Puma::CSemDeclSpecs::declared ( CT_PrimDeclSpec::Type  dst) const
inline

Check if the given declaration specifier was declared.

Parameters
dstThe declaration specifier type.

◆ DeclSpecSeq()

CT_DeclSpecSeq * Puma::CSemDeclSpecs::DeclSpecSeq ( ) const
inline

Get the declaration specifier sequence.

◆ defClass()

bool Puma::CSemDeclSpecs::defClass ( ) const
inline

Check if a class was defined in the declaration specifier sequence.

◆ defEnum()

bool Puma::CSemDeclSpecs::defEnum ( ) const
inline

Check if an enumeration was defined in the declaration specifier sequence.

◆ defUnion()

bool Puma::CSemDeclSpecs::defUnion ( ) const
inline

Check if an union was defined in the declaration specifier sequence.

◆ make_type()

CTypeInfo * Puma::CSemDeclSpecs::make_type ( ) const
inline

Get a copy of the resulting type.

Returns
The copy of the type. Has to be destroyed by the caller.