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

All classes, structs, unions, and namespaces can be classified as a Compound object. More...

#include <cppast.h>

Inheritance diagram for CppCompound:
Inheritance graph
Collaboration diagram for CppCompound:
Collaboration graph

Public Member Functions

 CppCompound (std::string name, CppAccessType accessType, CppCompoundType type)
 
 CppCompound (CppAccessType accessType, CppCompoundType type=CppCompoundType::kUnknownCompound)
 
 CppCompound (std::string name, CppCompoundType type)
 
 CppCompound (CppCompoundType type)
 
std::string & name ()
 
void name (std::string _name)
 
std::string justName ()
 
CppCompoundType compoundType ()
 
void compoundType (CppCompoundType compoundType)
 
CppObjPtrArraymembers ()
 
std::string & apidecor ()
 
void apidecor (std::string apidecor)
 
CppTemplateParamListtemplateParamList ()
 
void templateParamList (CppTemplateParamListPtr _templateParamList)
 
void templateParamList (CppTemplateParamList *_templateParamList)
 
CppInheritanceListPtrinheritanceList ()
 
void inheritanceList (CppInheritanceListPtr _inheritanceList)
 
void inheritanceList (CppInheritanceList *_inheritanceList)
 
void addMember (CppObj *mem)
 
void addMember (CppObjPtr &&mem)
 
void addMemberAt (CppObjPtr &&mem, unsigned index)
 
void addMemberAtFront (CppObj *mem)
 
void addMemberAtFront (CppObjPtr &&mem)
 
CppObjPtr deassocMemberAt (size_t idx)
 
void addBaseClass (std::string baseName, CppAccessType inheritType)
 
bool hasPublicVirtualMethod ()
 
bool hasPureVirtual ()
 
CppConstructorcopyCtor ()
 
CppConstructormoveCtor ()
 
std::vector< CppConstructor * > & ctors ()
 
CppDestructordtor ()
 
bool triviallyConstructable ()
 
void addAttr (std::uint32_t _attr)
 
bool hasAttr (std::uint32_t _attr)
 
bool hasASingleBlobMember ()
 
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 ()
 
- Public Member Functions inherited from AttribSpecified
AttribSpecifierSequenceattribSpecifierSequence ()
 
void attribSpecifierSequence (AttribSpecifierArray *attribSpecifierArray)
 

Static Public Attributes

static constexpr CppObjType kObjectType = CppObjType::kCompound
 

Private Member Functions

void assignSpecialMember (CppObj *mem)
 

Private Attributes

std::string name_
 
CppCompoundType compoundType_
 
CppObjPtrArray members_
 
CppInheritanceListPtr inheritanceList_
 
std::string apidecor_
 
CppTemplateParamListPtr templSpec_
 
std::uint32_t attr_ {0}
 
std::vector< CppConstructor * > ctors_
 
CppConstructorcopyCtor_ {nullptr}
 
CppConstructormoveCtor_ {nullptr}
 
CppDestructordtor_ {nullptr}
 
TriStateBool hasVirtual_ = TriStateBool::Unknown
 
TriStateBool hasPureVirtual_ = TriStateBool::Unknown
 

Additional Inherited Members

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

Detailed Description

All classes, structs, unions, and namespaces can be classified as a Compound object.

Besides that followings too are compound objects:

  • An entire C/C++ source file.
  • A block of statements inside { }.
  • Body of function definition.

Definition at line 926 of file cppast.h.

Constructor & Destructor Documentation

◆ CppCompound() [1/4]

CppCompound::CppCompound ( std::string  name,
CppAccessType  accessType,
CppCompoundType  type 
)
inline

Definition at line 930 of file cppast.h.

◆ CppCompound() [2/4]

CppCompound::CppCompound ( CppAccessType  accessType,
CppCompoundType  type = CppCompoundType::kUnknownCompound 
)
inline

Definition at line 938 of file cppast.h.

◆ CppCompound() [3/4]

CppCompound::CppCompound ( std::string  name,
CppCompoundType  type 
)
inline

Definition at line 943 of file cppast.h.

◆ CppCompound() [4/4]

CppCompound::CppCompound ( CppCompoundType  type)
inline

Definition at line 948 of file cppast.h.

Member Function Documentation

◆ accept()

void CppCompound::accept ( CppVisitorBase v)
inlineoverridevirtual

Implements CppObj.

Definition at line 1105 of file cppast.h.

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

◆ addAttr()

void CppCompound::addAttr ( std::uint32_t  _attr)
inline

Definition at line 1090 of file cppast.h.

◆ addBaseClass()

void CppCompound::addBaseClass ( std::string  baseName,
CppAccessType  inheritType 
)
inline

Definition at line 1063 of file cppast.h.

◆ addMember() [1/2]

void CppCompound::addMember ( CppObj mem)
inline

Definition at line 1022 of file cppast.h.

Here is the call graph for this function:

◆ addMember() [2/2]

void CppCompound::addMember ( CppObjPtr &&  mem)
inline

Definition at line 1028 of file cppast.h.

Here is the call graph for this function:

◆ addMemberAt()

void CppCompound::addMemberAt ( CppObjPtr &&  mem,
unsigned  index 
)
inline

Definition at line 1034 of file cppast.h.

Here is the call graph for this function:

◆ addMemberAtFront() [1/2]

void CppCompound::addMemberAtFront ( CppObj mem)
inline

Definition at line 1041 of file cppast.h.

Here is the call graph for this function:

◆ addMemberAtFront() [2/2]

void CppCompound::addMemberAtFront ( CppObjPtr &&  mem)
inline

Definition at line 1047 of file cppast.h.

Here is the call graph for this function:

◆ apidecor() [1/2]

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

Definition at line 987 of file cppast.h.

