Module: Cplus2Ruby
- Defined in:
- lib/cplus2ruby.rb,
lib/cplus2ruby/model.rb
Defined Under Namespace
Modules: Entity
Classes: CodeGenerator, Compiler, CppCodeGenerator, Method, Model, Property, Typing, WrapperCodeGenerator
Class Method Summary
collapse
Class Method Details
.<<(code) ⇒ Object
107
108
109
110
111
|
# File 'lib/cplus2ruby/model.rb', line 107
def self.<<(code)
model.code << "\n"
model.code << code
model.code << "\n"
end
|
.add_type_alias(h) ⇒ Object
125
126
127
|
# File 'lib/cplus2ruby/model.rb', line 125
def self.add_type_alias(h)
h.each {|from, to| model.typing.alias_entry(from, to)}
end
|
.commit(*args, &block) ⇒ Object
129
130
131
132
|
# File 'lib/cplus2ruby/model.rb', line 129
def self.commit(*args, &block)
self.model.finish!
Cplus2Ruby::Compiler.new(self.model).commit(*args, &block)
end
|
.compile(*args) ⇒ Object
138
139
140
141
|
# File 'lib/cplus2ruby/model.rb', line 138
def self.compile(*args)
self.model.finish!
Cplus2Ruby::Compiler.new(self.model).compile(*args)
end
|
.include(header) ⇒ Object
113
114
115
|
# File 'lib/cplus2ruby/model.rb', line 113
def self.include()
model.includes <<
end
|
.model ⇒ Object
121
122
123
|
# File 'lib/cplus2ruby/model.rb', line 121
def self.model
@model ||= Cplus2Ruby::Model.new
end
|
.settings(h = {}) ⇒ Object
117
118
119
|
# File 'lib/cplus2ruby/model.rb', line 117
def self.settings(h={})
model.settings(h)
end
|
.startup(*args, &block) ⇒ Object
134
135
136
|
# File 'lib/cplus2ruby/model.rb', line 134
def self.startup(*args, &block)
commit(*args, &block)
end
|