Automatic generation produced by ISE Eiffel
deferred class PREFERENCE_CONSTANTS_IMP General cluster: interface description: "Objects that provide access to constants, possibly loaded from a files. Each constant is generated into two features: both a query and a storage feature. For example, for a STRING constant named my_string, the following features are generated: my_string: STRING and my_string_cell: CELL [STRING]. my_string simply returns the current item of my_string_cell. By separating the constant access in this way, it is possible to change the constant's value by either redefining my_string in descendent classes or simply performing my_string_cell.put (%"new_string%") as required. If you are loading the constants from a file and you wish to reload a different set of constants for your interface (e.g. for multi-language support), you may perform this in the following way: set_file_name (%"my_constants_file.text%") reload_constants_from_file and then for each generated widget, call set_all_attributes_using_constants to reset the newly loaded constants into the attribute settings of each widget that relies on constants. Note that if you wish your constants file to be loaded from a specific location, you may redefine initialize_constants to handle the loading of the file from an alternative location. Note that if you have selected to load constants from a file, and the file cannot be loaded, you will get a precondition violation when attempting to access one of the constants that should have been loaded. Therefore, you must ensure that either the file is accessible or you do not specify to load from a file." Ancestors ANY Queries constants_initialized: BOOLEAN has_constant (a_name: STRING_8): BOOLEAN integer_constant_by_name (a_name: STRING_8): INTEGER_32 string_constant_by_name (a_name: STRING_8): STRING_8 Commands reload_constants_from_file Constraints all constants not void -- Generated by Eiffel Studio --
For more details: eiffel.org