Hi Dave,
Thanks for the reply. Your second assumption is closest. Instances of ScheduledOSCalls manage instances of ScheduledOSCall, determines when the call should be made and then tells ScheduledOSCall to make the call because it has the command, can rescheduled itself and save the result. So, I think I'm going to go with ScheduledOSCallMgr as its new name.
I am a little busy at the moment but I should post the code soon. Is a zip of a fileout of both classes okay?
Lou
On Wed, Feb 20, 2013 at 10:45:37AM -0500, Louis LaBrunda wrote:
Hey Dave,
I'm close to being ready to give you my code but first one last question (hopefully). There are two classes:
ScheduledOSCall -- Instances of this class hold the command to be run and the time and frequency to run it.
ScheduledOSCalls -- Instances of this class hold groups of instances of ScheduledOSCall.
I'm not pleased with these names, especially ScheduledOSCalls because it's name only vaguely refers to its function. I would love a better name for ScheduledOSCalls and I'm open to a better name for ScheduledOSCall. Please give it some thought and help me out with better names.
Hi Lou,
My thought for naming would be to think in terms of the responsibilities of the ScheduledOSCalls class. I expect that it is more that just a collection of ScheduledOSCall instances (otherwise you might have just used an ordinary collection).
I would guess that in addition to knowing about the instances of ScheduledOSCall, it might have responsibities along the lines of one of these two possibilities:
- Using the collection of ScheduledOSCall instances, tell me the next OS
command to be evaluated, and what duration to wait before doing so. Or you might have it wait until the next OS command is due to be run (blocking on a Semaphore or Delay), then answer the next OS command to be evaluated. With these kinds responsibilities, the class would behave like a stream of next-up commands to be evaluated, so you might give it a name such as ScheduledJobQueue or OSCallQueue.
- Alternatively, you might have given your ScheduledOSCalls class the
responsibility for actually executing the various commands at their scheduled times. It would know about the instances of ScheduledOSCall, and it would be resposible for executing the scheduled OS commands at the appropriate times. In that case, you might choose to give it a name such as OSCallScheduler.
HTH, Dave
----------------------------------------------------------- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com