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

Function garrow_pad_options_class_init

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

Source from the content-addressed store, hash-verified

8446}
8447
8448static void
8449garrow_pad_options_class_init(GArrowPadOptionsClass *klass)
8450{
8451 auto gobject_class = G_OBJECT_CLASS(klass);
8452
8453 gobject_class->set_property = garrow_pad_options_set_property;
8454 gobject_class->get_property = garrow_pad_options_get_property;
8455
8456 arrow::compute::PadOptions options;
8457
8458 GParamSpec *spec;
8459 /**
8460 * GArrowPadOptions:width:
8461 *
8462 * The desired string length.
8463 *
8464 * Since: 23.0.0
8465 */
8466 spec = g_param_spec_int64("width",
8467 "Width",
8468 "The desired string length",
8469 0,
8470 G_MAXINT64,
8471 options.width,
8472 static_cast<GParamFlags>(G_PARAM_READWRITE));
8473 g_object_class_install_property(gobject_class, PROP_PAD_OPTIONS_WIDTH, spec);
8474
8475 /**
8476 * GArrowPadOptions:padding:
8477 *
8478 * What to pad the string with. Should be one codepoint (Unicode)/byte (ASCII).
8479 *
8480 * Since: 23.0.0
8481 */
8482 spec = g_param_spec_string(
8483 "padding",
8484 "Padding",
8485 "What to pad the string with. Should be one codepoint (Unicode)/byte (ASCII)",
8486 options.padding.c_str(),
8487 static_cast<GParamFlags>(G_PARAM_READWRITE));
8488 g_object_class_install_property(gobject_class, PROP_PAD_OPTIONS_PADDING, spec);
8489
8490 /**
8491 * GArrowPadOptions:lean-left-on-odd-padding:
8492 *
8493 * What to do if there is an odd number of padding characters (in case of centered
8494 * padding). Defaults to aligning on the left (i.e. adding the extra padding character
8495 * on the right).
8496 *
8497 * Since: 23.0.0
8498 */
8499 spec =
8500 g_param_spec_boolean("lean-left-on-odd-padding",
8501 "Lean left on odd padding",
8502 "What to do if there is an odd number of padding characters (in "
8503 "case of centered padding). Defaults to aligning on the left "
8504 "(i.e. adding the extra padding character on the right)",
8505 options.lean_left_on_odd_padding,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected