All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
Pylon::IBufferFactory Class Referenceabstract

Usable to create a custom buffer factory when needed. More...

#include <pylon/BufferFactory.h>

Public Member Functions

virtual ~IBufferFactory ()=0
 Ensure proper destruction by using a virtual destructor.
 
virtual void AllocateBuffer (size_t bufferSize, void **pCreatedBuffer, intptr_t &bufferContext)=0
 Allocates a buffer and provides additional context information. More...
 
virtual void FreeBuffer (void *pCreatedBuffer, intptr_t bufferContext)=0
 Frees a previously allocated buffer. More...
 
virtual void DestroyBufferFactory ()=0
 Destroys the buffer factory. More...
 

Detailed Description

Usable to create a custom buffer factory when needed.

Member Function Documentation

virtual void Pylon::IBufferFactory::AllocateBuffer ( size_t  bufferSize,
void **  pCreatedBuffer,
intptr_t &  bufferContext 
)
pure virtual

Allocates a buffer and provides additional context information.

Parameters
[in]bufferSizeThe size of the buffer that has to be allocated.
[out]pCreatedBufferReturn the pointer to the allocated buffer. May return NULL if the allocation fails.
[out]bufferContextContext information that belongs to the buffer. This context information is provided when FreeBuffer() is called. The value can be left unchanged if not needed.
Thread Safety:
This method can be run by different threads. It is called from threads that call Pylon::CInstantCamera::StartGrabbing() and it can be called by the internal grab engine thread.
Error Safety:
May throw an exception if the allocation fails.
virtual void Pylon::IBufferFactory::DestroyBufferFactory ( )
pure virtual

Destroys the buffer factory.

This method is called when the buffer factory is not needed any longer. The object implementing IBufferFactory can be deleted by calling: delete this.

Thread Safety:
This method can be run by different threads. It is called from threads that are running the destructor of a Pylon::CGrabResultPtr or call Pylon::CInstantCamera::StopGrabbing().
Error Safety:
C++ exceptions from this call will be caught and ignored.
virtual void Pylon::IBufferFactory::FreeBuffer ( void *  pCreatedBuffer,
intptr_t  bufferContext 
)
pure virtual

Frees a previously allocated buffer.

Parameters
[in]pCreatedBufferThe pointer to the allocated buffer. Created by this factory.
[in]bufferContextContext information of the buffer returned by AllocateBuffer().
Error Safety:
Does not throw C++ exceptions.

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

pylon 5.0.5
Copyright © 2006-2016 Basler AG (Thu Aug 11 2016 18:01:28)