ScopeEntity
INCLUDE FILE
#include "Entity/ScopeEntity.h"
class ScopeEntity
DEFINITION
class ScopeEntity;
constructor ScopeEntity
DEFINITION
| ScopeEntity | ( | const Location & location, | |
| Symbol name, | |||
| std::shared_ptr< Scope > containing_scope, | |||
| const std::shared_ptr< StructuredValue > & definition | ); |
| PARAMETER | DESCRIPTION |
|---|---|
location |
|
name |
|
containing_scope |
|
definition |
constructor ScopeEntity
DEFINITION
| ScopeEntity | ( | const Location & location, | |
| Symbol name, | |||
| Visibility visibility, | |||
| std::shared_ptr< Scope > containing_scope, | |||
| bool default_only = false | ); |
| PARAMETER | DESCRIPTION |
|---|---|
location |
|
name |
|
visibility |
|
containing_scope |
|
default_only |
method add
DEFINITION
| void add | ( | std::shared_ptr< Constant > constant, | |
| bool add_to_scope = true | ); |
| PARAMETER | DESCRIPTION |
|---|---|
constant |
|
add_to_scope |
method resolve_constantsprotected
DEFINITION
| void resolve_constants | ( | ); |
method scopeconst
DEFINITION
| std::shared_ptr< Scope > scope | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
std::shared_ptr< Scope > |
method traversevirtual protected
Traverse the Entity.
This function is used by the default implementations of resolve_implementation() and expand_calls_implementation(). Unless a subclass overrides both of these methods, it should override traverse().
DEFINITION
| virtual void traverse | ( | std::function< void(Entity &)> entity_callable, | |
| std::function< void(Body &)> body_callable, | |||
| std::function< void(Expression &)> expression_callable | ); |
| PARAMETER | DESCRIPTION |
|---|---|
entity_callable |
|
body_callable |
A callable to apply to each sub-body-element. |
expression_callable |
A callable to apply to each sub-expression. |
member constantsprotected
DEFINITION
std::unordered_set< std::shared_ptr< Constant > > constants;
member scope_protected
DEFINITION
std::shared_ptr< Scope > scope_;