Class: RgGen::CUtility::DataStructureDefinition
- Inherits:
-
Object
- Object
- RgGen::CUtility::DataStructureDefinition
- Includes:
- RgGen::CodeUtility
- Defined in:
- lib/rggen/core_components/c_utility/data_structure_definition.rb
Instance Method Summary collapse
-
#initialize(type_keyword, type_name) {|_self| ... } ⇒ DataStructureDefinition
constructor
A new instance of DataStructureDefinition.
- #to_code ⇒ Object
- #with_typedef(typedef_name = nil) ⇒ Object
Methods included from RgGen::CodeUtility
Constructor Details
#initialize(type_keyword, type_name) {|_self| ... } ⇒ DataStructureDefinition
Returns a new instance of DataStructureDefinition.
6 7 8 9 10 |
# File 'lib/rggen/core_components/c_utility/data_structure_definition.rb', line 6 def initialize(type_keyword, type_name) @type_keyword = type_keyword @type_name = type_name yield(self) if block_given? end |
Instance Method Details
#to_code ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/rggen/core_components/c_utility/data_structure_definition.rb', line 19 def to_code code_block do |code| header_code(code) body_code(code) (code) end end |
#with_typedef(typedef_name = nil) ⇒ Object
14 15 16 17 |
# File 'lib/rggen/core_components/c_utility/data_structure_definition.rb', line 14 def with_typedef(typedef_name = nil) @with_typedef = true @typedef_name = typedef_name end |