Definition at line 161 of file deviceitem.h.
Remember that derived classes have to implement the pure virtual I/O operations required by PersProductItem, e.g., readSpecific(). For this they preferably use the database methods of this base class.
typedef std::auto_ptr<PersDevice> OSB_LIB::PersDevice::AutoPtr |
Short-cut for an auto pointer.
For details see quality manual, implementation patterns: Virtual copy construction.
Reimplemented from OSB_LIB::PersProductItem.
Reimplemented in OSB_LIB::PersUimCard.
Definition at line 164 of file deviceitem.h.
Constructor with optional object id.
OSB_LIB::PersDevice::PersDevice | ( | const PersDevice & | rhs | ) | [protected] |
Copying for derived classes only.
virtual bool OSB_LIB::PersDevice::changeAssignTs | ( | const OSB_DB::Session & | session, | |
const DateTime & | newTs | |||
) | [protected, virtual] |
Change the assignment time of a pers. device.
session | Database session to use. | |
newTs | Changed assignment date and time. |
OsbException | if newTs creates an overlap with another assignment of the device. | |
OsbException | if the assigned device was modified. |
Reimplemented from OSB_LIB::PersProductItem.
AutoPtr OSB_LIB::PersDevice::clone | ( | ) | const |
Virtual copy construction.
For details see quality manual, implementation patterns.
Reimplemented from OSB_LIB::PersProductItem.
Reimplemented in OSB_LIB::PersUimCard.
virtual bool OSB_LIB::PersDevice::deassignOld | ( | const OSB_DB::Session & | session | ) | [protected, virtual] |
Deassign the pers. product item in the database.
The function is called when the status of the pers node is not created.
It calls deassignOldBase() to set the deassign date of the base class.
Derived class may reimplement it if they have specific things to do.
session | Database session to use. |
Reimplemented from OSB_LIB::PersProductItem.
bool OSB_LIB::PersDevice::delPersDevice | ( | const OSB_DB::Session & | session | ) | [protected] |
Delete a pers. device from the database.
session | Database session to use. |
OsbException | if no device is assigned. |
virtual Device* OSB_LIB::PersDevice::device | ( | ) | [private, pure virtual] |
Non-const access to the assigned device.
Implemented in OSB_LIB::PersUimCard.
virtual const Device* OSB_LIB::PersDevice::device | ( | ) | const [pure virtual] |
Access to the assigned device.
Implemented in OSB_LIB::PersUimCard.
The id of the assigned device.
bool OSB_LIB::PersDevice::insPersDevice | ( | const OSB_DB::Session & | session | ) | [protected] |
Insert a pers. device to the database.
Maintains the link between the subscribed device and the pers. item.
session | Database session to use. |
OsbException | if no device is assigned. |
virtual Device* OSB_LIB::PersDevice::mkDevice | ( | const Id< Device > & | dvcId | ) | [private, pure virtual] |
Create an empty device.
dvcId | Object id of the device. |
Implemented in OSB_LIB::PersUimCard.
virtual Device* OSB_LIB::PersDevice::oldDevice | ( | ) | [private, pure virtual] |
Non-const access to the previous assigned device.
Implemented in OSB_LIB::PersUimCard.
virtual const Device* OSB_LIB::PersDevice::oldDevice | ( | ) | const [pure virtual] |
Access to the old assigned device.
Implemented in OSB_LIB::PersUimCard.
PersDevice& OSB_LIB::PersDevice::operator= | ( | const PersDevice & | rhs | ) | [protected] |
Assignment for derived classes only.
virtual bool OSB_LIB::PersDevice::overwrite | ( | const OSB_DB::Session & | session | ) | [protected, virtual] |
Overwrite a pers. device in the database.
session | Database session to use. |
OsbException | if no old device exists. | |
OsbException | if no new device is assigned. |
Reimplemented from OSB_LIB::PersProductItem.
bool OSB_LIB::PersDevice::readPersDevice | ( | const OSB_DB::Session & | session | ) | [protected] |
(Re)read a pers. device item from the database.
session | Database session to use. |
OsbException | Device type specific exceptions from Device::read(). |