MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / parse_impl

Function parse_impl

developer/ruby/MakeModelMainPage.rb:34–52  ·  view source on GitHub ↗
(obj_name, impl_header)

Source from the content-addressed store, hash-verified

32end
33
34def parse_impl(obj_name, impl_header)
35
36 info = ClassInfo.new
37 info.name = obj_name
38 info.abstract = true
39
40 File.open(impl_header, 'r') do |file|
41 while line = file.gets
42 if m = Regexp.new("#{obj_name}\_Impl\s*:\s*public\s*([^\s]*)\_Impl").match(line)
43 info.base_class = m[1]
44 end
45 if /virtual\s+const\s+IddObjectType\&\s+iddObjectType\(\)\s+const/.match(line)
46 info.abstract = false
47 end
48 end
49 end
50
51 return info
52end
53
54
55def parse_cpp(info, cpp_filename)

Callers 1

Calls 2

nameMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected