openframeworks / openframeworks/openFrameworks

ofParameter<CustomType> enabling Serializing - comments/documentation needed

Open
#6,739 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

There's some code here which defines which types can and can't be 'loaded' and 'saved'

https://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworks/types/ofParameter.h#L420-L473

For my own type which implements

ostream& operator<<(ostream& stream, const ofxCvGui::BaseEnum& value);
istream& operator>>(istream& stream, ofxCvGui::BaseEnum& value);

This doesn't seem to work (note that I'm using inheritance)

The code itself in ofParameter is very opaque, and I suggest adding some brief comments to the source here saying how it does (and doesn't) work.

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.

Research direction

Start with libs/openFrameworks/types/ofParameter.h, especially lines 420-473, and read how the load/save type checks relate to the shown stream operators and inherited custom type. Add brief source comments that clarify which types are supported and how this mechanism does or does not work. Done means the serialization behavior is understandable from the code without relying on opaque template logic.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.