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

Drive database class. More...

Collaboration diagram for drive_database:
Collaboration graph

List of all members.

Public Member Functions

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

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 58 of file knowndrives.cpp.

Constructor & Destructor Documentation

drive_database::drive_database ( )

Definition at line 96 of file knowndrives.cpp.

drive_database::~drive_database ( )

Definition at line 101 of file knowndrives.cpp.

drive_database::drive_database ( const drive_database ) [private]

Member Function Documentation

void drive_database::append ( const drive_settings builtin_tab,
unsigned  builtin_size 
) [inline]

Append builtin table.

Definition at line 80 of file knowndrives.cpp.

const char * drive_database::copy_string ( const char *  str) [private]

Definition at line 124 of file knowndrives.cpp.

unsigned drive_database::custom_size ( ) const [inline]

Get number of custom entries.

Definition at line 70 of file knowndrives.cpp.

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

Array access.

Definition at line 107 of file knowndrives.cpp.

void drive_database::push_back ( const drive_settings src)

Append new custom entry.

Definition at line 113 of file knowndrives.cpp.

unsigned drive_database::size ( ) const [inline]

Get total number of entries.

Definition at line 66 of file knowndrives.cpp.

Member Data Documentation

unsigned drive_database::m_builtin_size [private]

Definition at line 85 of file knowndrives.cpp.

Definition at line 84 of file knowndrives.cpp.

std::vector<char *> drive_database::m_custom_strings [private]

Definition at line 88 of file knowndrives.cpp.

Definition at line 87 of file knowndrives.cpp.

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