smartmontools  SVN Rev 4351
Utility to control and monitor storage systems with "S.M.A.R.T."
Public Member Functions | Private Member Functions | Private Attributes | List of all members
drive_database Class Reference

Drive database class. More...

Collaboration diagram for drive_database:
Collaboration graph

Public Member Functions

 drive_database ()
 ~drive_database ()
unsigned size () const
 Get total number of entries. More...
unsigned custom_size () const
 Get number of custom entries. More...
const drive_settingsoperator[] (unsigned i)
 Array access. More...
void push_back (const drive_settings &src)
 Append new custom entry. More...
void append (const drive_settings *builtin_tab, unsigned builtin_size)
 Append builtin table. More...

Private Member Functions

const char * copy_string (const char *str)
 drive_database (const drive_database &)
void operator= (const drive_database &)

Private Attributes

const drive_settingsm_builtin_tab
unsigned m_builtin_size
std::vector< drive_settingsm_custom_tab
std::vector< char * > m_custom_strings

Detailed Description

Drive database class.

Stores custom entries read from file. Provides transparent access to concatenation of custom and default table.

Definition at line 59 of file knowndrives.cpp.

Constructor & Destructor Documentation

drive_database::drive_database ( )

Definition at line 97 of file knowndrives.cpp.

drive_database::~drive_database ( )

Definition at line 102 of file knowndrives.cpp.

drive_database::drive_database ( const drive_database )

Member Function Documentation

void drive_database::append ( const drive_settings builtin_tab,
unsigned  builtin_size 

Append builtin table.

Definition at line 81 of file knowndrives.cpp.

const char * drive_database::copy_string ( const char *  str)

Definition at line 125 of file knowndrives.cpp.

unsigned drive_database::custom_size ( ) const

Get number of custom entries.

Definition at line 71 of file knowndrives.cpp.

void drive_database::operator= ( const drive_database )
const drive_settings & drive_database::operator[] ( unsigned  i)

Array access.

Definition at line 108 of file knowndrives.cpp.

void drive_database::push_back ( const drive_settings src)

Append new custom entry.

Definition at line 114 of file knowndrives.cpp.

unsigned drive_database::size ( ) const

Get total number of entries.

Definition at line 67 of file knowndrives.cpp.

Member Data Documentation

unsigned drive_database::m_builtin_size

Definition at line 86 of file knowndrives.cpp.

const drive_settings* drive_database::m_builtin_tab

Definition at line 85 of file knowndrives.cpp.

std::vector<char *> drive_database::m_custom_strings

Definition at line 89 of file knowndrives.cpp.

std::vector<drive_settings> drive_database::m_custom_tab

Definition at line 88 of file knowndrives.cpp.

The documentation for this class was generated from the following file: