NatLabRockies / NatLabRockies/OpenStudio

Port all of our model code to use getBooleanFieldValue / setBooleanFieldValue

Open
#4,603 0 comments 0 reactions 1 assignee View on GitHub

@jmarrec is already working on this.

Since Nov 30, 2022.

Developer Issue Enhancement Request
Dominant language
C++
Stars
646
Forks
237
Avg merge
3d 11h
Merged PRs (30d)
10

Description

Enhancement Request

We have getBooleanFieldValue / setBooleanFieldValue helpers available, yet very few files use that. So we a bunch of lines of codes that could be greatly reduced while improving readability. 2 lines saved for a getter, 7 for a setter

We also need to update the GenerateClass.rb script.

Detailed Description

Example:
https://github.com/NREL/OpenStudio/blob/f7b7f88e743e15a9e934e8109af8e61784e8b2cb/src/model/ShadingControl.cpp#L200-L204

https://github.com/NREL/OpenStudio/blob/f7b7f88e743e15a9e934e8109af8e61784e8b2cb/src/model/ShadingControl.cpp#L341-L350

https://github.com/NREL/OpenStudio/blob/f7b7f88e743e15a9e934e8109af8e61784e8b2cb/src/model/ModelObject.cpp#L641-L667

Possible Implementation

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.