Pleora Technologies Inc. eBUS SDK v5.1.10.4642 API



PvChunkData.h
1 // *****************************************************************************
2 //
3 // Copyright (c) 2017, Pleora Technologies Inc., All rights reserved.
4 //
5 // *****************************************************************************
6 
7 #ifndef __PVCHUNKDATA_H__
8 #define __PVCHUNKDATA_H__
9 
10 #include <PvBufferLib.h>
11 #include <PvPixelType.h>
12 
13 
14 namespace PvBufferLib
15 {
16  class ChunkData;
17  class Buffer;
18 }
19 
20 
21 class PV_BUFFER_API PvChunkData
22 {
23 public:
24 
25  uint64_t GetChunkDataPayloadLength() const;
26 
27  PvResult Alloc( uint32_t aMaximumChunkLength );
28  void Free();
29 
30  PvResult Attach( void * aRawBuffer, uint32_t aMaximumChunkLength );
31  uint8_t *Detach();
32 
33  // Writing chunk data
34  PvResult AddChunk( uint32_t aID, const uint8_t *aData, uint32_t aLength );
35 
36  // Reading chunk data
37  uint32_t GetChunkCount();
38  PvResult GetChunkIDByIndex( uint32_t aIndex, uint32_t &aID );
39  uint32_t GetChunkSizeByIndex( uint32_t aIndex );
40  uint32_t GetChunkSizeByID( uint32_t aID );
41  const uint8_t *GetChunkRawDataByIndex( uint32_t aIndex );
42  const uint8_t *GetChunkRawDataByID( uint32_t aID );
43 
44 public:
45 
46  PvChunkData( PvBufferLib::ChunkData *aChunkData );
47  virtual ~PvChunkData();
48 
49 private:
50 
51  friend class PvBufferLib::Buffer;
52 
53  // Not implemented
54  PvChunkData( const PvChunkData & );
55  const PvChunkData &operator=( const PvChunkData & );
56 
57  PvBufferLib::ChunkData *mThis;
58 
59 };
60 
61 #endif
Raw data interface to a PvBuffer.
Definition: PvChunkData.h:21
Result information.
Definition: PvResult.h:13
Definition: PvBuffer.h:18

Copyright (c) 2002-2018 Pleora Technologies Inc.
www.pleora.com