Trying to understand this line of code

I have this line of code here:

1
2
3
   m_delayOn( new GallatinCore::SettingValue( DelayOnStr, CommonJobData::DELAY_DEFAULT,
 CommonJobData::DELAY_DEFAULT, CommonJobData::DELAY_MIN, CommonJobData::DELAY_MAX, "s",
 unitsPlugin, CommonJobData::DELAY_STEP) )


and I am trying to figure out what's happening. I realize this is not a lot to go on but perhaps someone could tell me if these Settings: DelayOnStr, UnitsPlug, etc would be accessible?

For instance, could I print their values? Something like:

print(m_delayOn(unitsPlugin))

your best guesses as to whats happening is all I am looking for.


Last edited on
you should be able to print any of those values at this scope, directly:
cout << unitsPlugin; //depends on what this is. if cout can print it, it will. if its an object, you may have to do more, like cout<<unitsPlugin.field or cout<<unitsPlugin.getfield() or something.

if m_delayOn is a type and this is a constructor for it, it depends on the m_delayOn class type what you can and cannot access or print. I would just try to print them up one level as I showed you above.

You can also see what they are in your debugger? And some of them may even have an IDE mouse-over value, eg if delay_step is a constant it may know just with a drive-by look.
Last edited on
What if I wanted to reach it from outside of this scope? For instance I want to access the variable s to check and see if that is a properties of the current implement I am working with so that I can control if a push button can be seen by the user. So when I write:


enabled: presentationManager.settingsPresenter.currentSelectedImplement.propertiesForImplement.m_delayOn === true

it is definitely disabling the button so I know that writing:

presentationManager.settingsPresenter.currentSelectedImplement.propertiesForImplement.m_delayOn

is the correct way to access m_delayOn from outside of the class but I can't figure out how to access those inner SettingsValue's. What I want to say is something like:

enabled: presentationManager.settingsPresenter.currentSelectedImplement.propertiesForImplement.m_delayOn.SettingsValue === "s"

or something along those lines. I hope that makes sense.
Last edited on
never mind I figure out how to do this in a different way thanks guys!
Topic archived. No new replies allowed.