Beispiel #1
0
void Scheduler::scheduleAppointment(int time, std::string namePatient, std::string nameDoctor)
{
	if(testTime(time))
	{
		Appointment appointment = Appointment(time, Doctor(nameDoctor), Patient(namePatient));
	}
}
Beispiel #2
0
int Main(int argc, char *argv[])
{
    static const struct option options[] =
    {
	{ "help", no_argument, NULL, 'h' },
	{ "all", no_argument, NULL, 'a' },
	{ "frames", no_argument, NULL, 'f' },
    };

    int option_index;
    int option;
    while ((option = getopt_long(argc, argv, "hfa", options, &option_index))
	   != -1)
    {
	switch (option)
	{
	case 'h':
	    Usage(stdout);
	    return 0;
	case 'a':
	    s_all = true;
	    break;
	case 'f':
	    s_frames = true;
	    break;
	default:
	    Usage(stderr);
	    return 1;
	}
    }

    if (argc == optind)
    {
	Usage(stderr);
	return 1;
    }

    bool ok = true;
    for (int i = optind; i<argc; ++i)
    {
	unsigned rc = Doctor(argv[i]);
	ok &= (rc == 0);
    }

    return ok ? 0 : 1;
}