|
STXXL
1.4.0
|
Access point to disks properties. Since 1.4.0: no config files are read automatically!
Inheritance diagram for stxxl::config:
Collaboration diagram for stxxl::config:Public Member Functions | |
Initialization Functions | |
| void | check_initialized () |
| Check that initialize() was called. More... | |
| void | load_config_file (const std::string &config_path) |
| Load disk configuration file. More... | |
| void | load_default_config () |
| Load default configuration. More... | |
| config & | add_disk (const disk_config &cfg) |
| Add a disk to the configuration list. More... | |
Query Functions | |
| size_t | disks_number () |
| Returns number of disks available to user. More... | |
| std::pair< unsigned, unsigned > | regular_disk_range () const |
| Returns contiguous range of regular disks w/o flash devices in the array of all disks. More... | |
| std::pair< unsigned, unsigned > | flash_range () const |
| Returns contiguous range of flash devices in the array of all disks. More... | |
| disk_config & | disk (size_t disk) |
| Returns mutable disk_config structure for additional disk parameters. More... | |
| const disk_config & | disk (size_t disk) const |
| Returns constant disk_config structure for additional disk parameters. More... | |
| const std::string & | disk_path (size_t disk) const |
| Returns path of disks. More... | |
| stxxl::uint64 | disk_size (size_t disk) const |
| Returns disk size. More... | |
| const std::string & | disk_io_impl (size_t disk) const |
| Returns name of I/O implementation of particular disk. More... | |
| uint64 | total_size () const |
| Returns the total size over all disks. More... | |
Private Types | |
| typedef std::vector< disk_config > | disk_list_type |
| typedef of list of configured disks More... | |
Private Member Functions | |
| config () | |
| Constructor: this must be inlined to print the header version string. More... | |
| ~config () | |
| deletes autogrow files More... | |
| void | find_config () |
| Search several places for a config file. More... | |
| void | initialize () |
| If disk list is empty, then search different locations for a disk configuration file, or load a default config if everything fails. More... | |
Private Attributes | |
| disk_list_type | disks_list |
| list of configured disks More... | |
| unsigned | first_flash |
| In disks_list, flash devices come after all regular disks. More... | |
| bool | is_initialized |
| Finished initializing config. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from stxxl::singleton< config > | |
| static instance_pointer | get_instance () |
|
private |
|
inlineprivate |
Constructor: this must be inlined to print the header version string.
Definition at line 124 of file config.h.
References stxxl::get_version_string_long(), stxxl::print_library_version_mismatch(), and STXXL_MSG.
|
private |
|
inline |
Add a disk to the configuration list.
|
inline |
Check that initialize() was called.
Definition at line 149 of file config.h.
Referenced by stxxl::block_manager::block_manager().
|
inline |
Returns mutable disk_config structure for additional disk parameters.
Definition at line 201 of file config.h.
Referenced by stxxl::block_manager::block_manager().
|
inline |
Returns constant disk_config structure for additional disk parameters.
|
inline |
|
inline |
|
inline |
|
inline |
Returns number of disks available to user.
Definition at line 178 of file config.h.
Referenced by stxxl::block_manager::block_manager(), and stxxl::stable_ksort().
|
private |
Search several places for a config file.
Definition at line 66 of file config.cpp.
References stxxl::exist_file().
|
inline |
|
private |
If disk list is empty, then search different locations for a disk configuration file, or load a default config if everything fails.
Definition at line 55 of file config.cpp.
| void stxxl::config::load_config_file | ( | const std::string & | config_path | ) |
Load disk configuration file.
Definition at line 140 of file config.cpp.
References stxxl::disk_config::flash, stxxl::disk_config::parse_line(), and STXXL_THROW.
| void stxxl::config::load_default_config | ( | ) |
Load default configuration.
Definition at line 114 of file config.cpp.
References stxxl::disk_config::autogrow, stxxl::disk_config::delete_on_exit, stxxl::disk_config::path, STXXL_ERRMSG, and STXXL_THROW_WIN_LASTERROR.
|
inline |
| uint64 stxxl::config::total_size | ( | ) | const |
Returns the total size over all disks.
Definition at line 175 of file config.cpp.
|
private |
|
private |
|
private |