The Artec Base SDK includes basic type definitions that other parts of Artec 3D Scanning SDK employ: artec::sdk::base::IRef, artec::sdk::base::IImage and so on.
An application interacts with the SDK via interfaces.
The base class for reference counting and memory management is artec::sdk::base::IRef. All SDK objects are inherited from this base interface. These objects should only be destroyed by calling the artec::sdk::base::IRef::release() method, not delete. The artec::sdk::base::IRef::release() method frees up memory only in the DLL where it was allocated.
The artec::sdk::base::IBlob interface (BlOb stands for "binary large object") is a container for storing large binary-data transfers. The custom-template class artec::sdk::base::TRef is a smart pointer that is destroyed automatically once it is no longer visible. We recommend using TRef
when working with classes that have names starting with I
(e.g., IScanner ):
Error codes indicate call failure:
The example below illustrates how to use a custom class with reference counting and efficient memory management: