Changeset 16731 for trunk/ippdb/src/ippdb.h
- Timestamp:
- Feb 28, 2008, 3:04:07 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/src/ippdb.h (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/src/ippdb.h
r16616 r16731 3921 3921 typedef struct { 3922 3922 psS64 warp_id; 3923 psS64 cam_id; 3923 3924 char *mode; 3924 3925 char *state; … … 3929 3930 char *end_stage; 3930 3931 psTime* registered; 3932 bool magiced; 3931 3933 } warpRunRow; 3932 3934 … … 3938 3940 warpRunRow *warpRunRowAlloc( 3939 3941 psS64 warp_id, 3942 psS64 cam_id, 3940 3943 const char *mode, 3941 3944 const char *state, … … 3945 3948 const char *tess_id, 3946 3949 const char *end_stage, 3947 psTime* registered 3950 psTime* registered, 3951 bool magiced 3948 3952 ); 3949 3953 … … 3976 3980 psDB *dbh, ///< Database handle 3977 3981 psS64 warp_id, 3982 psS64 cam_id, 3978 3983 const char *mode, 3979 3984 const char *state, … … 3983 3988 const char *tess_id, 3984 3989 const char *end_stage, 3985 psTime* registered 3990 psTime* registered, 3991 bool magiced 3986 3992 ); 3987 3993 … … 4131 4137 FILE *stream, ///< a stream 4132 4138 warpRunRow *object, ///< an warpRunRow object 4133 bool mdcf ///< format as mdconfig or simple4134 );4135 /** warpInputExpRow data structure4136 *4137 * Structure for representing a single row of warpInputExp table data.4138 */4139 4140 typedef struct {4141 psS64 warp_id;4142 psS64 cam_id;4143 bool magiced;4144 } warpInputExpRow;4145 4146 /** Creates a new warpInputExpRow object4147 *4148 * @return A new warpInputExpRow object or NULL on failure.4149 */4150 4151 warpInputExpRow *warpInputExpRowAlloc(4152 psS64 warp_id,4153 psS64 cam_id,4154 bool magiced4155 );4156 4157 /** Creates a new warpInputExp table4158 *4159 * @return true on success4160 */4161 4162 bool warpInputExpCreateTable(4163 psDB *dbh ///< Database handle4164 );4165 4166 /** Deletes a warpInputExp table4167 *4168 * @return true on success4169 */4170 4171 bool warpInputExpDropTable(4172 psDB *dbh ///< Database handle4173 );4174 4175 /** Insert a single row into a table4176 *4177 * This function constructs and inserts a single row based on it's parameters.4178 *4179 * @return true on success4180 */4181 4182 bool warpInputExpInsert(4183 psDB *dbh, ///< Database handle4184 psS64 warp_id,4185 psS64 cam_id,4186 bool magiced4187 );4188 4189 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.4190 *4191 * @return A The number of rows removed or a negative value on error4192 */4193 4194 long long warpInputExpDelete(4195 psDB *dbh, ///< Database handle4196 const psMetadata *where, ///< Row match criteria4197 unsigned long long limit ///< Maximum number of elements to delete4198 );4199 4200 /** Insert a single warpInputExpRow object into a table4201 *4202 * This function constructs and inserts a single row based on it's parameters.4203 *4204 * @return true on success4205 */4206 4207 bool warpInputExpInsertObject(4208 psDB *dbh, ///< Database handle4209 warpInputExpRow *object ///< warpInputExpRow object4210 );4211 4212 /** Insert an array of warpInputExpRow object into a table4213 *4214 * This function constructs and inserts multiple rows based on it's parameters.4215 *4216 * @return true on success4217 */4218 4219 bool warpInputExpInsertObjects(4220 psDB *dbh, ///< Database handle4221 psArray *objects ///< array of warpInputExpRow objects4222 );4223 4224 /** Insert data from a binary FITS table warpInputExpRow into the database4225 *4226 * This function expects a psFits object with a FITS table as the first4227 * extension. The table must have at least one row of data in it, that is of4228 * the appropriate format (number of columns and their type). All other4229 * extensions are ignored.4230 *4231 * @return true on success4232 */4233 4234 bool warpInputExpInsertFits(4235 psDB *dbh, ///< Database handle4236 const psFits *fits ///< psFits object4237 );4238 4239 /** Selects up to limit from the database and returns them in a binary FITS table4240 *4241 * This function assumes an empty psFits object and will create a FITS table4242 * as the first extension.4243 *4244 * See psDBSelectRows() for documentation on the format of where.4245 *4246 * @return true on success4247 */4248 4249 bool warpInputExpSelectRowsFits(4250 psDB *dbh, ///< Database handle4251 psFits *fits, ///< psFits object4252 const psMetadata *where, ///< Row match criteria4253 unsigned long long limit ///< Maximum number of elements to return4254 );4255 4256 /** Convert a warpInputExpRow into an equivalent psMetadata4257 *4258 * @return A psMetadata pointer or NULL on error4259 */4260 4261 psMetadata *warpInputExpMetadataFromObject(4262 const warpInputExpRow *object ///< fooRow to convert into a psMetadata4263 );4264 4265 /** Convert a psMetadata into an equivalent fooRow4266 *4267 * @return A warpInputExpRow pointer or NULL on error4268 */4269 4270 warpInputExpRow *warpInputExpObjectFromMetadata(4271 psMetadata *md ///< psMetadata to convert into a fooRow4272 );4273 /** Selects up to limit rows from the database and returns as warpInputExpRow objects in a psArray4274 *4275 * See psDBSelectRows() for documentation on the format of where.4276 *4277 * @return A psArray pointer or NULL on error4278 */4279 4280 psArray *warpInputExpSelectRowObjects(4281 psDB *dbh, ///< Database handle4282 const psMetadata *where, ///< Row match criteria4283 unsigned long long limit ///< Maximum number of elements to return4284 );4285 /** Deletes a row from the database coresponding to an warpInputExp4286 *4287 * Note that a 'where' search psMetadata is constructed from each object and4288 * used to find rows to delete.4289 *4290 * @return A The number of rows removed or a negative value on error4291 */4292 4293 bool warpInputExpDeleteObject(4294 psDB *dbh, ///< Database handle4295 const warpInputExpRow *object ///< Object to delete4296 );4297 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.4298 *4299 * Note that a 'where' search psMetadata is constructed from each object and4300 * used to find rows to delete.4301 *4302 * @return A The number of rows removed or a negative value on error4303 */4304 4305 long long warpInputExpDeleteRowObjects(4306 psDB *dbh, ///< Database handle4307 const psArray *objects, ///< Array of objects to delete4308 unsigned long long limit ///< Maximum number of elements to delete4309 );4310 /** Formats and prints an array of warpInputExpRow objects4311 *4312 * When mdcf is set the formated output is in psMetadataConfig4313 * format, otherwise it is in a simple tabular format.4314 *4315 * @return true on success4316 */4317 4318 bool warpInputExpPrintObjects(4319 FILE *stream, ///< a stream4320 psArray *objects, ///< An array of warpInputExpRow objects4321 bool mdcf ///< format as mdconfig or simple4322 );4323 /** Formats and prints an warpInputExpRow object4324 *4325 * When mdcf is set the formated output is in psMetadataConfig4326 * format, otherwise it is in a simple tabular format.4327 *4328 * @return true on success4329 */4330 4331 bool warpInputExpPrintObject(4332 FILE *stream, ///< a stream4333 warpInputExpRow *object, ///< an warpInputExpRow object4334 4139 bool mdcf ///< format as mdconfig or simple 4335 4140 ); … … 10959 10764 char *label; 10960 10765 char *stats; 10766 char *region; 10961 10767 } flatcorrRunRow; 10962 10768 … … 10973 10779 const char *workdir, 10974 10780 const char *label, 10975 const char *stats 10781 const char *stats, 10782 const char *region 10976 10783 ); 10977 10784 … … 11009 10816 const char *workdir, 11010 10817 const char *label, 11011 const char *stats 10818 const char *stats, 10819 const char *region 11012 10820 ); 11013 10821
Note:
See TracChangeset
for help on using the changeset viewer.
