Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added case statements for missing IDD enums, added warnings for objec… #1796

Merged
merged 3 commits into from
Sep 1, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 7 additions & 9 deletions developer/ruby/FindUntranslatedModelObjects.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
end

translator_methods = []
if false
headers = false
if headers
# work on hpp
File.open( File.dirname(__FILE__) + "/../../openstudiocore/src/energyplus/ForwardTranslator.hpp") do |f|
while line = f.gets
Expand All @@ -24,23 +25,20 @@
# work on cpp
File.open( File.dirname(__FILE__) + "/../../openstudiocore/src/energyplus/ForwardTranslator.cpp") do |f|
while line = f.gets
line.gsub!('_', '')
if m = /case.*OS([^\s]*)\s*:/i.match(line)
translator_methods << m[1].to_s
puts "'#{m[1]}'"
if m = /case.*OS_(\S*)\s*:/i.match(line)
name = m[1].to_s.gsub('_','')
translator_methods << name.to_s
#puts name.to_s
end
end
end
end

puts concrete_model_objects.size
puts translator_methods.size

concrete_model_objects.each do |concrete_model_object|
#puts concrete_model_object
if translator_methods.index(concrete_model_object)
#puts "Found translator for '#{concrete_model_object}'"
else
puts "Missing translator for '#{concrete_model_object}'"
puts "#{concrete_model_object}"
end
end