Class: RLTK::CG::PassRegistry

Inherits:
Object
  • Object
show all
Includes:
BindingClass
Defined in:
lib/rltk/cg/pass_manager.rb

Instance Attribute Summary

Attributes included from BindingClass

#ptr

Class Method Summary collapse

Instance Method Summary collapse

Methods included from BindingClass

#==

Constructor Details

#initializePassRegistry

Returns a new instance of PassRegistry.



235
236
237
# File 'lib/rltk/cg/pass_manager.rb', line 235

def initialize
	@ptr = Bindings::OpaquePassRegistry.new
end

Class Method Details

.globalObject



231
232
233
# File 'lib/rltk/cg/pass_manager.rb', line 231

def self.global
	PassRegistry.allocate.tap { |pr| pr.ptr = Bindings.get_global_pass_registry }
end

Instance Method Details

#init(pass_group) ⇒ Object



239
240
241
242
243
244
245
246
# File 'lib/rltk/cg/pass_manager.rb', line 239

def init(pass_group = :all)
	if pass_group == :all
		PASS_GROUPS.each { |pg| Bindings.send("initialize_#{pg}", @ptr) }
		
	elsif PASS_GROUPS.include?(pass_group)
		Bindings.send("initialize_#{pass_group}", @ptr)
	end
end