smartmontools SVN Rev 5640
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
[legend]

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

Constructor & Destructor Documentation

◆ drive_database() [1/2]

drive_database::drive_database ( )

Definition at line 90 of file knowndrives.cpp.

◆ ~drive_database()

drive_database::~drive_database ( )

Definition at line 95 of file knowndrives.cpp.

◆ drive_database() [2/2]

drive_database::drive_database ( const drive_database )
private

Member Function Documentation

◆ append()

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

Append builtin table.

Definition at line 74 of file knowndrives.cpp.

◆ copy_string()

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

Definition at line 118 of file knowndrives.cpp.

◆ custom_size()

unsigned drive_database::custom_size ( ) const
inline

Get number of custom entries.

Definition at line 64 of file knowndrives.cpp.

◆ operator=()

void drive_database::operator= ( const drive_database )
private

◆ operator[]()

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

Array access.

Definition at line 101 of file knowndrives.cpp.

◆ push_back()

void drive_database::push_back ( const drive_settings src)

Append new custom entry.

Definition at line 107 of file knowndrives.cpp.

◆ size()

unsigned drive_database::size ( ) const
inline

Get total number of entries.

Definition at line 60 of file knowndrives.cpp.

Member Data Documentation

◆ m_builtin_size

unsigned drive_database::m_builtin_size
private

Definition at line 79 of file knowndrives.cpp.

◆ m_builtin_tab

const drive_settings* drive_database::m_builtin_tab
private

Definition at line 78 of file knowndrives.cpp.

◆ m_custom_strings

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

Definition at line 82 of file knowndrives.cpp.

◆ m_custom_tab

std::vector<drive_settings> drive_database::m_custom_tab
private

Definition at line 81 of file knowndrives.cpp.


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