GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
symbol_record Class Reference

#include "symrec.h"

Collaboration diagram for symbol_record:

Classes

class  symbol_record_rep
 

Public Types

typedef std::size_t context_id
 
enum  symrec_t : unsigned char { LOCAL = 1 , FORMAL = 2 , ADDED_STATIC = 4 , VARIABLE = 8 }
 

Public Member Functions

 symbol_record (const std::string &nm, const octave_value &, symrec_t sc=LOCAL)
 
 symbol_record (const std::string &nm="", symrec_t sc=LOCAL)
 
 symbol_record (const symbol_record &)=default
 
 ~symbol_record (void)=default
 
std::size_t data_offset (void) const
 
octave_value dump (void) const
 
symbol_record dup (void) const
 
std::size_t frame_offset (void) const
 
bool is_added_static (void) const
 
bool is_formal (void) const
 
bool is_local (void) const
 
bool is_valid (void) const
 
bool is_variable (void) const
 
void mark_added_static (void)
 
void mark_as_variable (void)
 
void mark_formal (void)
 
void mark_local (void)
 
std::string name (void) const
 
 operator bool () const
 
symbol_recordoperator= (const symbol_record &)=default
 
void rename (const std::string &new_name)
 
void set_data_offset (std::size_t offset)
 
void set_frame_offset (std::size_t offset)
 
unsigned int storage_class (void) const
 
void unmark_added_static (void)
 
void unmark_as_variable (void)
 
void unmark_formal (void)
 
void unmark_local (void)
 

Private Member Functions

 symbol_record (const std::shared_ptr< symbol_record_rep > &new_rep)
 

Private Attributes

std::shared_ptr< symbol_record_repm_rep
 

Detailed Description

Definition at line 45 of file symrec.h.

Member Typedef Documentation

◆ context_id

typedef std::size_t symbol_record::context_id

Definition at line 49 of file symrec.h.

Member Enumeration Documentation

◆ symrec_t

enum symbol_record::symrec_t : unsigned char
Enumerator
LOCAL 
FORMAL 
ADDED_STATIC 
VARIABLE 

Definition at line 51 of file symrec.h.

Constructor & Destructor Documentation

◆ symbol_record() [1/4]

symbol_record::symbol_record ( const std::string &  nm = "",
symrec_t  sc = LOCAL 
)
inline

Definition at line 178 of file symrec.h.

Referenced by dup().

◆ symbol_record() [2/4]

symbol_record::symbol_record ( const std::string &  nm,
const octave_value ,
symrec_t  sc = LOCAL 
)
inline

Definition at line 182 of file symrec.h.

◆ symbol_record() [3/4]

symbol_record::symbol_record ( const symbol_record )
default

◆ ~symbol_record()

symbol_record::~symbol_record ( void  )
default

◆ symbol_record() [4/4]

symbol_record::symbol_record ( const std::shared_ptr< symbol_record_rep > &  new_rep)
inlineprivate

Definition at line 237 of file symrec.h.

Member Function Documentation

◆ data_offset()

◆ dump()

octave_value symbol_record::dump ( void  ) const
inline

Definition at line 230 of file symrec.h.

References m_rep.

Referenced by symbol_scope_rep::dump_symbols_map().

◆ dup()

symbol_record symbol_record::dup ( void  ) const
inline

Definition at line 207 of file symrec.h.

References symbol_record(), and m_rep.

Referenced by script_stack_frame::lookup_symbol().

◆ frame_offset()

◆ is_added_static()

bool symbol_record::is_added_static ( void  ) const
inline

Definition at line 215 of file symrec.h.

References m_rep.

Referenced by tree_identifier::evaluate_n(), and tree_identifier::lvalue().

◆ is_formal()

bool symbol_record::is_formal ( void  ) const
inline

◆ is_local()

bool symbol_record::is_local ( void  ) const
inline

Definition at line 213 of file symrec.h.

References m_rep.

Referenced by symbol_record::symbol_record_rep::dump().

◆ is_valid()

bool symbol_record::is_valid ( void  ) const
inline

◆ is_variable()

bool symbol_record::is_variable ( void  ) const
inline

Definition at line 216 of file symrec.h.

References m_rep.

◆ mark_added_static()

void symbol_record::mark_added_static ( void  )
inline

Definition at line 220 of file symrec.h.

References m_rep.

Referenced by symbol_scope_rep::insert().

◆ mark_as_variable()

void symbol_record::mark_as_variable ( void  )
inline

Definition at line 221 of file symrec.h.

References m_rep.

◆ mark_formal()

void symbol_record::mark_formal ( void  )
inline

Definition at line 219 of file symrec.h.

References m_rep.

Referenced by tree_identifier::mark_as_formal_parameter().

◆ mark_local()

void symbol_record::mark_local ( void  )
inline

Definition at line 218 of file symrec.h.

References m_rep.

◆ name()

◆ operator bool()

symbol_record::operator bool ( ) const
inlineexplicit

Definition at line 195 of file symrec.h.

References is_valid().

◆ operator=()

symbol_record& symbol_record::operator= ( const symbol_record )
default

◆ rename()

void symbol_record::rename ( const std::string &  new_name)
inline

Definition at line 211 of file symrec.h.

References m_rep.

Referenced by symbol_scope_rep::rename().

◆ set_data_offset()

void symbol_record::set_data_offset ( std::size_t  offset)
inline

◆ set_frame_offset()

void symbol_record::set_frame_offset ( std::size_t  offset)
inline

Definition at line 197 of file symrec.h.

References m_rep.

Referenced by symbol_scope_rep::look_nonlocal(), and script_stack_frame::lookup_symbol().

◆ storage_class()

unsigned int symbol_record::storage_class ( void  ) const
inline

Definition at line 228 of file symrec.h.

References m_rep.

◆ unmark_added_static()

void symbol_record::unmark_added_static ( void  )
inline

Definition at line 225 of file symrec.h.

References m_rep.

◆ unmark_as_variable()

void symbol_record::unmark_as_variable ( void  )
inline

Definition at line 226 of file symrec.h.

References m_rep.

◆ unmark_formal()

void symbol_record::unmark_formal ( void  )
inline

Definition at line 224 of file symrec.h.

References m_rep.

◆ unmark_local()

void symbol_record::unmark_local ( void  )
inline

Definition at line 223 of file symrec.h.

References m_rep.

Member Data Documentation

◆ m_rep


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