Class: IDL::AST::Include
- Defined in:
- lib/ridl/node.rb,
lib/ridl/node.rb
Overview
TemplateModuleReference
Constant Summary
Constants inherited from Module
Module::DEFINABLE, Module::NAMETYPE
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#fullpath ⇒ Object
readonly
Returns the value of attribute fullpath.
Attributes inherited from Module
#anchor, #next, #template, #template_params
Attributes inherited from Leaf
#annotations, #enclosure, #intern, #lm_name, #name, #prefix, #scopes
Instance Method Summary collapse
-
#initialize(_name, _enclosure, params) ⇒ Include
constructor
A new instance of Include.
- #introduce(node) ⇒ Object
- #is_defined? ⇒ Boolean
- #is_preprocessed? ⇒ Boolean
- #marshal_dump ⇒ Object
- #marshal_load(vars) ⇒ Object
- #repo_scopes ⇒ Object
- #resolve(_name) ⇒ Object
- #undo_introduction(node) ⇒ Object
Methods inherited from Module
#_set_prefix, #annotations, #has_anchor?, #instantiate, #is_templated?, #redefine, #replace_prefix, #template_param
Methods inherited from Node
#define, #is_definable?, #match_members, #redefine, #replace_prefix, #select_members, #walk_members
Methods inherited from Leaf
#_set_prefix, #has_annotations?, #instantiate, #is_local?, #is_template?, #lm_name_for_scope, #parsed_name_scope, #replace_prefix, #repository_id, #scoped_lm_name, #scoped_name, #set_repo_id, #set_repo_version, #typename, #unescaped_name
Constructor Details
#initialize(_name, _enclosure, params) ⇒ Include
Returns a new instance of Include.
823 824 825 826 827 828 829 830 831 832 833 |
# File 'lib/ridl/node.rb', line 823 def initialize(_name, _enclosure, params) super(_name, _enclosure, params) @filename = params[:filename] @fullpath = params[:fullpath] @defined = params[:defined] || false @preprocessed = params[:preprocessed] || false #overrule @scopes = @enclosure.scopes @scoped_name = @scopes.collect{|s| s.name}.join("::") @scoped_lm_name = @scopes.collect{|s| s.lm_name}.join("::") end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
822 823 824 |
# File 'lib/ridl/node.rb', line 822 def filename @filename end |
#fullpath ⇒ Object (readonly)
Returns the value of attribute fullpath.
822 823 824 |
# File 'lib/ridl/node.rb', line 822 def fullpath @fullpath end |
Instance Method Details
#introduce(node) ⇒ Object
857 858 859 |
# File 'lib/ridl/node.rb', line 857 def introduce(node) @enclosure.introduce(node) unless node == self end |
#is_defined? ⇒ Boolean
850 |
# File 'lib/ridl/node.rb', line 850 def is_defined?; @defined; end |
#is_preprocessed? ⇒ Boolean
851 |
# File 'lib/ridl/node.rb', line 851 def is_preprocessed?; @preprocessed; end |
#marshal_dump ⇒ Object
835 836 837 |
# File 'lib/ridl/node.rb', line 835 def marshal_dump super() << @filename << @defined << @preprocessed end |
#marshal_load(vars) ⇒ Object
839 840 841 842 843 844 845 846 847 848 |
# File 'lib/ridl/node.rb', line 839 def marshal_load(vars) @preprocessed = vars.pop @defined = vars.pop @filename = vars.pop super(vars) #overrule @scopes = @enclosure.scopes || [] @scoped_name = @scopes.collect{|s| s.name}.join("::") @scoped_lm_name = @scopes.collect{|s| s.lm_name}.join("::") end |
#repo_scopes ⇒ Object
853 854 855 |
# File 'lib/ridl/node.rb', line 853 def repo_scopes @repo_scopes ||= (@enclosure.nil? ? [] : @enclosure.repo_scopes.dup) end |
#resolve(_name) ⇒ Object
865 866 867 |
# File 'lib/ridl/node.rb', line 865 def resolve(_name) @enclosure.resolve(_name) end |
#undo_introduction(node) ⇒ Object
861 862 863 |
# File 'lib/ridl/node.rb', line 861 def undo_introduction(node) @enclosure.undo_introduction(node) unless node == self end |