iDRS™ SDK 16
Loading...
Searching...
No Matches
CObjPtr Class Reference

Base class for all iDRS pointer classes. More...

#include <idrs_common.h>

Inheritance diagram for CObjPtr:
CObj CAttachment CBarcode CBarcodeContext CBarcodeDetection CBarcodeEngineConfig CBarcodePageParams CBarcodeParams CBarcodeSpecificOptions CBarcodeSpecificOptionsCode128 CBarcodeValidationCriteria CBarcodeZonalParams CBarcodeZonalSettings CBinarize CBlankImageDetection CBookmarksOptions CConsoleLogger CDarkBordersRemoval CDataExtraction CDateSearchContext CDefaultPageCollection CDeskew CDespeckle CDigitalCertificate CDigitalSignature CDitherRemoval CDocument CDocumentMetadata CDocumentSeparationOptions CDocumentWriter CDocxOutputParams CEncryptionOptions CEpubOutputParams CFileLogger CFileStream CFormAction CFormCheckboxField CFormCombedTextField CFormDropdownField CFormField CFormFieldGroup CFormFieldOptionItem CFormFieldStyle CFormJavaScriptAction CFormListBoxField CFormPasswordField CFormRadioButtonField CFormRadioButtonItem CFormTextField CGreyscale CHtmlOutputParams CImage CImageIO CImageLoadOptions CImageLoadOptionsPdf CImageOperation CImageOperationUtils CImagePixels CImagePluginCapabilities CImagePluginCapability CImageSaveOptions CImageSaveOptionsJpeg CImageSaveOptionsJpeg2000 CImageSaveOptionsPdf CImageSaveOptionsPng CImageSaveOptionsTiff CImageSource CJpegCompressionOptions CLineRemoval CMemoryBuffer CMemoryStream CMetadataInfo CNegative CNumberSearchContext CObjArray COcrContext COcrPageParams COcrParams COcrZonalParams COcrZonalSettings COcrZoneDescription COdtOutputParams COutputParams CPage CPageAnalysis CPageAnalysisParams CPageAnalysisResult CPageBookmark CPageCollectionStorageOptions CPageColumn CPageContent CPageCustomData CPageFont CPageGraphicShape CPageGraphicShapeLine CPageInteractiveForm CPageMetadata CPageParagraph CPageParagraphsGroup CPageProcessing CPageSection CPageSizeOptions CPageStyle CPageStyleFont CPageStyleParagraph CPageStyleParagraphList CPageStyleTableCell CPageStyleTabulation CPageStyleTextElement CPageStyleWord CPageTableCell CPageTextElement CPageTextElementAlternative CPageTextLine CPageWord CPageZone CPageZoneGraphic CPageZoneGraphicExternalImage CPageZoneTable CPageZoneText CPdfCompressionOptions CPdfCustomMetadata CPdfCustomMetadataContainer CPdfCustomMetadataProperty CPdfCustomMetadataPropertyList CPdfCustomMetadataResource CPdfOutputParams CPdfUpdateParams CPerspective CPolygon CPolygonUtils CPptxOutputParams CPunchHoleRemoval CQualityAssessment CRegexSearchContext CResize CRotate CRtfOutputParams CSearchContext CSearchMatch CSearchResult CSerialization CSignatureContent CTextOutputParams CTextRecognition CTextSearchContext CXlsxOutputParams CXmlOutputParams

Detailed Description

Base class for all iDRS pointer classes.

It provides a safe way to use pointers on classes inheriting CObj because it correctly uses the reference counter of the CObj class.

All iDRS classes that inherit the "CObjPtr" class (like CPageRecognition, CPage and CImgProcessor ) use "smart pointers". The memory area pointed to by a smart pointer is associated with a reference counter and this reference counter is updated during the creation, copying and destruction. The memory is freed when this reference counter reaches 0.

For example:

CPage aPage1, aPage2;
aPage1 = CPage::Create (); // Allocates memory and increments the reference counter to 1
aPage2 = aPage1; // Increments the reference counter to 2
aPage1 = NULL; // Decrements the reference counter to 1
aPage2 = NULL; // Decrements the reference counter to 0, the memory is freed
The CPage class manages a page in the IDRS.

Of course, it isn't necessary to do aPage2 = NULL, the CPage destructor will decrement the counter itself.