Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
Go to the documentation of this file.
8 #ifndef SERVICES_FIELD_TRIALS_INCLUDE_BASE_ROW_H_
9 #define SERVICES_FIELD_TRIALS_INCLUDE_BASE_ROW_H_
12 #include "bson/bson.h"
92 #ifndef DOXYGEN_SHOULD_SKIP_THIS
94 #ifdef ALLOCATE_BASE_ROW_TAGS
95 #define BASE_ROW_PREFIX DFW_FIELD_TRIAL_SERVICE_API
96 #define BASE_ROW_VAL(x) = x
97 #define BASE_ROW_CONCAT_VAL(x,y) = x y
99 #define BASE_ROW_PREFIX extern
100 #define BASE_ROW_VAL(x)
101 #define BASE_ROW_CONCAT_VAL(x,y)
109 BASE_ROW_PREFIX
const char *RO_ID_S
BASE_ROW_VAL (
"id");
111 BASE_ROW_PREFIX
const char *RO_STUDY_INDEX_S
BASE_ROW_VAL (
"study_index");
113 BASE_ROW_PREFIX
const char *RO_PLOT_ID_S
BASE_ROW_VAL (
"plot_id");
115 BASE_ROW_PREFIX
const char *RO_STUDY_ID_S
BASE_ROW_VAL (
"study_id");
117 BASE_ROW_PREFIX
const char *RO_DISCARD_S
BASE_ROW_VAL (
"discard");
120 BASE_ROW_PREFIX
const char *RO_BLANK_S
BASE_ROW_VAL (
"blank");
123 BASE_ROW_PREFIX
const char *RO_ROW_TYPE_S
BASE_ROW_VAL (
"row_type");
141 void (*clear_fn) (
Row *row_p),
144 bool (*add_to_fd_fn) (
const Row *row_p, json_t *row_fd_p,
const FieldTrialServiceData *service_data_p,
const char *
const null_sequence_s));
148 void (*clear_fn) (
Row *row_p),
151 bool (*add_to_fd_fn) (
const Row *row_p, json_t *row_fd_p,
const FieldTrialServiceData *service_data_p,
const char *
const null_sequence_s));
195 void (*clear_fn) (
Row *row_p),
198 bool (*add_to_fd_fn) (
const Row *row_p, json_t *row_fd_p,
const FieldTrialServiceData *service_data_p,
const char *
const null_sequence_s));
The number of different values that a RowType can take.
Definition: row.h:47
void SetRowType(Row *row_p, RowType rt)
void FreeRowNode(ListItem *node_p)
const BASE_ROW_PREFIX char *RO_ID_S BASE_ROW_VAL("id")
bool(* ro_add_to_json_fn)(const Row *row_p, json_t *row_json_p, const ViewFormat format, const FieldTrialServiceData *data_p)
Definition: row.h:72
Definition: json_processor.h:21
bool(* ro_add_to_fd_fn)(const Row *row_p, json_t *row_fd_p, const FieldTrialServiceData *service_data_p, const char *const null_sequence_s)
Definition: row.h:76
bool AddRowToJSON(const Row *row_p, json_t *row_json_p, const ViewFormat format, const FieldTrialServiceData *data_p)
const char * GetRowTypeAsString(const RowType rt)
A physical plot where no measurements are taken, just there as a physical spacer which will appear in...
Definition: row.h:35
#define DFW_FIELD_TRIAL_SERVICE_LOCAL
Definition: dfw_field_trial_service_library.h:43
RowNode * AllocateRowNode(Row *row_p)
Row * AllocateBaseRow(bson_oid_t *id_p, const uint32 study_index, Plot *parent_plot_p, RowType rt, void(*clear_fn)(Row *row_p), bool(*add_to_json_fn)(const Row *row_p, json_t *row_json_p, const ViewFormat format, const FieldTrialServiceData *data_p), bool(*add_from_json_fn)(Row *row_p, const json_t *row_json_p, const FieldTrialServiceData *data_p), bool(*add_to_fd_fn)(const Row *row_p, json_t *row_fd_p, const FieldTrialServiceData *service_data_p, const char *const null_sequence_s))
RowType
Definition: row.h:24
struct Plot * ro_plot_p
Definition: row.h:62
bool SetRowTypeFromJSON(RowType *rt_p, const json_t *row_json_p)
bool SetRowTypeFromString(RowType *rt_p, const char *value_s)
void SetRowCallbackFunctions(Row *row_p, void(*clear_fn)(Row *row_p), bool(*add_to_json_fn)(const Row *row_p, json_t *row_json_p, const ViewFormat format, const FieldTrialServiceData *data_p), bool(*add_from_json_fn)(Row *row_p, const json_t *row_json_p, const FieldTrialServiceData *data_p), bool(*add_to_fd_fn)(const Row *row_p, json_t *row_fd_p, const FieldTrialServiceData *service_data_p, const char *const null_sequence_s))
uint32 ro_by_study_index
The unique index for this row within its parent study.
Definition: row.h:68
const struct Study * ro_study_p
Definition: row.h:60
A normal plot which is part of an experiment.
Definition: row.h:29
bool PopulateRowFromJSON(Row *row_p, Plot *plot_p, const json_t *row_json_p, const ViewFormat format, FieldTrialServiceData *data_p)
bool InitRow(Row *row_p, bson_oid_t *id_p, const uint32 study_index, Plot *parent_plot_p, RowType rt, void(*clear_fn)(Row *row_p), bool(*add_to_json_fn)(const Row *row_p, json_t *row_json_p, const ViewFormat format, const FieldTrialServiceData *data_p), bool(*add_from_json_fn)(Row *row_p, const json_t *row_json_p, const FieldTrialServiceData *data_p), bool(*add_to_fd_fn)(const Row *row_p, json_t *row_fd_p, const FieldTrialServiceData *service_data_p, const char *const null_sequence_s))
RowType ro_type
Definition: row.h:56
bool(* ro_add_from_json_fn)(Row *row_p, const json_t *row_json_p, const FieldTrialServiceData *data_p)
Definition: row.h:74
void(* ro_clear_fn)(Row *row_p)
Definition: row.h:70
Row * GetRowFromJSON(const json_t *json_p, Plot *plot_p, const Study *study_p, const ViewFormat format, FieldTrialServiceData *data_p)
RowType GetRowType(const Row *row_p)
The configuration data used by the DFW Field Trial Service.
Definition: dfw_field_trial_service_data.h:118
Row * AllocateDiscardRow(bson_oid_t *id_p, const uint32 study_index, Plot *parent_plot_p)
ListItem rn_node
Definition: row.h:84
bson_oid_t * ro_id_p
Definition: row.h:58
json_t * GetRowAsJSON(const Row *row_p, const ViewFormat format, JSONProcessor *processor_p, const FieldTrialServiceData *data_p)
void ClearRow(Row *row_p)
Row * rn_row_p
Definition: row.h:86
Used to keep the stylised view when laying out the plots and you have non-regular gaps.
Definition: row.h:42
A doubly-linked node that points to its predecessor and successor.
Definition: linked_list.h:43