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