|
/********************************************************************
|
|
* This software is "commercial computer software" as defined in the *
|
|
* Federal Acquisition Regulations and is subject to BlackLynx *
|
|
* Inc's standard End User License Agreement. *
|
|
* *
|
|
* CONFIDENTIAL - All source code is the propriety and confidential *
|
|
* information of BlackLynx Inc. *
|
|
* *
|
|
* Copyright 2014-2020 BlackLynx Inc. *
|
|
* Unpublished -- all rights reserved under the copyright laws *
|
|
* of the United States. *
|
|
********************************************************************/
|
|
|
|
#ifndef __BLACKLYNX_CHUNK_H__
|
|
#define __BLACKLYNX_CHUNK_H__
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace BlackLynx
|
|
{
|
|
namespace SearchLynx
|
|
{
|
|
|
|
class Chunk
|
|
{
|
|
public:
|
|
|
|
Chunk(
|
|
const std::string& filename,
|
|
uint64_t chunkId,
|
|
uint32_t chunkSize,
|
|
uint32_t extraSize,
|
|
uint64_t fileOffset);
|
|
|
|
virtual ~Chunk();
|
|
|
|
// NOTE: These are public (as they would be if this were a struct) so we
|
|
// don't have to deal with unnecessary getter/setter boilerplate
|
|
std::string m_filename; //!< name of file
|
|
uint64_t m_chunkId; //!< ID number of this chunk
|
|
uint32_t m_chunkSize; //!< number of bytes of data in this chunk
|
|
uint32_t m_extraSize; //!< how much extra data is tacked on to this chunk
|
|
uint64_t m_fileOffset; //!< absolute file offset of chunk's data
|
|
char* p_chunkData; //!< wrapped buffer for the chunk data
|
|
|
|
void allocateBuffer();
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif // __BLACKLYNX_EXECDRIVER_H__
|