src/energyplus/ReverseTranslator/ReverseTranslateOutputSQLite.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #include "../ReverseTranslator.hpp" | ||
| 7 | |||
| 8 | #include "../../model/OutputSQLite.hpp" | ||
| 9 | #include "../../model/OutputSQLite_Impl.hpp" | ||
| 10 | |||
| 11 | #include <utilities/idd/Output_SQLite_FieldEnums.hxx> | ||
| 12 | #include <utilities/idd/IddEnums.hxx> | ||
| 13 | |||
| 14 | using namespace openstudio::model; | ||
| 15 | |||
| 16 | namespace openstudio { | ||
| 17 | |||
| 18 | namespace energyplus { | ||
| 19 | |||
| 20 | 35 | boost::optional<ModelObject> ReverseTranslator::translateOutputSQLite(const WorkspaceObject& workspaceObject) { | |
| 21 | 35 | boost::optional<ModelObject> result; | |
| 22 | |||
| 23 | // This is a Unique ModelObject | ||
| 24 |
1/1✓ Branch 1 taken 35 times.
|
35 | openstudio::model::OutputSQLite modelObject = m_model.getUniqueModelObject<OutputSQLite>(); |
| 25 | |||
| 26 |
2/3✓ Branch 1 taken 35 times.
✓ Branch 3 taken 35 times.
✗ Branch 4 not taken.
|
70 | if (boost::optional<std::string> _optionType = workspaceObject.getString(Output_SQLiteFields::OptionType, true)) { |
| 27 |
2/2✓ Branch 1 taken 35 times.
✓ Branch 4 taken 35 times.
|
35 | modelObject.setOptionType(_optionType.get()); |
| 28 | 35 | } | |
| 29 | |||
| 30 | 35 | if (boost::optional<std::string> _unitConversionforTabularData = | |
| 31 |
2/3✓ Branch 1 taken 35 times.
✓ Branch 3 taken 35 times.
✗ Branch 4 not taken.
|
70 | workspaceObject.getString(Output_SQLiteFields::UnitConversionforTabularData, true)) { |
| 32 |
2/2✓ Branch 1 taken 35 times.
✓ Branch 4 taken 35 times.
|
35 | modelObject.setUnitConversionforTabularData(_unitConversionforTabularData.get()); |
| 33 | 35 | } | |
| 34 | |||
| 35 |
1/1✓ Branch 1 taken 35 times.
|
35 | result = modelObject; |
| 36 | 70 | return result; | |
| 37 | |||
| 38 | 35 | } // End of translate function | |
| 39 | |||
| 40 | } // end namespace energyplus | ||
| 41 | } // end namespace openstudio | ||
| 42 |