I believe the only difference between a struct and a class in C++ is that
class members are private by default.  So, "class foo { public: ... " is
equivalent to "struct foo { ...", if I understand correctly.   However, I'm
only "intermediate" at C++, so someone please correct me if I'm wrong or
incomplete.

- Julius


On Thu, Sep 30, 2021 at 5:47 PM Steven Kraninger <skranin...@gmail.com>
wrote:

> Hi,
>
> Kind of a technical question, but I am wondering why a "struct" was used
> instead of a class to compose the juce::AudioParameterFloat and the
> uiOwnedItem?
>
> In the following code:
>
> struct FaustPlugInAudioParameterFloat : public juce::AudioParameterFloat,
> public uiOwnedItem {
>     FaustPlugInAudioParameterFloat(GUI* gui, FAUSTFLOAT* zone, const
> std::string& path, const std::string& label, FAUSTFLOAT init, FAUSTFLOAT
> min, FAUSTFLOAT max, FAUSTFLOAT step)
>     :juce::AudioParameterFloat(path, label, float(min), float(max),
> float(init)), uiOwnedItem(gui, zone)
> {}
>
> I would like to modify this a bit to accept a "skew" factor that could be
> passed into the juce "range" object (part of the AudioParameterFloat).
> Currently the min, max, and step are being passed as the  start, end, and
> interval.
>
> It seems like a class could have other initializers that could be called
> when creating a new FaustPluginAudioParameterFloat (not sure of the struct
> syntax)?
>
> Thanks
> Steven Kraninger
> _______________________________________________
> Faudiostream-users mailing list
> Faudiostream-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/faudiostream-users
>


-- 
"Anybody who knows all about nothing knows everything" -- Leonard Susskind
_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to