IDL compiler front-end library
Public Member Functions | List of all members
AST::NamedItem Class Reference

A named AST item. More...

#include <NamedItem.h>

Inheritance diagram for AST::NamedItem:
AST::Item AST::Location AST::Constant AST::EnumItem AST::ItemWithId AST::Member AST::OperationBase AST::Enum AST::InterfaceDecl AST::ItemScope AST::Native AST::StructBase AST::StructDecl AST::TypeDef AST::Union AST::UnionDecl AST::ValueBox AST::ValueTypeDecl AST::Attribute AST::Parameter AST::StateMember AST::UnionElement AST::Operation AST::ValueFactory

Public Member Functions

const Identifiername () const noexcept
 
const ItemScopeparent () const noexcept
 
std::string qualified_name () const
 
ScopedName scoped_name () const
 
const Symbolsparent_scope () const noexcept
 
- Public Member Functions inherited from AST::Item
Kind kind () const noexcept
 
bool is_type () const noexcept
 
bool is_forward_decl () const noexcept
 
- Public Member Functions inherited from AST::Location
const std::filesystem::path & file () const noexcept
 
unsigned line () const noexcept
 

Additional Inherited Members

- Public Types inherited from AST::Item
enum class  Kind {
  ROOT , INCLUDE , NATIVE , TYPE_DEF ,
  CONSTANT , MODULE , MODULE_ITEMS , INTERFACE_DECL ,
  INTERFACE , OPERATION , PARAMETER , ATTRIBUTE ,
  EXCEPTION , STRUCT_DECL , STRUCT , MEMBER ,
  UNION_DECL , UNION , UNION_ELEMENT , ENUM ,
  ENUM_ITEM , VALUE_TYPE_DECL , VALUE_TYPE , VALUE_BOX ,
  STATE_MEMBER , VALUE_FACTORY
}
 The kind of item. More...
 

Detailed Description

A named AST item.

Examples
Printer.cpp.

Definition at line 42 of file NamedItem.h.

Member Function Documentation

◆ name()

const Identifier& AST::NamedItem::name ( ) const
inlinenoexcept
Returns
The name of item.

Definition at line 48 of file NamedItem.h.

◆ parent()

const ItemScope* AST::NamedItem::parent ( ) const
noexcept
Returns
The parent item or nullptr.

◆ qualified_name()

std::string AST::NamedItem::qualified_name ( ) const
Returns
The fully qualified name of the item.

◆ scoped_name()

ScopedName AST::NamedItem::scoped_name ( ) const
Returns
The fully qualified ScopedName of the item.

◆ parent_scope()

const Symbols* AST::NamedItem::parent_scope ( ) const
noexcept
Returns
The parent scope. For items from valid AST it never returns nullptr.

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