libglom-1.32 1.31.6

- Main Page
- Namespaces
- Classes

- Namespace List
- Namespace Members

Functions
Glom::Conversions Namespace Reference

## Functions
Glib::ustring | get_text_for_gda_value (Field::glom_field_type glom_type, const Gnome::Gda::Value& value, const NumericFormat& numeric_format=NumericFormat())
| Get text for display to the user. More...
Glib::ustring | get_text_for_gda_value (Field::glom_field_type glom_type, const Gnome::Gda::Value& value, const std::locale& locale, const NumericFormat& numeric_format=NumericFormat(), bool iso_format=false)
double | get_double_for_gda_value_numeric (const Gnome::Gda::Value& value)
Glib::ustring | format_time (const tm& tm_data)
Glib::ustring | format_time (const tm& tm_data, const std::locale& locale, bool iso_format=false)
Glib::ustring | format_date (const tm& tm_data)
Glib::ustring | format_date (const tm& tm_data, const std::locale& locale, bool iso_format=false)
Gnome::Gda::Value | parse_value (double number)
Gnome::Gda::Value | parse_value (Field::glom_field_type glom_type, const Glib::ustring& text, bool& success, bool iso_format=false)
Gnome::Gda::Value | parse_value (Field::glom_field_type glom_type, const Glib::ustring& text, const NumericFormat& numeric_format, bool& success, bool iso_format=false)
tm | parse_date (const Glib::ustring& text, bool& success)
tm | parse_date (const Glib::ustring& text, const std::locale& locale, bool& success)
tm | parse_time (const Glib::ustring& text, bool& success)
tm | parse_time (const Glib::ustring& text, const std::locale& locale, bool& success)
bool | sanity_check_date_parsing ()
| Check that Glom can parse text representations of dates for which is has itself created the text representation. More...
bool | sanity_check_date_text_representation_uses_4_digit_years (bool debug_output=false)
| Check that Glom uses 4 digits to show years in text representations of dates. More...
Glib::ustring | format_tm (const tm& tm_data, const std::locale& locale, const char* format)
bool | value_is_empty (const Gnome::Gda::Value& value)
Gnome::Gda::Value | get_empty_value (Field::glom_field_type field_type)
Gnome::Gda::Value | get_example_value (Field::glom_field_type field_type)
Gnome::Gda::Value | convert_value (const Gnome::Gda::Value& value, Field::glom_field_type target_glom_type)
| Convert the value to a different type, if necessary. More...

## Function Documentation

Gnome::Gda::Value Glom::Conversions::convert_value | ( | const Gnome::Gda::Value & | value,
|  | Field::glom_field_type | target_glom_type
| ) |  |

Convert the value to a different type, if necessary.

Any text-to-number or number-to-text conversions will be in the ISO format, ignoring the current locale.

Glib::ustring Glom::Conversions::format_date | ( | const tm & | tm_data | ) |

Glib::ustring Glom::Conversions::format_date | ( | const tm & | tm_data,
|  | const std::locale & | locale,
|  | bool | iso_format = `false`
| ) |  |

Glib::ustring Glom::Conversions::format_time | ( | const tm & | tm_data | ) |

Glib::ustring Glom::Conversions::format_time | ( | const tm & | tm_data,
|  | const std::locale & | locale,
|  | bool | iso_format = `false`
| ) |  |

Glib::ustring Glom::Conversions::format_tm | ( | const tm & | tm_data,
|  | const std::locale & | locale,
|  | const char * | format
| ) |  |

double Glom::Conversions::get_double_for_gda_value_numeric | ( | const Gnome::Gda::Value & | value | ) |

Gnome::Gda::Value Glom::Conversions::get_empty_value | ( | Field::glom_field_type | field_type | ) |

Gnome::Gda::Value Glom::Conversions::get_example_value | ( | Field::glom_field_type | field_type | ) |

Glib::ustring Glom::Conversions::get_text_for_gda_value | ( | Field::glom_field_type | glom_type,
|  | const Gnome::Gda::Value & | value,
|  | const NumericFormat& | numeric_format = `NumericFormat()`
| ) |  |

Get text for display to the user.

Glib::ustring Glom::Conversions::get_text_for_gda_value | ( | Field::glom_field_type | glom_type,
|  | const Gnome::Gda::Value & | value,
|  | const std::locale & | locale,
|  | const NumericFormat& | numeric_format = `NumericFormat()`,
|  | bool | iso_format = `false`
| ) |  |

tm Glom::Conversions::parse_date | ( | const Glib::ustring & | text,
|  | bool & | success
| ) |  |

tm Glom::Conversions::parse_date | ( | const Glib::ustring & | text,
|  | const std::locale & | locale,
|  | bool & | success
| ) |  |

tm Glom::Conversions::parse_time | ( | const Glib::ustring & | text,
|  | bool & | success
| ) |  |

tm Glom::Conversions::parse_time | ( | const Glib::ustring & | text,
|  | const std::locale & | locale,
|  | bool & | success
| ) |  |

Gnome::Gda::Value Glom::Conversions::parse_value | ( | double | number | ) |

Gnome::Gda::Value Glom::Conversions::parse_value | ( | Field::glom_field_type | glom_type,
|  | const Glib::ustring & | text,
|  | bool & | success,
|  | bool | iso_format = `false`
| ) |  |

Gnome::Gda::Value Glom::Conversions::parse_value | ( | Field::glom_field_type | glom_type,
|  | const Glib::ustring & | text,
|  | const NumericFormat& | numeric_format,
|  | bool & | success,
|  | bool | iso_format = `false`
| ) |  |

bool Glom::Conversions::sanity_check_date_parsing | ( |  | ) |

Check that Glom can parse text representations of dates for which is has itself created the text representation.

This may fail in some locales if a translation of the date format is missing.

Returns
  true if parsing is working.

bool Glom::Conversions::sanity_check_date_text_representation_uses_4_digit_years | ( | bool | debug_output = `false` | ) |

Check that Glom uses 4 digits to show years in text representations of dates.

This may fail in some locales if a translation of the date format is missing. If it fails then Glom will default to using a dd/mm/yy format, which might be incorrect for the locale.

Returns
  true if 4 digits are used.

bool Glom::Conversions::value_is_empty | ( | const Gnome::Gda::Value & | value | ) |