developer/ruby/SubProjectClassGenerators/TranslatorGenerator.rb
def objectListIncludes()

    result = String.new

    preamble = "// TODO: Check the following class names against object getters and setters.\n"

    classDones = []
    # Check for ObjectList fields, to see which we need to include
    @nonextensibleFields.each do |field|
      className = nil
      if field.isObjectList?
        className = field.objectListClassName
      elsif field.isNode?
        className = "Node"
      end

      if not className.nil?
        # puts "#{field.name}: #{className}"
        if not classDones.include?(className)
          classDones << className
          result << preamble
          result << "#include \"../../model/" << className << ".hpp\"\n"
          result << "#include \"../../model/" << className << "_Impl.hpp\"\n\n"
          preamble = ""
        end
      end

    end

    return result

  end
# Checks the objectList fields to see what we need to include
# Apply to both FT and RT
# @return [String] returns the include statements
Checks the objectList fields to see what we need to include
Apply to both FT and RT
Checks the objectList fields to see what we need to include Apply to both FT and RT
def objectListIncludes()
    result = String.new
    preamble = "// TODO: Check the following class names against object getters and setters.\n"
    classDones = []
    @nonextensibleFields.each do |field|
      className = nil
      if field.isObjectList?
        className = field.objectListClassName
      elsif field.isNode?
        className = "Node"
      end
      if not className.nil?
        if not classDones.include?(className)
          classDones << className
          result << preamble
          result << "#include \"../../model/" << className << ".hpp\"\n"
          result << "#include \"../../model/" << className << "_Impl.hpp\"\n\n"
          preamble = ""
        end
      end
    end
    return result
  end
def objectListIncludes ( ) result = String . new preamble = "// TODO: Check the following class names against object getters and setters.\n" classDones = [ ] @nonextensibleFields . each do | field | className = nil if field . isObjectList? className = field . objectListClassName elsif field . isNode? className = "Node" end if not className . nil? if not classDones . include? ( className ) classDones << className result << preamble result << "#include \"../../model/" << className << ".hpp\"\n" result << "#include \"../../model/" << className << "_Impl.hpp\"\n\n" preamble = "" end end end return result end
Checks the objectList fields to see what we need to include
Apply to both FT and RT
Checks the objectList fields to see what we need to include Apply to both FT and RT
# Check for ObjectList fields, to see which we need to include # puts "#{field.name}: #{className}"
returns the include statements
returns the include statements
String