Class: Rbind::GeneratorC::ConstsHelper
- Inherits:
-
HelperBase
- Object
- HelperBase
- Rbind::GeneratorC::ConstsHelper
- Defined in:
- lib/rbind/generator_c.rb
Instance Attribute Summary
Attributes inherited from HelperBase
Instance Method Summary collapse
Methods inherited from HelperBase
#binding, #initialize, #wrap_includes
Constructor Details
This class inherits a constructor from Rbind::GeneratorC::HelperBase
Instance Method Details
#wrap_consts ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/rbind/generator_c.rb', line 83 def wrap_consts str = "" @root.each_type do |type| next if !type.container? next if type.consts.empty? str += "\n\n//constants for #{type.full_name}\n" str += type.consts.map do |c| "#{c.csignature};\n" end.join str end str end |