3#include "../_decl/decl_composite.hpp"
5#include "detail_point_cloud.hpp"
6#include "detail_plane_enumerator.hpp"
16 static_assert(std::is_base_of<PointCloud, T>::value || std::is_base_of<MultiPartImage, T>::value,
17 "CVB: T must be a capable class");
19 return FromHandle(HandleGuard<Composite>(object->Handle()));
24 CExports::OBJ obj =
nullptr;
25 CVB_CALL_CAPI_CHECKED(CVCCompositeGetAt(
Handle(), index, obj));
28 if (CVB_CALL_CAPI(
IsImage(obj)))
32 else if (CVB_CALL_CAPI(CVCIsPlane(obj)))
36 else if (CVB_CALL_CAPI(CVCIsPlaneEnum(obj)))
40 else if (CVB_CALL_CAPI(CVCIsCompressedPfncBuffer(obj)))
44 else if (CVB_CALL_CAPI(CVCIsPfncBuffer(obj)))
48 else if (CVB_CALL_CAPI(CVCIsBuffer(obj)))
static BufferPtr FromHandle(HandleGuard< BufferBase > &&guard)
Creates a buffer from a classic API handle.
Definition buffer.hpp:28
static CompositePtr FromObject(std::shared_ptr< T > object)
Returns a composite object from the given composite compatible object.
static std::unique_ptr< Composite > FromHandle(HandleGuard< Composite > &&guard)
Creates a composite from a classic API handle.
Definition decl_composite.hpp:109
void * Handle() const noexcept
Classic API node handle.
Definition decl_composite.hpp:96
static CompressedPFNCBufferPtr FromHandle(HandleGuard< BufferBase > &&guard)
Creates a compressed pfnc buffer from a classic API handle.
Definition compressed_pfnc_buffer.hpp:31
static std::shared_ptr< HandleOnly > FromHandle(HandleGuard< HandleOnly > &&guard)
Creates a handle only from a classic API handle.
Definition handle_only.hpp:44
static std::unique_ptr< Image > FromHandle(HandleGuard< Image > &&guard)
Creates an image from a classic API handle.
Definition decl_image.hpp:160
static PFNCBufferPtr FromHandle(HandleGuard< BufferBase > &&guard)
Creates a pfnc buffer from a classic API handle.
Definition pfnc_buffer.hpp:33
static PlaneEnumeratorPtr FromHandle(HandleGuard< PlaneEnumerator > &&guard)
Creates a plane enumerator from a classic API handle.
Definition decl_plane_enumerator.hpp:71
static PlanePtr FromHandle(HandleGuard< Plane > &&guard)
Creates a plane from a classic API handle.
Definition decl_plane.hpp:76
cvbbool_t ShareObject(OBJ Object)
cvbbool_t IsImage(IMG Image)
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
Cvb::variant< ImagePtr, PlanePtr, PlaneEnumeratorPtr, BufferPtr, PFNCBufferPtr, CompressedPFNCBufferPtr, HandleOnlyPtr > CompositeVariant
Variant that can contain the different types of composite items.
Definition decl_composite.hpp:39
std::shared_ptr< Composite > CompositePtr
Convenience shared pointer for Composite.
Definition global.hpp:102