class

Bindgen::Processor::Base

Inherits Bindgen::Graph::Visitor < Reference < Object

Base-class for all processors.

The processor Runner will instantiate all processors first, then call #process in order as configured.

All processors are automatically made available as their String#underscored name through in the processors configuration.

If your processor only requires to act on specific graph nodes, you can simply override the corresponding #visit_X method. See FilterMethods for an example of this.

Constructors

new(config : Configuration, db : TypeDatabase)
Source

Instance methods

inherited_rules(class_name : String, & : TypeDatabase::TypeConfig -> TypeDatabase::KeepAlive) : TypeDatabase::KeepAlive

Returns the keep_alive: or depends_on: rules, selected from the type configuration by the block, applying to the methods of class_name: its own, and those of its base classes. A method a subclass re-declares, like an override of a setter, keeps what the method of the base class keeps, so the rule of the base class covers it.

Source
process(graph : Graph::Container, doc : Parser::Document)

Runs the processor. You may change graph as you see fit.

Source
unmatched_patterns(klass : Graph::Class, rules : TypeDatabase::KeepAlive) : Array(Regex)

Returns the patterns of rules, the keep_alive: or depends_on: configuration of klass, matching the name of none of its methods, so a typo, or a pattern for an ignored method, isn't silent. Only the methods the class declares count, those bound from a superclass follow the rules of the superclass.

Source