Class: BTAP::EQuest::DOECommandFactory
- Inherits:
-
Object
- Object
- BTAP::EQuest::DOECommandFactory
- Defined in:
- lib/openstudio-standards/btap/equest.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ DOECommandFactory
constructor
A new instance of DOECommandFactory.
Constructor Details
#initialize ⇒ DOECommandFactory
Returns a new instance of DOECommandFactory.
1927 1928 1929 |
# File 'lib/openstudio-standards/btap/equest.rb', line 1927 def initialize end |
Class Method Details
.command_factory(command_string, building) ⇒ Object
1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 |
# File 'lib/openstudio-standards/btap/equest.rb', line 1931 def DOECommandFactory.command_factory(command_string, building) command = "" command_name = "" if (command_string != "") #Get command and u-value if ( command_string.match(/(^\s*(\".*?\")\s*\=\s*(\S+)\s*)/) ) command_name=$3.strip else # if no u-value, get just the command. command_string.match(/(^\s*(\S*)\s)/ ) @command_name=$2.strip end end case command_name when "ZONE" then command = DOEZone.new() when "FLOOR" then command = DOEFloor.new() when "SPACE" then command = DOESpace.new() when "EXTERIOR-WALL" then command = DOEExteriorWall.new() when "INTERIOR-WALL" then command = DOESurface.new() when "UNDERGROUND-WALL" then command = DOESurface.new() when "ROOF" then command = DOERoof.new() when "WINDOW" then command = DOESubSurface.new() when "DOOR" then command = DOESubSurface.new() when "POLYGON" then command = DOEPolygon.new() when "LAYER" then command = DOELayer.new() when "MATERIAL" then command = DOEMaterial.new() when "CONSTRUCTION" then command = DOEConstruction.new() else command = DOECommand.new() end command.get_command_from_string(command_string) command.building = building return command end |