NIST Biometric Evaluation Framework
Software components for biometric technology evaluations
be_memory_mutableindexedbuffer.h
Go to the documentation of this file.
1/*
2 * This software was developed at the National Institute of Standards and
3 * Technology (NIST) by employees of the Federal Government in the course
4 * of their official duties. Pursuant to title 17 Section 105 of the
5 * United States Code, this software is not subject to copyright protection
6 * and is in the public domain. NIST assumes no responsibility whatsoever for
7 * its use by other parties, and makes no guarantees, expressed or implied,
8 * about its quality, reliability, or any other characteristic.
9 */
10
11#ifndef __BE_MEMORY_MUTABLEINDEXEDBUFFER__
12#define __BE_MEMORY_MUTABLEINDEXEDBUFFER__
13
15
16namespace BiometricEvaluation
17{
18 namespace Memory
19 {
22 {
23 public:
34 uint8_t *data,
35 uint64_t size);
36
45 uint8Array &aa);
46
49 const MutableIndexedBuffer &copy) = default;
50
68 uint64_t
70 const void *buf,
71 uint64_t len);
72
87 uint8_t
89 uint8_t val);
90
105 uint16_t
107 uint16_t val);
108
124 uint16_t
126 uint16_t val);
127
142 uint32_t
144 uint32_t val);
145
161 uint32_t
163 uint32_t val);
164
179 uint64_t
181 uint64_t val);
182
190 virtual const uint8_t*
192 const;
193
195#ifdef __MIC__
196 virtual ~MutableIndexedBuffer() noexcept =
197 default;
198#else
199 virtual ~MutableIndexedBuffer() = default;
200#endif
201
202 private:
204 uint8_t *_mutableData;
205 };
206 }
207}
208#endif /* __BE_MEMORY_MUTABLEINDEXEDBUFFER__ */
Wrap a memory buffer with an index.
uint64_t pushU64Val(uint64_t val)
Push eight elements into the managed buffer at the current index, incrementing the index.
uint32_t pushBeU32Val(uint32_t val)
Push four elements into the managed buffer at the current index as a big endian value,...
MutableIndexedBuffer(const MutableIndexedBuffer &copy)=default
Copy constructor (default).
uint16_t pushU16Val(uint16_t val)
Push two elements into the managed buffer at the current index, incrementing the index.
uint32_t pushU32Val(uint32_t val)
Push four elements into the managed buffer at the current index, incrementing the index.
uint64_t push(const void *buf, uint64_t len)
Push elements into the buffer, inreasing the index.
uint8_t pushU8Val(uint8_t val)
Push an element into the managed buffer at the current index, incrementing the index.
uint16_t pushBeU16Val(uint16_t val)
Push two elements into the managed buffer at the current index as a big endian value,...
MutableIndexedBuffer(uint8Array &aa)
Wrap an existing uint8Array.
virtual ~MutableIndexedBuffer()=default
Destructor (default).
MutableIndexedBuffer(uint8_t *data, uint64_t size)
Wrap an existing buffer of a given length.
virtual const uint8_t * get() const
Returns a pointer to the managed buffer.
This software was developed at the National Institute of Standards and Technology (NIST) by employees...