|
ROSE 2.23.0
|
Binds Rose::Common::Analysis::ClassAnalysis to C++ ROSE AST nodes and stores C++-specific metadata.
Definition at line 29 of file CppHierarchyAnalysis.h.
#include <Rose/Source/Analysis/CppHierarchyAnalysis.h>


Public Types | |
| using | base = Rose::Common::Analysis::ClassAnalysis |
| Base class-analysis type. | |
| using | SpecialMemberFunctionMap = std::unordered_map< Rose::Common::Analysis::ClassKeyType, SpecialMemberFunctionContainer > |
| Map from class keys to their detected special member functions. | |
| using | base = ClassAnalysisBase |
| Base map type used for storage. | |
Public Types inherited from Rose::Common::Analysis::ClassAnalysis | |
| using | base = ClassAnalysisBase |
| Base map type used for storage. | |
Public Member Functions | |
| const CppCompatibility & | compatibilityBridge () const override |
| Returns the C++ compatibility bridge. | |
| Rose::Common::Analysis::ASTRootType | rootId (const SgProject *root) const |
| Converts a ROSE project root pointer to an abstract analysis key. | |
| SgProject * | root (Rose::Common::Analysis::ASTRootType key) const |
| Converts an abstract analysis key back to a ROSE project root pointer. | |
| Rose::Common::Analysis::ClassKeyType | classId (const SgClassDefinition *cls) const |
| Converts a ROSE class definition pointer to an abstract analysis key. | |
| SgClassDefinition * | classDefinition (Rose::Common::Analysis::ClassKeyType key) const |
| Converts an abstract class key back to a ROSE class definition pointer. | |
| Rose::Common::Analysis::FunctionKeyType | functionId (const SgFunctionDeclaration *fun) const |
| Converts a ROSE function declaration pointer to an abstract analysis key. | |
| SgFunctionDeclaration * | functionDeclaration (Rose::Common::Analysis::FunctionKeyType key) const |
| Converts an abstract function key back to a ROSE function declaration pointer. | |
| Rose::Common::Analysis::VariableKeyType | variableId (SgInitializedName *var) const |
| Converts a ROSE initialized-name pointer to an abstract variable key. | |
| Rose::Common::Analysis::VariableKeyType | variableId (SgVariableDeclaration *var) const |
| Converts a ROSE variable declaration pointer to an abstract variable key. | |
| SgInitializedName * | variableDeclaration (Rose::Common::Analysis::VariableKeyType key) const |
| Converts an abstract variable key back to a ROSE initialized-name pointer. | |
| Rose::Common::Analysis::FunctionTypeKeyType | functionTypeId (const SgFunctionType *ty) const |
| Converts a ROSE function type pointer to an abstract function type key. | |
| SgFunctionType * | functionType (Rose::Common::Analysis::FunctionTypeKeyType key) const |
| Converts an abstract function type key back to a ROSE function type pointer. | |
| Rose::Common::Analysis::TypeKeyType | typeId (const SgType *ty) const |
| Converts a ROSE type pointer to an abstract type key. | |
| SgType * | type (Rose::Common::Analysis::TypeKeyType key) const |
| Converts an abstract type key back to a ROSE type pointer. | |
| std::string | nameOf (const SgClassDefinition *cls) const |
| Returns a printable source name for a ROSE class definition. | |
| std::string | nameOf (const SgFunctionDeclaration *fun) const |
| Returns a printable source name for a ROSE function declaration. | |
| std::string | nameOf (const SgInitializedName *var) const |
| Returns a printable source name for a ROSE initialized name (field). | |
| SpecialMemberFunctionContainer & | specialMemberFunctions (Rose::Common::Analysis::ClassKeyType clazz) |
Returns mutable special member function metadata for clazz. | |
| const SpecialMemberFunctionContainer & | specialMemberFunctions (Rose::Common::Analysis::ClassKeyType clazz) const |
Returns special member function metadata for clazz. | |
| std::uint32_t | languageStandard () const |
| returns the version identifier of the language standard. | |
| void | languageStandard (std::uint32_t v) |
| Sets the version identifier of the language standard. | |
Public Member Functions inherited from Rose::Common::Analysis::ClassAnalysis | |
| ClassAnalysis (bool fullTranslUnit) | |
| Constructs an analysis and records whether it covers a complete translation unit. | |
| ClassAnalysis ()=default | |
| Constructs an empty analysis that does not claim complete-program coverage. | |
| void | addInheritanceEdge (value_type &descendant, ClassKeyType ancestorKey, bool isVirtual, bool isDirect) |
| convenience function to access the map using a SgClassDefinition reference. | |
| void | addInheritanceEdge (value_type &descendant, const InheritanceDesc &ancestor) |
adds an inheritance edge to the descendant class and ancestor class. | |
| bool | isBaseOf (ClassKeyType ancestorKey, ClassKeyType descendantKey) const |
returns true, iff ancestorKey is a (direct or indirect) base class of descendantKey. | |
| bool | isVirtualBaseOf (ClassKeyType ancestorKey, ClassKeyType descendantKey) const |
returns true, iff ancestorKey is a (direct or indirect) virtual base class of descendantKey. | |
| std::vector< InheritanceDesc > | concreteDescendants (ClassKeyType classKey) const |
returns a list of concrete descendant classes of classkey (i.e., const SgClassDefinition*) | |
| ClassAnalysisInfo | classInfo (ClassKeyType classKey) const |
| returns a ClassAnalysisInfo object that can be used for writing information to a stream. | |
| mapped_type & | at (const key_type &k) |
replaces base::at with functions that can provide better diagnostics in case k is not known. | |
| const mapped_type & | at (const key_type &k) const |
replaces base::at with functions that can provide better diagnostics in case k is not known. | |
| bool | containsAllClasses () const |
| property indicating whether this analysis was built for the whole AST/program or just to represent the inheritance hierarchy of a single class. | |
| void | containsAllClasses (bool b) |
| property indicating whether this analysis was built for the whole AST/program or just to represent the inheritance hierarchy of a single class. | |
Static Public Attributes | |
| static constexpr std::uint32_t | Cxx98 = 199711L |
| C++98 language standard identifier. | |
| static constexpr std::uint32_t | Cxx11 = 201103L |
| C++11 language standard identifier. | |
| static constexpr std::uint32_t | Cxx14 = 201402L |
| C++14 language standard identifier. | |
| static constexpr std::uint32_t | Cxx17 = 201703L |
| C++17 language standard identifier. | |
| static constexpr std::uint32_t | Cxx20 = 202002L |
| C++20 language standard identifier. | |
| static constexpr std::uint32_t | Cxx23 = 202302L |
| C++23 language standard identifier. | |
| static constexpr std::uint32_t | Cxx26 = 202600L |
| Draft C++26 language standard identifier. | |
Base class-analysis type.
Definition at line 34 of file CppHierarchyAnalysis.h.
| using Rose::Source::Analysis::CppHierarchyAnalysis::SpecialMemberFunctionMap = std::unordered_map<Rose::Common::Analysis::ClassKeyType, SpecialMemberFunctionContainer> |
Map from class keys to their detected special member functions.
Definition at line 38 of file CppHierarchyAnalysis.h.
| using Rose::Common::Analysis::ClassAnalysis::base = ClassAnalysisBase |
Base map type used for storage.
Definition at line 465 of file ClassHierarchyAnalysis.h.
|
overridevirtual |
Returns the C++ compatibility bridge.
Implements Rose::Common::Analysis::ClassAnalysis.
| Rose::Common::Analysis::ASTRootType Rose::Source::Analysis::CppHierarchyAnalysis::rootId | ( | const SgProject * | root | ) | const |
Converts a ROSE project root pointer to an abstract analysis key.
| root | ROSE project pointer to wrap. |
root. | SgProject * Rose::Source::Analysis::CppHierarchyAnalysis::root | ( | Rose::Common::Analysis::ASTRootType | key | ) | const |
Converts an abstract analysis key back to a ROSE project root pointer.
| key | abstract root key to unwrap. |
key. | Rose::Common::Analysis::ClassKeyType Rose::Source::Analysis::CppHierarchyAnalysis::classId | ( | const SgClassDefinition * | cls | ) | const |
Converts a ROSE class definition pointer to an abstract analysis key.
| cls | ROSE class definition pointer to wrap. |
cls. | SgClassDefinition * Rose::Source::Analysis::CppHierarchyAnalysis::classDefinition | ( | Rose::Common::Analysis::ClassKeyType | key | ) | const |
Converts an abstract class key back to a ROSE class definition pointer.
| key | abstract class key to unwrap. |
key. | Rose::Common::Analysis::FunctionKeyType Rose::Source::Analysis::CppHierarchyAnalysis::functionId | ( | const SgFunctionDeclaration * | fun | ) | const |
Converts a ROSE function declaration pointer to an abstract analysis key.
| fun | ROSE function declaration pointer to wrap. |
fun. | SgFunctionDeclaration * Rose::Source::Analysis::CppHierarchyAnalysis::functionDeclaration | ( | Rose::Common::Analysis::FunctionKeyType | key | ) | const |
Converts an abstract function key back to a ROSE function declaration pointer.
| key | abstract function key to unwrap. |
key. | Rose::Common::Analysis::VariableKeyType Rose::Source::Analysis::CppHierarchyAnalysis::variableId | ( | SgInitializedName * | var | ) | const |
Converts a ROSE initialized-name pointer to an abstract variable key.
| var | ROSE initialized-name pointer to wrap. |
var. | Rose::Common::Analysis::VariableKeyType Rose::Source::Analysis::CppHierarchyAnalysis::variableId | ( | SgVariableDeclaration * | var | ) | const |
Converts a ROSE variable declaration pointer to an abstract variable key.
| var | ROSE variable declaration pointer to wrap. |
var. | SgInitializedName * Rose::Source::Analysis::CppHierarchyAnalysis::variableDeclaration | ( | Rose::Common::Analysis::VariableKeyType | key | ) | const |
Converts an abstract variable key back to a ROSE initialized-name pointer.
| key | abstract variable key to unwrap. |
key. | Rose::Common::Analysis::FunctionTypeKeyType Rose::Source::Analysis::CppHierarchyAnalysis::functionTypeId | ( | const SgFunctionType * | ty | ) | const |
Converts a ROSE function type pointer to an abstract function type key.
| ty | ROSE function type pointer to wrap. |
ty. | SgFunctionType * Rose::Source::Analysis::CppHierarchyAnalysis::functionType | ( | Rose::Common::Analysis::FunctionTypeKeyType | key | ) | const |
Converts an abstract function type key back to a ROSE function type pointer.
| key | abstract function type key to unwrap. |
key. | Rose::Common::Analysis::TypeKeyType Rose::Source::Analysis::CppHierarchyAnalysis::typeId | ( | const SgType * | ty | ) | const |
Converts a ROSE type pointer to an abstract type key.
| ty | ROSE type pointer to wrap. |
ty. | SgType * Rose::Source::Analysis::CppHierarchyAnalysis::type | ( | Rose::Common::Analysis::TypeKeyType | key | ) | const |
Converts an abstract type key back to a ROSE type pointer.
| key | abstract type key to unwrap. |
key. | std::string Rose::Source::Analysis::CppHierarchyAnalysis::nameOf | ( | const SgClassDefinition * | cls | ) | const |
Returns a printable source name for a ROSE class definition.
| cls | ROSE class definition to name. |
cls. | std::string Rose::Source::Analysis::CppHierarchyAnalysis::nameOf | ( | const SgFunctionDeclaration * | fun | ) | const |
Returns a printable source name for a ROSE function declaration.
| fun | ROSE function declaration to name. |
fun. | std::string Rose::Source::Analysis::CppHierarchyAnalysis::nameOf | ( | const SgInitializedName * | var | ) | const |
Returns a printable source name for a ROSE initialized name (field).
| var | ROSE initialized name to name. |
var. | SpecialMemberFunctionContainer & Rose::Source::Analysis::CppHierarchyAnalysis::specialMemberFunctions | ( | Rose::Common::Analysis::ClassKeyType | clazz | ) |
Returns mutable special member function metadata for clazz.
| clazz | class key whose metadata is requested. |
| const SpecialMemberFunctionContainer & Rose::Source::Analysis::CppHierarchyAnalysis::specialMemberFunctions | ( | Rose::Common::Analysis::ClassKeyType | clazz | ) | const |
Returns special member function metadata for clazz.
| clazz | class key whose metadata is requested. |
|
inline |
returns the version identifier of the language standard.
Definition at line 156 of file CppHierarchyAnalysis.h.
|
inline |
Sets the version identifier of the language standard.
| v | language standard identifier to record. |
Definition at line 160 of file CppHierarchyAnalysis.h.
|
staticconstexpr |
C++98 language standard identifier.
Definition at line 163 of file CppHierarchyAnalysis.h.
|
staticconstexpr |
C++11 language standard identifier.
Definition at line 166 of file CppHierarchyAnalysis.h.
|
staticconstexpr |
C++14 language standard identifier.
Definition at line 169 of file CppHierarchyAnalysis.h.
|
staticconstexpr |
C++17 language standard identifier.
Definition at line 172 of file CppHierarchyAnalysis.h.
|
staticconstexpr |
C++20 language standard identifier.
Definition at line 175 of file CppHierarchyAnalysis.h.
|
staticconstexpr |
C++23 language standard identifier.
Definition at line 178 of file CppHierarchyAnalysis.h.
|
staticconstexpr |
Draft C++26 language standard identifier.
Definition at line 181 of file CppHierarchyAnalysis.h.