示例#1
0
static const cEvent *findEvent(cSchedulesLock &lock, jobject nativeServiceData, int eventID) {
   const cSchedule *schedule=getSchedule(lock, nativeServiceData);
   if (schedule) {
      return schedule->GetEvent(eventID);
   } else
      return 0;
}
示例#2
0
jboolean Java_javax_tv_service_guide_VDRProgramSchedule_event(JNIEnv* env, jobject obj, jobject nativeServiceData, jint eventID, jobject builder) {
   cSchedulesLock lock;
   const cSchedule *schedule=getSchedule(lock, nativeServiceData);
   if (schedule) {
      return addEvent(schedule->GetEvent(eventID), builder);
   } else
      return JNI_FALSE;
}
示例#3
0
// all time values in seconds
jboolean Java_javax_tv_service_guide_VDRProgramSchedule_currentEvent(JNIEnv* env, jobject obj, jobject nativeServiceData, jobject builder) {
   cSchedulesLock lock;
   const cSchedule *schedule=getSchedule(lock, nativeServiceData);
   printf("currentEvent: schedule %p, present event %p\n", schedule, schedule->GetPresentEvent());
   if (schedule) {
      return addEvent(schedule->GetPresentEvent(), builder);
   } else
      return JNI_FALSE;
}
void AddEmployeeTransaction::execute()
{
	PaymentClassification* pc = getClassification();
	PaymentSchedule* ps = getSchedule();
	PaymentMethod* pm = new HoldMethod();
	Employee* e = new Employee(mEmpid, mName, mAddress);
	e->setClassification(pc);
	e->setSchedule(ps);
	e->setMethod(pm);
	gPayrollDatabase.addEmployee(mEmpid, e);
}
示例#5
0
/* Gets the schedule for the core with index 'core_index' at time 'time'
 * in the current global TDMA schedule. */
core_sched_p getCoreSchedule( uint core_index, ull time )
{
  const sched_p glob_sched = getSchedule();
  assert(glob_sched && core_index < glob_sched->n_cores &&
      "Internal error: Invalid data structures!" );

  /* Find the proper segment for start time in case there are
   * multiple segments present in the full bus schedule */
  segment_p cur_seg = ( glob_sched->type != SCHED_TYPE_1 )
    ? find_segment( glob_sched->seg_list, glob_sched->n_segments, time )
    : glob_sched->seg_list[0];
  /* Return the correct schedule entry. */
  const core_sched_p core_schedule = cur_seg->per_core_sched[core_index];
  assert(core_schedule && "Internal error: Invalid data structures!" );
  return core_schedule;
}
示例#6
0
jboolean Java_javax_tv_service_guide_VDRProgramSchedule_futureEvents(JNIEnv* env, jobject obj, jobject nativeServiceData, jlong begin, jlong end, jobject builder) {
   cSchedulesLock lock;
   const cSchedule *schedule=getSchedule(lock, nativeServiceData);
   jboolean success=JNI_FALSE;
   if (schedule) {
      const cList<cEvent> *events=schedule->Events();
      for (cEvent *event = events->First(); event; event = events->Next(event)) {
         if ( (event->StartTime() >= begin && event->StartTime() < end)
               || (event->EndTime() >= begin && event->EndTime() <= end) ) {
            if (addEvent(event, builder))
               success=JNI_TRUE;
         }
      }
   }
   return success;
}
示例#7
0
TEST_F(PacksTests, test_schedule) {
  auto fpack = Pack("foobar", getPackWithDiscovery());
  EXPECT_EQ(fpack.getSchedule().size(), 1U);
}
示例#8
0
TEST_F(PacksTests, test_schedule) {
  auto fpack = Pack("discovery_pack", getPackWithDiscovery());
  // Expect a single query in the schedule since one query has an explicit
  // invalid/fake platform requirement.
  EXPECT_EQ(fpack.getSchedule().size(), 1U);
}
示例#9
0
// [[Rcpp::export]]
Rcpp::DateVector CreateSchedule(Rcpp::List params) {

    QuantLib::Schedule schedule = getSchedule(params);
    return Rcpp::wrap(schedule.dates());
}