Stxxl  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Member Functions | Private Member Functions | Private Attributes
stxxl::config Class Reference

Access point to disks properties. More...

#include <config.h>

List of all members.

Classes

struct  DiskEntry

Public Member Functions

unsigned disks_number () const
 Returns number of disks available to user.
std::pair< unsigned, unsigned > regular_disk_range () const
 Returns contiguous range of regular disks w/o flash devices in the array of all disks.
std::pair< unsigned, unsigned > flash_range () const
 Returns contiguous range of flash devices in the array of all disks.
const std::string & disk_path (int disk) const
 Returns path of disks.
stxxl::int64 disk_size (int disk) const
 Returns disk size.
const std::string & disk_io_impl (int disk) const
 Returns name of I/O implementation of particular disk.

Private Member Functions

 config ()
 ~config ()
void init (const char *config_path="./.stxxl")

Private Attributes

std::vector< DiskEntrydisks_props
unsigned first_flash

Detailed Description

Access point to disks properties.

Remarks:
is a singleton

Definition at line 32 of file config.h.


Constructor & Destructor Documentation

stxxl::config::config ( ) [inline, private]

Definition at line 50 of file config.h.

References init().

stxxl::config::~config ( ) [inline, private]

Definition at line 59 of file config.h.


Member Function Documentation

const std::string& stxxl::config::disk_io_impl ( int  disk) const [inline]

Returns name of I/O implementation of particular disk.

Parameters:
diskdisk's identifier

Definition at line 113 of file config.h.

Referenced by stxxl::block_manager::block_manager(), and main().

const std::string& stxxl::config::disk_path ( int  disk) const [inline]

Returns path of disks.

Parameters:
diskdisk's identifier
Returns:
string that contains the disk's path name

Definition at line 98 of file config.h.

Referenced by stxxl::block_manager::block_manager(), and main().

stxxl::int64 stxxl::config::disk_size ( int  disk) const [inline]

Returns disk size.

Parameters:
diskdisk's identifier
Returns:
disk size in bytes

Definition at line 106 of file config.h.

Referenced by stxxl::block_manager::block_manager(), and main().

unsigned stxxl::config::disks_number ( ) const [inline]

Returns number of disks available to user.

Returns:
number of disks

Definition at line 76 of file config.h.

Referenced by stxxl::block_manager::block_manager(), main(), and stxxl::stable_ksort().

std::pair<unsigned, unsigned> stxxl::config::flash_range ( ) const [inline]

Returns contiguous range of flash devices in the array of all disks.

Returns:
range [begin, end) of flash device indices

Definition at line 90 of file config.h.

Referenced by main().

void stxxl::config::init ( const char *  config_path = "./.stxxl") [private]
std::pair<unsigned, unsigned> stxxl::config::regular_disk_range ( ) const [inline]

Returns contiguous range of regular disks w/o flash devices in the array of all disks.

Returns:
range [begin, end) of regular disk indices

Definition at line 83 of file config.h.

Referenced by main().


Member Data Documentation

std::vector<DiskEntry> stxxl::config::disks_props [private]

Definition at line 45 of file config.h.

unsigned stxxl::config::first_flash [private]

Definition at line 48 of file config.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines