class CULTURE < $IS_EQ
****

________This_class_embodies_a_binary_version_of_the_'locale'_files_defined
___in_ISO/IEC_14652,_finding_and_reading_the_appropriate_one_as_needed.

________There_are_twelve_different_kinds_of_service_specified_at_present.
___They_are_given_the_names_following_-_to_provide_for_backwards_compatibility
___with_the_Posix_standard_(ISO/IEC_9945-2).

________LC_CTYPE___________________________--_Built-in_to_code_classes!
________LC_COLLATE
________LC_NUMERIC
________LC_MONETARY
________LC_TIME
________LC_MESSAGES
________LC_PAPER
________LC_NAME
________LC_ADDRESS
________LC_TELEPHONE
________LC_MEASUREMENT
________LC_VERSION

________The_auxiliary_programs_provided_with_this_library_provide_for_the
___construction_of_a_binary_version_of_the_string-form_definitions.___This
___is_need_because_it_is_not_possible_to_know_that_anything_is_text_until
___the_binary_files_have_been_read_to_establish_the_coding_scheme_in_use_and
___enable_characters,_etc_to_be_handled_correctly.

________The_two_binary_files_are_the_culture_file_and_the_separate_collate
___file.___The_former_is_read_when_initialising_this_class_and_used_to
___establish_values_for_all_categories_except_collation.___The_collate_file
___is_read_and_used_by_the_class_REPERTOIRE_as_needed,_being_'created'_during
___the_initialisation_of_this_class.

________NOTE_The_arrays_of_string_for_day_of_week,_etc_are_located_by
_____________the_appropriate_enumeration_when_needed.
___
________The_first_two_constants_specify_in_a_portable_manner_the_names
___of_the_two_environment_variables_on_which_this_library_depends_-
________SATHER_HOME
________SATHER_LOCALE_or_LOCALE_=_default,_en_NZ
________SATHER_RESOURCES_=_$(SATHER_HOME)/resources/$(SATHER_LOCALE)/

__And_read_binary_resource_files:
________$(SATHER_HOME)/resources/$(SATHER_LOCALE)/bin/culture
________$(SATHER_HOME)/resources/$(SATHER_LOCALE)/bin/rep_map


Ancestors
$IS_EQ



Public


Readable Attributes
attr addressing : ADDRESSING ;
**** LC_ADDRESS components.
attr char_data : CHAR_TYPES ;
****
attr currency : CASH ;
**** LC_MONETARY formats, etc
attr date_time : TEMPORAL ;
**** LC_TIME formats
attr naming : NAMING ;
**** LC_NAME components.
attr numeric : NUMBERS ;
**** LC_NUMERIC format
attr paper_size : RECTANGLE ;
**** LC_PAPER components.
attr phoning : PHONING ;
**** LC_TELEPHONE component
attr resource_path : FILE_PATH ;
****
________This_string_contains_the_culture-specific_path_name_segment_for
___use_when_the_RESOURCES_class_is_creating_class_message_file_names.
e.g. /usr/local/lib/sather/resources/en_NZ
attr state : CARD ;
attr units : UNIT_KINDS ;
**** LC_MEASUREMENT component
attr version : VERSION ;
**** LC_VERSION component

Constants
Start, Library, Culture, Charmap, Collating, All ;
Start, Library, Culture, Charmap, Collating, All ;
Start, Library, Culture, Charmap, Collating, All ;
Start, Library, Culture, Charmap, Collating, All ;
Start, Library, Culture, Charmap, Collating, All ;
Start, Library, Culture, Charmap, Collating, All ;

Features
Home_ref : STR
****
________This_routine_gives_global_access_to_the_name_of_the_SATHER_HOME
___environment_variable_in_the_local_default_culture_as_a_reference_string.
Locale_ref : STR
****
________This_routine_creates_and_returns_the_name_of_LOCALE__environment_variable_
___as_a_reference_string.
Resources_ref : STR
****
__This_routine_gives_global_access_to_the_name_of_the_SATHER_RESOURCES_environment_variable.
__in_the_local_default_culture_as_a_reference_string.
SatherLocale_ref : STR
****
________This_routine_creates_and_returns_the_name_of_SATHER_LOCALE__environment_variable_
___as_a_reference_string.
answers : ANSWERS
****
________This_routine_auto-initialises_the_default_culture/repertoire_if
___necessary_and_then_returns_the_current_answers_object.
bin_resource_path : FILE_PATH
****
________The_directory_for_the_binary_culture_files.
________$(SATHER_HOME)/resources/$(LOCALE)/bin_by_default.
charmap : REP_MAP
****
________This_routine_auto-initialises_the_default_culture/repertoire_if
___necessary_and_then_returns_the_current_charmap.
collating : REPERTOIRE
****
________This_routine_auto-initialises_the_default_culture/repertoire_if
___necessary_and_then_returns_the_current_repertoire.
copy:SAME
create(file_path : FILE_PATH) : SAME
default : SAME
init_kind(val : CODE_KINDS)
**** This routine is only usable from within the LIBCHARS class.
is_eq(other : SAME) : BOOL
****
________This_predicate_returns_true_if_and_only_if_self_and_other_are_the_same
___object,_otherwise_false.
is_eq(other : $OB) : BOOL .. Included as is_eq
**** This is the generic equality predicate. c.f. the class $IS_EQ
kind : CODE_KINDS
****
________This_routine_auto-initialises_the_default_culture/repertoire_if
___necessary_and_then_returns_the_value_of_priv_kind.
resources : RESOURCES
****
________This_routine_auto-initialises_the_default_culture/repertoire_if
___necessary_and_then_returns_the_current_run-time_resources.
sather_lib : LIBCHARS
****
________This_routine_auto-initialises_the_default_culture/repertoire_if
___necessary_and_then_returns_the_appropriate_char_library.


Private

Bin_ref : STR
**** "bin"
___Note_that_this_routine_is_also_invoked_by_the_next_following_routine
___bin_resource_path_-_which_is_used_both_when_creating_a_default_cuoture
___and_for_all_other_cultures.__Therefore_the_library_used_must_always_be
___the_default_'local'_one.
Default_ref : STR
****
________This_routine_creates_and_returns_the_name_of_the_"default"_sub-directory
___in_the_Resources_sub-directory_as_a_reference_string.
Leaf_Name_ref : STR
****
________The_leaf_name_for_the_primary_culture_file_is_'culture',_eg_the
___default_file_is
________$SATHER_HOME/Resources/default/bin/culture_on_a_unix_system

________This_routine_creates_and_returns_the_name_of_the_default_sub-directory
___in_the_Resources_sub-directory_as_a_reference_string.__Note_that_this_always
___uses_the_default_library_in_order_to_communicate_with_the_operating_system!
Res_ref : STR
****
________This_routine_creates_and_returns_the_name_of_the_"resources"
___sub-directory_in_the_SATHER_HOME_directory_as_a_reference_string.
attr addressing : ADDRESSING ;
**** LC_ADDRESS components.
attr char_data : CHAR_TYPES ;
****
create_from_files(me : SAME,file_path : FILE_PATH) : SAME
attr currency : CASH ;
**** LC_MONETARY formats, etc
attr date_time : TEMPORAL ;
**** LC_TIME formats
default_culture_path : FILE_PATH
default_resource_path : FILE_PATH
init : SAME
initialise : SAME
attr naming : NAMING ;
**** LC_NAME components.
attr numeric : NUMBERS ;
**** LC_NUMERIC format
attr paper_size : RECTANGLE ;
**** LC_PAPER components.
parse_locale(str_index : BIN_CURSOR) : BOOL
attr phoning : PHONING ;
**** LC_TELEPHONE component
attr priv_answers : ANSWERS ;
**** LC_MESSAGES components.
attr priv_answers : ANSWERS ;
**** LC_MESSAGES components.
attr priv_charmap : REP_MAP ;
attr priv_charmap : REP_MAP ;
attr priv_collating : REPERTOIRE ;
attr priv_collating : REPERTOIRE ;
shared priv_default : SAME ;
**** to ensure there is only one!
shared priv_default : SAME ;
**** to ensure there is only one!
attr priv_kind : CODE_KINDS ;
attr priv_kind : CODE_KINDS ;
attr priv_resources : RESOURCES ;
attr priv_resources : RESOURCES ;
attr priv_sather_lib : LIBCHARS ;
****
________The_five_objects_above_are_various_components_of_this_culture_(see
___the_class_definitions).
attr priv_sather_lib : LIBCHARS ;
****
________The_five_objects_above_are_various_components_of_this_culture_(see
___the_class_definitions).
attr resource_path : FILE_PATH ;
****
________This_string_contains_the_culture-specific_path_name_segment_for
___use_when_the_RESOURCES_class_is_creating_class_message_file_names.
e.g. /usr/local/lib/sather/resources/en_NZ
attr state : CARD ;
attr units : UNIT_KINDS ;
**** LC_MEASUREMENT component
attr version : VERSION ;
**** LC_VERSION component

The Sather Home Page