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

Function pointer type definition using typedef, e.g. More...

#include <cppast.h>

Inheritance diagram for CppFunctionPointer:
Inheritance graph
Collaboration diagram for CppFunctionPointer:
Collaboration graph

Public Member Functions

 CppFunctionPointer (CppAccessType accessType, std::string name, CppVarType *retType, CppParamVector *params, std::uint32_t attr, std::string ownerName=std::string())
 
void accept (CppVisitorBase *v) override
 
- Public Member Functions inherited from CppFunction
 CppFunction (CppAccessType accessType, std::string name, CppVarType *retType, CppParamVector *params, std::uint32_t attr)
 
void accept (CppVisitorBase *v) override
 
- Public Member Functions inherited from CppFuncCtorBase
bool hasParams ()
 
CppParamVectorparams ()
 
- Public Member Functions inherited from CppFunctionBase
std::uint32_t attr ()
 
void addAttr (std::uint32_t _attr)
 
bool hasAttr (std::uint32_t _attr)
 
std::string & decor1 ()
 
void decor1 (std::string _decor)
 
std::string & decor2 ()
 
void decor2 (std::string _decor)
 
CppTemplateParamListtemplateParamList ()
 
void templateParamList (CppTemplateParamList *templParamList)
 
- Public Member Functions inherited from CppFuncLikeBase
CppFuncThrowSpecthrowSpec ()
 
void throwSpec (CppFuncThrowSpec *_throwSpec)
 
CppCompounddefn ()
 
void defn (CppCompound *_defn)
 
- Public Member Functions inherited from CppObj
 CppObj (CppObjType type, CppAccessType accessType)
 
CppCompoundowner ()
 
void owner (CppCompound *o)
 
virtual void accept (CppVisitorBase *v)=0
 
virtual ~CppObj ()
 

Public Attributes

std::string ownerName_
 
- Public Attributes inherited from CppFunction
CppVarTypePtr retType_
 
- Public Attributes inherited from CppFunctionBase
std::string name_
 
- Public Attributes inherited from CppObj
CppObjType objType_
 
CppAccessType accessType_
 All objects do not need this. More...
 

Static Public Attributes

static constexpr CppObjType kObjectType = CppObjType::kFunctionPtr
 
- Static Public Attributes inherited from CppFunction
static constexpr CppObjType kObjectType = CppObjType::kFunction
 

Additional Inherited Members

- Static Public Member Functions inherited from CppFunction
static unsigned findMainFunctionFromMembers (const CppObjPtrArray &members)
 
- Protected Member Functions inherited from CppFunction
 CppFunction (CppObjType type, CppAccessType accessType, std::string name, CppVarType *retType, CppParamVector *params, std::uint32_t attr)
 
- Protected Member Functions inherited from CppFuncCtorBase
 CppFuncCtorBase (CppObjType type, CppAccessType accessType, std::string name, CppParamVector *params, std::uint32_t attr)
 
- Protected Member Functions inherited from CppFunctionBase
 CppFunctionBase (CppObjType type, CppAccessType accessType, std::string name, std::uint32_t attr)
 
- Protected Member Functions inherited from CppFuncLikeBase
 CppFuncLikeBase (CppObjType type, CppAccessType accessType)
 
- Protected Attributes inherited from CppFuncCtorBase
CppParamVectorPtr params_
 

Detailed Description

Function pointer type definition using typedef, e.g.

'typedef void (*funcPtr)(int);'

It has all the attributes of a function object and so it is simply derived from CppFunction.

Definition at line 1389 of file cppast.h.

Constructor & Destructor Documentation

◆ CppFunctionPointer()

CppFunctionPointer::CppFunctionPointer ( CppAccessType  accessType,
std::string  name,
CppVarType retType,
CppParamVector params,
std::uint32_t  attr,
std::string  ownerName = std::string() 
)
inline

Definition at line 1395 of file cppast.h.

Member Function Documentation

◆ accept()

void CppFunctionPointer::accept ( CppVisitorBase v)
inlineoverridevirtual

Reimplemented from CppFunction.

Definition at line 1406 of file cppast.h.

Here is the call graph for this function:

Member Data Documentation

◆ kObjectType

constexpr CppObjType CppFunctionPointer::kObjectType = CppObjType::kFunctionPtr
staticconstexpr

Definition at line 1391 of file cppast.h.

◆ ownerName_

std::string CppFunctionPointer::ownerName_

Definition at line 1393 of file cppast.h.


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