Gyoji Compiler
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
Gyoji::frontend::tree::AccessModifier Class Reference

Declares PUBLIC, PROTECTED, or PRIVATE access to functions and members. More...

#include <tree.hpp>

Inheritance diagram for Gyoji::frontend::tree::AccessModifier:
Inheritance graph
[legend]
Collaboration diagram for Gyoji::frontend::tree::AccessModifier:
Collaboration graph
[legend]

Public Types

enum  AccessModifierType { PUBLIC , PROTECTED , PRIVATE }
 

Public Member Functions

 AccessModifier (Gyoji::owned< Terminal > _modifier)
 
 AccessModifier (const Gyoji::context::SourceReference &_source_ref)
 
 ~AccessModifier ()
 
const AccessModifierTypeget_type () const
 
- Public Member Functions inherited from Gyoji::frontend::ast::SyntaxNode
 SyntaxNode (Gyoji::context::TokenID _type, specific_type_t _data, const Gyoji::context::SourceReference &_source_ref)
 
const std::vector< std::reference_wrapper< const SyntaxNode > > & get_children () const
 
const Gyoji::context::TokenID & get_type () const
 
template<class T >
bool has_data () const
 
template<class T >
const T & get_data () const
 
const SyntaxNodeget_syntax_node () const
 
const Gyoji::context::SourceReferenceget_source_ref () const
 

Detailed Description

Declares PUBLIC, PROTECTED, or PRIVATE access to functions and members.

An access modifier is a declaration of the visibility of an object. If it is not specified, it is presumed to be public. If it is specified, then the protection will be evaluated by the namespace system according to where it is referenced with respect to where it is declared.

Member Enumeration Documentation

◆ AccessModifierType

Enumerator
PUBLIC 

Indicates that this value can be accessed from anywhere.

PROTECTED 

Indicates that this value can be accessed from within the context of the parent class or namespace.

PRIVATE 

Indicates that this value can only be accessed from within the current class or namespace.

Constructor & Destructor Documentation

◆ AccessModifier() [1/2]

AccessModifier::AccessModifier ( Gyoji::owned< Terminal _modifier)

Constructs an access modifier for the given terminal which will be either PUBLIC, PROTECTED, or PRIVATE.

◆ AccessModifier() [2/2]

AccessModifier::AccessModifier ( const Gyoji::context::SourceReference _source_ref)

This is the default constructor used when the access modifier is not explicitly specified in the source file (i.e. optional).

◆ ~AccessModifier()

AccessModifier::~AccessModifier ( )

Destructor, nothing special.

Member Function Documentation

◆ get_type()

const AccessModifier::AccessModifierType & AccessModifier::get_type ( ) const

Returns the type of modifier applied.


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