Usable to create a custom buffer factory when needed.
More...
#include <pylon/BufferFactory.h>
|
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...
|
|
Usable to create a custom buffer factory when needed.
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] | bufferSize | The size of the buffer that has to be allocated. |
[out] | pCreatedBuffer | Return the pointer to the allocated buffer. May return NULL if the allocation fails. |
[out] | bufferContext | Context 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] | pCreatedBuffer | The pointer to the allocated buffer. Created by this factory. |
[in] | bufferContext | Context 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: