|
smartmontools SVN Rev 3317
Utility to control and monitor storage systems with "S.M.A.R.T."
|
Smart pointer class for device pointers. More...
#include <dev_interface.h>

Public Types | |
| typedef Dev | device_type |
Public Member Functions | |
| any_device_auto_ptr (device_type *dev=0, smart_device *base_dev=0) | |
| Construct from optional pointer to device and optional pointer to base device. | |
| ~any_device_auto_ptr () throw () | |
| Destructor deletes device object. | |
| void | operator= (device_type *dev) |
| Assign a new pointer. | |
| void | reset () |
| Delete device object and clear the pointer. | |
| device_type * | release () |
| Return the pointer and release ownership. | |
| void | replace (device_type *dev) |
| Replace the pointer. | |
| device_type * | get () const |
| Return the pointer. | |
| device_type & | operator* () const |
| Pointer dereferencing. | |
| device_type * | operator-> () const |
| Pointer dereferencing. | |
| operator bool () const | |
| For (ptr != 0) check. | |
| bool | operator! () const |
| For (ptr == 0) check. | |
Private Member Functions | |
| void | fail () const |
| any_device_auto_ptr (const any_device_auto_ptr< Dev > &) | |
| void | operator= (const any_device_auto_ptr< Dev > &) |
Private Attributes | |
| device_type * | m_dev |
| smart_device * | m_base_dev |
Smart pointer class for device pointers.
Definition at line 580 of file dev_interface.h.
| typedef Dev any_device_auto_ptr< Dev >::device_type |
Definition at line 583 of file dev_interface.h.
| any_device_auto_ptr< Dev >::any_device_auto_ptr | ( | device_type * | dev = 0, |
| smart_device * | base_dev = 0 |
||
| ) | [inline, explicit] |
Construct from optional pointer to device and optional pointer to base device.
Definition at line 587 of file dev_interface.h.
| any_device_auto_ptr< Dev >::~any_device_auto_ptr | ( | ) | throw () [inline] |
Destructor deletes device object.
Definition at line 592 of file dev_interface.h.
| any_device_auto_ptr< Dev >::any_device_auto_ptr | ( | const any_device_auto_ptr< Dev > & | ) | [private] |
| void any_device_auto_ptr< Dev >::fail | ( | ) | const [inline, private] |
Definition at line 652 of file dev_interface.h.
| device_type* any_device_auto_ptr< Dev >::get | ( | ) | const [inline] |
Return the pointer.
Definition at line 629 of file dev_interface.h.
| any_device_auto_ptr< Dev >::operator bool | ( | ) | const [inline] |
For (ptr != 0) check.
Definition at line 641 of file dev_interface.h.
| bool any_device_auto_ptr< Dev >::operator! | ( | ) | const [inline] |
For (ptr == 0) check.
Definition at line 645 of file dev_interface.h.
| device_type& any_device_auto_ptr< Dev >::operator* | ( | ) | const [inline] |
Pointer dereferencing.
Definition at line 633 of file dev_interface.h.
| device_type* any_device_auto_ptr< Dev >::operator-> | ( | ) | const [inline] |
Pointer dereferencing.
Definition at line 637 of file dev_interface.h.
| void any_device_auto_ptr< Dev >::operator= | ( | device_type * | dev | ) | [inline] |
Assign a new pointer.
Throws if a pointer is already assigned.
Definition at line 597 of file dev_interface.h.
| void any_device_auto_ptr< Dev >::operator= | ( | const any_device_auto_ptr< Dev > & | ) | [private] |
| device_type* any_device_auto_ptr< Dev >::release | ( | ) | [inline] |
Return the pointer and release ownership.
Definition at line 616 of file dev_interface.h.
| void any_device_auto_ptr< Dev >::replace | ( | device_type * | dev | ) | [inline] |
Replace the pointer.
Used to call dev->autodetect_open().
Definition at line 625 of file dev_interface.h.
| void any_device_auto_ptr< Dev >::reset | ( | ) | [inline] |
Delete device object and clear the pointer.
Definition at line 605 of file dev_interface.h.
smart_device* any_device_auto_ptr< Dev >::m_base_dev [private] |
Definition at line 650 of file dev_interface.h.
device_type* any_device_auto_ptr< Dev >::m_dev [private] |
Definition at line 649 of file dev_interface.h.
1.7.4