Пример #1
0
void TCuePosition::Outline(BRect outline)
{
	// Use the rect for the four corners
	Corner1(outline.LeftTop());
	Corner2(outline.RightTop());
	Corner3(outline.RightBottom());
	Corner4(outline.LeftBottom());

	// Set the registration in the center
	BPoint center(outline.left + outline.Width() / 2, outline.top +
			outline.Height() / 2);
	Registration(center);
}
Пример #2
0
void InsertRegistration::go()
{
    string ID = getStuIDFromInput();
    db.doQueryStudent(ID);

    string code = getCodeFromInput();
    db.doQueryCourse(code);

    if(db.doInsertRegistration(Registration(ID, code, NA_EXAM_MARK)))
        cout << "Creation of course record successful" << endl << endl;
    else
        cout << "The registration already exists" << endl << endl;
    return;
}
    (*pvar_func_asSub)();
    (*pvar_func_connRegister)();
    iocshRegisterVariable(vardefs);
    return 0;
}

/* registerRecordDeviceDriver */
static const iocshArg registerRecordDeviceDriverArg0 =
                                            {"pdbbase",iocshArgPdbbase};
static const iocshArg *registerRecordDeviceDriverArgs[1] =
                                            {&registerRecordDeviceDriverArg0};
static const iocshFuncDef registerRecordDeviceDriverFuncDef =
                {"BPM_registerRecordDeviceDriver",1,registerRecordDeviceDriverArgs};
static void registerRecordDeviceDriverCallFunc(const iocshArgBuf *)
{
    BPM_registerRecordDeviceDriver(*iocshPpdbbase);
}

} // extern "C"
/*
 * Register commands on application startup
 */
static int Registration() {
    iocshRegisterCommon();
    iocshRegister(&registerRecordDeviceDriverFuncDef,
        registerRecordDeviceDriverCallFunc);
    return 0;
}

static int done = Registration();