ARB
adExperiment.cxx
Go to the documentation of this file.
1 // =============================================================== //
2 // //
3 // File : adExperiment.cxx //
4 // Purpose : DB-access on experiments //
5 // //
6 // Coded by Ralf Westram (coder@reallysoft.de) in December 2008 //
7 // Institute of Microbiology (Technical University Munich) //
8 // http://www.arb-home.de/ //
9 // //
10 // =============================================================== //
11 
12 #include <arbdbt.h>
13 #include "gb_local.h"
14 
16  return GB_search(gb_species, "experiment_data", GB_CREATE_CONTAINER);
17 }
18 
19 GBDATA* EXP_find_experiment_rel_exp_data(GBDATA *gb_experiment_data, const char *name) {
20  return GBT_find_item_rel_item_data(gb_experiment_data, "name", name);
21 }
22 GBDATA* EXP_find_experiment(GBDATA *gb_species, const char *name) {
23  // search an experiment
24  // Note: If you know the experiment exists, use EXP_expect_experiment!
26 }
28  return GB_entry(gb_experiment_data, "experiment");
29 }
30 
31 GBDATA* EXP_next_experiment(GBDATA *gb_experiment) {
32  gb_assert(GB_has_key(gb_experiment, "experiment"));
33  return GB_nextEntry(gb_experiment);
34 }
35 
36 
37 GBDATA* EXP_find_or_create_experiment_rel_exp_data(GBDATA *gb_experiment_data, const char *name) {
38  // Search for a experiment, when experiment does not exist create it
39  return GBT_find_or_create_item_rel_item_data(gb_experiment_data, "experiment", "name", name, false);
40 }
41 
GBDATA * EXP_next_experiment(GBDATA *gb_experiment)
GBDATA * EXP_find_experiment(GBDATA *gb_species, const char *name)
GBDATA * GB_nextEntry(GBDATA *entry)
Definition: adquery.cxx:339
GBDATA * EXP_find_experiment_rel_exp_data(GBDATA *gb_experiment_data, const char *name)
GBDATA * EXP_get_experiment_data(GBDATA *gb_species)
GBDATA * EXP_find_or_create_experiment_rel_exp_data(GBDATA *gb_experiment_data, const char *name)
GBDATA * EXP_first_experiment_rel_exp_data(GBDATA *gb_experiment_data)
bool GB_has_key(GBDATA *gbd, const char *key)
Definition: arbdb.cxx:1707
#define gb_assert(cond)
Definition: arbdbt.h:11
GBDATA * GBT_find_item_rel_item_data(GBDATA *gb_item_data, const char *id_field, const char *id_value)
Definition: aditem.cxx:74
GBDATA * GB_search(GBDATA *gbd, const char *fieldpath, GB_TYPES create)
Definition: adquery.cxx:531
GBDATA * GBT_find_or_create_item_rel_item_data(GBDATA *gb_item_data, const char *itemname, const char *id_field, const char *id, bool markCreated)
Definition: aditem.cxx:18
GBDATA * GB_entry(GBDATA *father, const char *key)
Definition: adquery.cxx:334