CppParser
Loading...
Searching...
No Matches
CppVar Struct Reference

Class to represent C++ variable definition. More...

#include <cppast.h>

Inheritance diagram for CppVar:
Inheritance graph
Collaboration diagram for CppVar:
Collaboration graph

Public Member Functions

 CppVar (CppVarType *varType, CppVarDecl varDecl)
 
 CppVar (CppVarTypePtr varType, CppVarDecl varDecl)
 
 CppVar (CppAccessType accessType, CppFunctionPointer *fptr, CppTypeModifier modifier)
 
CppVarTypevarType ()
 
void varType (CppVarTypePtr _varType)
 
std::string & name ()
 
std::uint32_t typeAttr ()
 
void addAttr (std::uint32_t attr)
 
CppVarDeclvarDecl ()
 
CppExprassignValue ()
 
AssignType assignType ()
 
void assign (CppExpr *assignVal, AssignType assignType)
 
CppExprbitField ()
 
void bitField (CppExpr *_bitField)
 
CppArraySizesarraySizes ()
 
void addArraySize (CppExpr *arraySize)
 
std::string & apidecor ()
 
void apidecor (std::string _apidecor)
 
CppTemplateParamListtemplateParamList ()
 
void templateParamList (CppTemplateParamList *templParamList)
 
void accept (CppVisitorBase *v) override
 
- Public Member Functions inherited from CppObj
 CppObj (CppObjType type, CppAccessType accessType)
 
CppCompoundowner ()
 
void owner (CppCompound *o)
 
virtual void accept (CppVisitorBase *v)=0
 
virtual ~CppObj ()
 

Static Public Attributes

static constexpr CppObjType kObjectType = CppObjType::kVar
 

Private Attributes

CppVarTypePtr varType_
 
CppVarDecl varDecl_
 
std::string apidecor_
 
CppTemplateParamListPtr templSpec_
 

Additional Inherited Members

- Public Attributes inherited from CppObj
CppObjType objType_
 
CppAccessType accessType_
 All objects do not need this. More...
 

Detailed Description

Class to represent C++ variable definition.

A variable can be global, local or member of a struct, class, namespace, or union. It can also be a function parameter.

Definition at line 564 of file cppast.h.

Constructor & Destructor Documentation

◆ CppVar() [1/3]

CppVar::CppVar ( CppVarType varType,
CppVarDecl  varDecl 
)
inline

Definition at line 568 of file cppast.h.

◆ CppVar() [2/3]

CppVar::CppVar ( CppVarTypePtr  varType,
CppVarDecl  varDecl 
)
inline

Definition at line 575 of file cppast.h.

◆ CppVar() [3/3]

CppVar::CppVar ( CppAccessType  accessType,
CppFunctionPointer fptr,
CppTypeModifier  modifier 
)
inline

Definition at line 582 of file cppast.h.

Member Function Documentation

◆ accept()

void CppVar::accept ( CppVisitorBase v)
inlineoverridevirtual

Implements CppObj.

Definition at line 666 of file cppast.h.

Here is the call graph for this function:

◆ addArraySize()

void CppVar::addArraySize ( CppExpr arraySize)
inline

Definition at line 643 of file cppast.h.

Here is the call graph for this function:

◆ addAttr()

void CppVar::addAttr ( std::uint32_t  attr)
inline

Definition at line 607 of file cppast.h.

◆ apidecor() [1/2]

std::string & CppVar::apidecor ( )
inline

Definition at line 648 of file cppast.h.

Here is the caller graph for this function:

◆ apidecor() [2/2]

void CppVar::apidecor ( std::string  _apidecor)
inline

Definition at line 652 of file cppast.h.

◆ arraySizes()

CppArraySizes & CppVar::arraySizes ( )
inline

Definition at line 639 of file cppast.h.

Here is the call graph for this function:

◆ assign()

void CppVar::assign ( CppExpr assignVal,
AssignType  assignType 
)
inline

Definition at line 625 of file cppast.h.

Here is the call graph for this function:

◆ assignType()

AssignType CppVar::assignType ( )
inline

Definition at line 621 of file cppast.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ assignValue()

CppExpr * CppVar::assignValue ( )
inline

Definition at line 617 of file cppast.h.

Here is the call graph for this function:

◆ bitField() [1/2]

CppExpr * CppVar::bitField ( )
inline

Definition at line 630 of file cppast.h.

Here is the call graph for this function:

◆ bitField() [2/2]

void CppVar::bitField ( CppExpr _bitField)
inline

Definition at line 634 of file cppast.h.

Here is the call graph for this function:

◆ name()

std::string & CppVar::name ( )
inline

Definition at line 598 of file cppast.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ templateParamList() [1/2]

CppTemplateParamList * CppVar::templateParamList ( )
inline

Definition at line 657 of file cppast.h.

Here is the caller graph for this function:

◆ templateParamList() [2/2]

void CppVar::templateParamList ( CppTemplateParamList templParamList)
inline

Definition at line 661 of file cppast.h.

◆ typeAttr()

std::uint32_t CppVar::typeAttr ( )
inline

Definition at line 603 of file cppast.h.

◆ varDecl()

CppVarDecl & CppVar::varDecl ( )
inline

Definition at line 612 of file cppast.h.

Here is the caller graph for this function:

◆ varType() [1/2]

CppVarType * CppVar::varType ( )
inline

Definition at line 589 of file cppast.h.

Here is the caller graph for this function:

◆ varType() [2/2]

void CppVar::varType ( CppVarTypePtr  _varType)
inline

Definition at line 593 of file cppast.h.

Member Data Documentation

◆ apidecor_

std::string CppVar::apidecor_
private

Definition at line 677 of file cppast.h.

◆ kObjectType

constexpr CppObjType CppVar::kObjectType = CppObjType::kVar
staticconstexpr

Definition at line 566 of file cppast.h.

◆ templSpec_

CppTemplateParamListPtr CppVar::templSpec_
private

Definition at line 678 of file cppast.h.

◆ varDecl_

CppVarDecl CppVar::varDecl_
private

Definition at line 676 of file cppast.h.

◆ varType_

CppVarTypePtr CppVar::varType_
private

Definition at line 675 of file cppast.h.


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