glideapps / glideapps/quicktype
License for Generated C++ with "Helper" Code
- Dominant language
- TypeScript
- Stars
- 13.9k
- Forks
- 1.2k
- Avg merge
- 8h 53m
- Merged PRs (30d)
- 369
Description
The quicktype documentation seems to indicate that it is an appropriate tool for generating code for commercial purposes, and I recall seeing somewhere that generated code is not considered derivative work (similarly to how the output of a compiler isn't considered derivative of the compiler). However, when generating C++ code with quicktype there are generally helper functions and/or classes generated alongside the "converted" data structures. Here's an example:
```cpp
inline void CheckConstraint(const std::string& name, const ClassMemberConstraints& c, int64_t value)
{
if (c.getMinIntValue() != boost::none && value < *c.getMinIntValue())
{
throw ValueTooLowException("Value too low for " + name + " (" + std::to_string(value) + "<" +
std::to_string(*c.getMinIntValue()) + ")");
}
if (c.getMaxIntValue() != boost::none && value > *c.getMaxIntValue())
{
throw ValueTooHighException("Value too high for " + name + " (" + std::to_string(value) + ">" +
std::to_string(*c.getMaxIntValue()) + ")");
}
}
```
Crucially, these helper functions do not appear to be dependent on the input data at all, except to determine which subset of the entire helper "suite" is included.
Would you please add clarifying language somewhere to indicate whether these helper functions are considered derivative work of quicktype itself?
Contributor guide
Assessment
This issue has not been assessed yet.