Module: Cplus2Ruby::Entity

Defined in:
lib/cplus2ruby/model.rb

Instance Method Summary collapse

Instance Method Details

#method(name, *args) ⇒ Object Also known as: method_c

method :name, hash, hash, …, hash, body, hash



150
151
152
153
# File 'lib/cplus2ruby/model.rb', line 150

def method(name, *args)
  options = parse_method_args(args)
  ann! name, Cplus2Ruby::Method, options 
end

#property(name, type = Object, options = {}) ⇒ Object

Raises:

  • (ArgumentError)


141
142
143
144
145
# File 'lib/cplus2ruby/model.rb', line 141

def property(name, type=Object, options={})
  raise ArgumentError if options[:type]
  options[:type] = type
  ann! name, Cplus2Ruby::Property, options
end

#static_method(name, *args) ⇒ Object



155
156
157
158
159
# File 'lib/cplus2ruby/model.rb', line 155

def static_method(name, *args)
  options = parse_method_args(args)
  options[:static] = true
  ann! name, Cplus2Ruby::Method, options 
end

#stub_method(name, *args) ⇒ Object



161
162
163
164
165
# File 'lib/cplus2ruby/model.rb', line 161

def stub_method(name, *args)
  options = parse_method_args(args)
  options[:stub] = true
  ann! name, Cplus2Ruby::Method, options 
end

#virtual(*virtuals) ⇒ Object



169
170
171
172
173
# File 'lib/cplus2ruby/model.rb', line 169

def virtual(*virtuals)
  virtuals.each do |name|
    ann! name, :virtual => true
  end
end