Class: Wx::ConfigBase

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/config.rb

Overview

ConfigBase defines the basic interface of all config classes. In Ruby this class is an empty placeholder providing access to the static ConfigBase.create, ConfigBase.set and ConfigBase.get methods as well as providing the base for a similar inheritance hierarchy as in C++.

Direct Known Subclasses

Config, ConfigWx

Defined Under Namespace

Modules: Interface

Constant Summary collapse

SEPARATOR =

Config path separator

'/'

Class Method Summary collapse

Class Method Details

.create(forced_create = false, use_hash_config: false) ⇒ Wx::ConfigBase

Create a new config instance and sets it as the current one unless a global config was already created/installed. If forced_create is true any existing global config will be replaced by a new config instance. This function will create the most appropriate implementation of Wx::ConfigBase available for the current platform. If use_hash_config is true this means that a Wx::Config instance will created and appropriately wrapped in C++ otherwise the default C++ config for the current/active platform will be used.

Parameters:

  • forced_create (Boolean) (defaults to: false)

    specifies to force replacing any existing global config if true

  • use_hash_config (Boolean) (defaults to: false)

    specifies to create a Ruby Hash based config when required if true

Returns:



25
# File 'lib/wx/doc/config.rb', line 25

def self.create(forced_create=false, use_hash_config: false) end

.get(create_on_demand = true) ⇒ Wx::ConfigBase?

Get the current config object. If there is no current object and create_on_demand is true, this creates a default config instance appropriate for the current/active platform (registry based for Windows and file based otherwise).

Parameters:

  • create_on_demand (Boolean) (defaults to: true)

    specifies whether to create a configuration object if none has been created/installed before

Returns:



38
# File 'lib/wx/doc/config.rb', line 38

def self.get(create_on_demand=true) end

.set(config) ⇒ Wx::ConfigBase

Sets the config object as the current one, returns the previous current object (both the parameter and returned value may be nil).

Parameters:

Returns:



31
# File 'lib/wx/doc/config.rb', line 31

def self.set(config) end