Here is the caller graph for this function:

◆ apidecor() [2/2]

void CppCompound::apidecor ( std::string  apidecor)
inline

Definition at line 991 of file cppast.h.

Here is the call graph for this function:

◆ assignSpecialMember()

void CppCompound::assignSpecialMember ( CppObj mem)
private

Definition at line 172 of file cppast.cpp.

Here is the caller graph for this function:

◆ compoundType() [1/2]

CppCompoundType CppCompound::compoundType ( )
inline

Definition at line 969 of file cppast.h.

Here is the caller graph for this function:

◆ compoundType() [2/2]

void CppCompound::compoundType ( CppCompoundType  compoundType)
inline

Definition at line 973 of file cppast.h.

Here is the call graph for this function:

◆ copyCtor()

CppConstructor * CppCompound::copyCtor ( )
inline

Definition at line 1072 of file cppast.h.

◆ ctors()

std::vector< CppConstructor * > & CppCompound::ctors ( )
inline

Definition at line 1080 of file cppast.h.

◆ deassocMemberAt()

CppObjPtr CppCompound::deassocMemberAt ( size_t  idx)
inline

Definition at line 1054 of file cppast.h.

◆ dtor()

CppDestructor * CppCompound::dtor ( )
inline

Definition at line 1084 of file cppast.h.

Here is the caller graph for this function:

◆ hasASingleBlobMember()

bool CppCompound::hasASingleBlobMember ( )
inline

Definition at line 1100 of file cppast.h.

◆ hasAttr()

bool CppCompound::hasAttr ( std::uint32_t  _attr)
inline

Definition at line 1095 of file cppast.h.

Here is the caller graph for this function:

◆ hasPublicVirtualMethod()

bool CppCompound::hasPublicVirtualMethod ( )

Definition at line 102 of file cppast.cpp.

Here is the call graph for this function:

◆ hasPureVirtual()

bool CppCompound::hasPureVirtual ( )

Definition at line 126 of file cppast.cpp.

Here is the call graph for this function:

◆ inheritanceList() [1/3]

CppInheritanceListPtr & CppCompound::inheritanceList ( )
inline

Definition at line 1009 of file cppast.h.

Here is the caller graph for this function:

◆ inheritanceList() [2/3]

void CppCompound::inheritanceList ( CppInheritanceList _inheritanceList)
inline

Definition at line 1017 of file cppast.h.

◆ inheritanceList() [3/3]

void CppCompound::inheritanceList ( CppInheritanceListPtr  _inheritanceList)
inline

Definition at line 1013 of file cppast.h.

◆ justName()

std::string CppCompound::justName ( )
inline

Definition at line 961 of file cppast.h.

Here is the call graph for this function:

◆ members()

CppObjPtrArray & CppCompound::members ( )
inline

Definition at line 982 of file cppast.h.

◆ moveCtor()

CppConstructor * CppCompound::moveCtor ( )
inline

Definition at line 1076 of file cppast.h.

◆ name() [1/2]

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

Definition at line 953 of file cppast.h.

Here is the caller graph for this function:

◆ name() [2/2]

void CppCompound::name ( std::string  _name)
inline

Definition at line 957 of file cppast.h.

◆ templateParamList() [1/3]

CppTemplateParamList * CppCompound::templateParamList ( )
inline

Definition at line 996 of file cppast.h.

Here is the caller graph for this function:

◆ templateParamList() [2/3]

void CppCompound::templateParamList ( CppTemplateParamList _templateParamList)
inline

Definition at line 1004 of file cppast.h.

◆ templateParamList() [3/3]

void CppCompound::templateParamList ( CppTemplateParamListPtr  _templateParamList)
inline

Definition at line 1000 of file cppast.h.

◆ triviallyConstructable()

bool CppCompound::triviallyConstructable ( )

Definition at line 160 of file cppast.cpp.

Member Data Documentation

◆ apidecor_

std::string CppCompound::apidecor_
private

Definition at line 1138 of file cppast.h.

◆ attr_

std::uint32_t CppCompound::attr_ {0}
private

Definition at line 1140 of file cppast.h.

◆ compoundType_

CppCompoundType CppCompound::compoundType_
private

Definition at line 1135 of file cppast.h.

◆ copyCtor_

CppConstructor* CppCompound::copyCtor_ {nullptr}
private

Definition at line 1143 of file cppast.h.

◆ ctors_

std::vector<CppConstructor*> CppCompound::ctors_
private

Definition at line 1142 of file cppast.h.

◆ dtor_

CppDestructor* CppCompound::dtor_ {nullptr}
private

Definition at line 1145 of file cppast.h.

◆ hasPureVirtual_

TriStateBool CppCompound::hasPureVirtual_ = TriStateBool::Unknown
mutableprivate

Definition at line 1148 of file cppast.h.

◆ hasVirtual_

TriStateBool CppCompound::hasVirtual_ = TriStateBool::Unknown
mutableprivate

Definition at line 1147 of file cppast.h.

◆ inheritanceList_

CppInheritanceListPtr CppCompound::inheritanceList_
private

Definition at line 1137 of file cppast.h.

◆ kObjectType

constexpr CppObjType CppCompound::kObjectType = CppObjType::kCompound
staticconstexpr

Definition at line 928 of file cppast.h.

◆ members_

CppObjPtrArray CppCompound::members_
private

Definition at line 1136 of file cppast.h.

◆ moveCtor_

CppConstructor* CppCompound::moveCtor_ {nullptr}
private

Definition at line 1144 of file cppast.h.

◆ name_

std::string CppCompound::name_
private

Definition at line 1134 of file cppast.h.

◆ templSpec_

CppTemplateParamListPtr CppCompound::templSpec_
private

Definition at line 1139 of file cppast.h.


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