MCPcopy Create free account
hub / github.com/apache/arrow / garrow_round_temporal_options_class_init

Function garrow_round_temporal_options_class_init

c_glib/arrow-glib/compute.cpp:9499–9598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9497}
9498
9499static void
9500garrow_round_temporal_options_class_init(GArrowRoundTemporalOptionsClass *klass)
9501{
9502 auto gobject_class = G_OBJECT_CLASS(klass);
9503
9504 gobject_class->set_property = garrow_round_temporal_options_set_property;
9505 gobject_class->get_property = garrow_round_temporal_options_get_property;
9506
9507 arrow::compute::RoundTemporalOptions options;
9508
9509 GParamSpec *spec;
9510 /**
9511 * GArrowRoundTemporalOptions:multiple:
9512 *
9513 * Number of units to round to.
9514 *
9515 * Since: 23.0.0
9516 */
9517 spec = g_param_spec_int("multiple",
9518 "Multiple",
9519 "Number of units to round to",
9520 G_MININT,
9521 G_MAXINT,
9522 options.multiple,
9523 static_cast<GParamFlags>(G_PARAM_READWRITE));
9524 g_object_class_install_property(gobject_class,
9525 PROP_ROUND_TEMPORAL_OPTIONS_MULTIPLE,
9526 spec);
9527
9528 /**
9529 * GArrowRoundTemporalOptions:unit:
9530 *
9531 * The unit used for rounding of time.
9532 *
9533 * Since: 23.0.0
9534 */
9535 spec = g_param_spec_enum("unit",
9536 "Unit",
9537 "The unit used for rounding of time",
9538 GARROW_TYPE_CALENDAR_UNIT,
9539 static_cast<GArrowCalendarUnit>(options.unit),
9540 static_cast<GParamFlags>(G_PARAM_READWRITE));
9541 g_object_class_install_property(gobject_class, PROP_ROUND_TEMPORAL_OPTIONS_UNIT, spec);
9542
9543 /**
9544 * GArrowRoundTemporalOptions:week-starts-monday:
9545 *
9546 * What day does the week start with (Monday=true, Sunday=false).
9547 *
9548 * Since: 23.0.0
9549 */
9550 spec =
9551 g_param_spec_boolean("week-starts-monday",
9552 "Week starts Monday",
9553 "What day does the week start with (Monday=true, Sunday=false)",
9554 options.week_starts_monday,
9555 static_cast<GParamFlags>(G_PARAM_READWRITE));
9556 g_object_class_install_property(gobject_class,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected