GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 7 / 0 / 7
Functions: 100.0% 1 / 0 / 1
Branches: 100.0% 7 / 0 / 7

src/energyplus/ForwardTranslator/ForwardTranslateAvailabilityManagerScheduledOff.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 "../ForwardTranslator.hpp"
7 #include "../../model/AvailabilityManagerScheduledOff.hpp"
8 #include "../../model/Node.hpp"
9 #include "../../model/Schedule.hpp"
10 #include <utilities/idd/AvailabilityManager_ScheduledOff_FieldEnums.hxx>
11 #include <utilities/idd/IddEnums.hxx>
12
13 using namespace openstudio::model;
14
15 namespace openstudio {
16
17 namespace energyplus {
18
19 2 boost::optional<IdfObject> ForwardTranslator::translateAvailabilityManagerScheduledOff(AvailabilityManagerScheduledOff& modelObject) {
20
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 IdfObject idfObject = createRegisterAndNameIdfObject(IddObjectType::AvailabilityManager_ScheduledOff, modelObject);
21
22 // Schedule
23 {
24
1/1
✓ Branch 1 taken 2 times.
2 Schedule sch = modelObject.schedule();
25
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
2 idfObject.setString(AvailabilityManager_ScheduledOffFields::ScheduleName, sch.name().get());
26 2 }
27
1/1
✓ Branch 1 taken 2 times.
4 return idfObject;
28 2 }
29
30 } // namespace energyplus
31 } // namespace openstudio
32