コード例 #1
0
UpdateSpec	InstrumentPropertyTableAdapter::object_to_updatespec(
    const InstrumentPropertyRecord& record) {
    UpdateSpec	spec;
    FieldValueFactory	factory;
    spec.insert(Field("instrument", factory.get(record.instrument())));
    spec.insert(Field("property", factory.get(record.property())));
    spec.insert(Field("value", factory.get(record.value())));
    spec.insert(Field("description", factory.get(record.description())));
    return spec;
}
コード例 #2
0
UpdateSpec	ImageTableAdapter::object_to_updatespec(const ImageInfoRecord& imageinfo) {
	UpdateSpec	spec;
	FieldValueFactory	factory;
	spec.insert(Field("filename", factory.get(imageinfo.filename)));
	spec.insert(Field("filesize", factory.get(imageinfo.filesize)));
	spec.insert(Field("created", factory.getTime(imageinfo.created)));
	spec.insert(Field("width", factory.get(imageinfo.width)));
	spec.insert(Field("height", factory.get(imageinfo.height)));
	return spec;
}
コード例 #3
0
UpdateSpec	ImageAttributeAdapter::object_to_updatespec(
	const ImageAttributeRecord& imageattribute) {
	UpdateSpec	spec;
	FieldValueFactory	factory;
	spec.insert(Field("image", factory.get(imageattribute.ref())));
	spec.insert(Field("attribute", factory.get(imageattribute.name)));
	spec.insert(Field("value", factory.get(imageattribute.value)));
	spec.insert(Field("comment", factory.get(imageattribute.comment)));
	return spec;
}
コード例 #4
0
UpdateSpec	ProjectTableAdapter::object_to_updatespec(const ProjectRecord& project) {
	UpdateSpec	spec;
	FieldValueFactory	factory;
	spec.insert(Field("name", factory.get(project.name)));
	spec.insert(Field("description", factory.get(project.description)));
	spec.insert(Field("object", factory.get(project.object)));
	spec.insert(Field("started", factory.getTime(project.started)));
	spec.insert(Field("repository", factory.get(project.repository)));
	return spec;
}
コード例 #5
0
UpdateSpec	ConfigurationTableAdapter::object_to_updatespec(
    const ConfigurationRecord& configrec) {
    UpdateSpec	spec;
    FieldValueFactory	factory;
    spec.insert(Field("domain", factory.get(configrec.domain)));
    spec.insert(Field("section", factory.get(configrec.section)));
    spec.insert(Field("name", factory.get(configrec.name)));
    spec.insert(Field("value", factory.get(configrec.value)));
    return spec;
}
コード例 #6
0
UpdateSpec	CalibrationPointTableAdapter::object_to_updatespec(const CalibrationPointRecord& point) {
	UpdateSpec	spec;
	FieldValueFactory	factory;
	spec.insert(Field("calibration", factory.get(point.ref())));
	spec.insert(Field("t", factory.get(point.t)));
	spec.insert(Field("ra", factory.get(point.offset.x())));
	spec.insert(Field("dec", factory.get(point.offset.y())));
	spec.insert(Field("x", factory.get(point.star.x())));
	spec.insert(Field("y", factory.get(point.star.y())));
	return spec;
}
コード例 #7
0
/**
 * \brief Convert an object to an update specification
 */
UpdateSpec	InstrumentComponentTableAdapter::object_to_updatespec(
			const InstrumentComponentRecord& component) {
	UpdateSpec	spec;
	FieldValueFactory	factory;
	spec.insert(Field("name", factory.get(component.name())));
	spec.insert(Field("type", factory.get(component.type())));
	spec.insert(Field("idx", factory.get(component.index())));
	spec.insert(Field("servicename", factory.get(component.servicename())));
	spec.insert(Field("deviceurl", factory.get(component.deviceurl())));
	return spec;
}
コード例 #8
0
UpdateSpec	CalibrationTableAdapter::object_to_updatespec(const CalibrationRecord& calibration) {
	UpdateSpec	spec;
	FieldValueFactory	factory;
	spec.insert(Field("camera", factory.get(calibration.camera)));
	spec.insert(Field("ccdid", factory.get(calibration.ccdid)));
	spec.insert(Field("guiderport", factory.get(calibration.guiderport)));
	spec.insert(Field("whenstarted", factory.getTime(calibration.when)));
	spec.insert(Field("a0", factory.get(calibration.a[0])));
	spec.insert(Field("a1", factory.get(calibration.a[1])));
	spec.insert(Field("a2", factory.get(calibration.a[2])));
	spec.insert(Field("a3", factory.get(calibration.a[3])));
	spec.insert(Field("a4", factory.get(calibration.a[4])));
	spec.insert(Field("a5", factory.get(calibration.a[5])));
	return spec;
}
コード例 #9
0
UpdateSpec	CalibrationTableAdapter::object_to_updatespec(const CalibrationRecord& calibration) {
	UpdateSpec	spec;
	FieldValueFactory	factory;
	spec.insert(Field("name", factory.get(calibration.name)));
	spec.insert(Field("instrument", factory.get(calibration.instrument)));
	spec.insert(Field("ccd", factory.get(calibration.ccd)));
	spec.insert(Field("controldevice", factory.get(calibration.controldevice)));
	spec.insert(Field("whenstarted", factory.getTime(calibration.when)));
	spec.insert(Field("a0", factory.get(calibration.a[0])));
	spec.insert(Field("a1", factory.get(calibration.a[1])));
	spec.insert(Field("a2", factory.get(calibration.a[2])));
	spec.insert(Field("a3", factory.get(calibration.a[3])));
	spec.insert(Field("a4", factory.get(calibration.a[4])));
	spec.insert(Field("a5", factory.get(calibration.a[5])));
	spec.insert(Field("quality", factory.get(calibration.quality)));
	spec.insert(Field("det", factory.get(calibration.det)));
	spec.insert(Field("complete", factory.get(calibration.complete)));
	spec.insert(Field("focallength", factory.get(calibration.focallength)));
	spec.insert(Field("masperpixel", factory.get(calibration.masPerPixel)));
	spec.insert(Field("controltype", factory.get(calibration.controltype)));
	return spec;
}
コード例 #10
0
UpdateSpec	PartTableAdapter::object_to_updatespec(const PartRecord& part) {
	UpdateSpec	spec;
	FieldValueFactory	factory;
	spec.insert(Field("project", factory.get(part.projectid())));
	spec.insert(Field("partno", factory.get(part.partno)));
	spec.insert(Field("instrument", factory.get(part.instrument)));
	spec.insert(Field("width", factory.get(part.width)));
	spec.insert(Field("height", factory.get(part.height)));
	spec.insert(Field("xoffset", factory.get(part.xoffset)));
	spec.insert(Field("yoffset", factory.get(part.yoffset)));
	spec.insert(Field("exposuretime", factory.get(part.exposuretime)));
	spec.insert(Field("gain", factory.get(part.gain)));
	spec.insert(Field("vlimit", factory.get(part.limit)));
	spec.insert(Field("binx", factory.get(part.binx)));
	spec.insert(Field("biny", factory.get(part.biny)));
	spec.insert(Field("shutter", factory.get(part.shutter)));
	spec.insert(Field("purpose", factory.get(part.purpose)));
	spec.insert(Field("filtername", factory.get(part.filtername)));
	spec.insert(Field("temperature", factory.get(part.temperature)));
	spec.insert(Field("taskserver", factory.get(part.taskserver)));
	spec.insert(Field("task", factory.get(part.taskid)));
	spec.insert(Field("repoid", factory.get(part.repoid)));
	return spec;
}