Heart 1.3.842.34c2ab5
Heart is base back end library for your c++ Qt projects.
QH::SoftDelete Class Referenceabstract

The SoftDelete class povide the soft delete functionality. All child classes of this class must be deleted using the softDelete method for preparring for delete. IF you delete object without prepare then destructor invoke the abort function in debug mode. For release mode destructor print error message only. More...

#include <softdelete.h>

Inheritance diagram for QH::SoftDelete:
Inheritance graph
Collaboration diagram for QH::SoftDelete:
Collaboration graph

Public Member Functions

 SoftDelete ()
 
virtual ~SoftDelete ()
 ~SoftDelete This destructor has bin crashed if the softDelete method not will be invoked before delete this object. IF you try delete this object on release distribution then you get error message only without invoked std::abort method.
 
void softDelete ()
 softDelete This method remove this object and save all changes into database.
 

Protected Member Functions

virtual void prepareForDelete ()=0
 prepareForDelete This method must be prepare object for delete. Override this for working main functions of this class. For more information see the SoftDelete class and SoftDelete::~SoftDelete distructor.
 

Detailed Description

The SoftDelete class povide the soft delete functionality. All child classes of this class must be deleted using the softDelete method for preparring for delete. IF you delete object without prepare then destructor invoke the abort function in debug mode. For release mode destructor print error message only.

Definition at line 20 of file softdelete.h.

Constructor & Destructor Documentation

◆ SoftDelete()

QH::SoftDelete::SoftDelete ( )
default

◆ ~SoftDelete()

QH::SoftDelete::~SoftDelete ( )
virtual

~SoftDelete This destructor has bin crashed if the softDelete method not will be invoked before delete this object. IF you try delete this object on release distribution then you get error message only without invoked std::abort method.

Warning
do not delete child classes using the delete operator or deleteLater method of the QObject class.

Definition at line 13 of file softdelete.cpp.

Member Function Documentation

◆ prepareForDelete()

virtual void QH::SoftDelete::prepareForDelete ( )
protectedpure virtual

prepareForDelete This method must be prepare object for delete. Override this for working main functions of this class. For more information see the SoftDelete class and SoftDelete::~SoftDelete distructor.

Implemented in QH::AbstractNode, and QH::ISqlDB.

◆ softDelete()

void QH::SoftDelete::softDelete ( )

softDelete This method remove this object and save all changes into database.

Note
Use only this method for delete all objects of child classes of this class.

Definition at line 28 of file softdelete.cpp.

Here is the caller graph for this function:

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