#include <FragmentIndex.h>
|
typedef Container::iterator | iterator |
|
typedef Container::const_iterator | const_iterator |
|
! FragmentIndex
A class that finds the start of every fragment in a built ring item.
FragmentIndex::FragmentIndex |
( |
| ) |
|
! Default constructor Does nothing besides initialize the empty list of fragments
FragmentIndex::FragmentIndex |
( |
uint16_t * |
data | ) |
|
! Given the body pointer, index all of the fragmentsa
- Parameters
-
a | pointer to the first word in the body (this is b/4 the first fragment) |
! Given the body pointer, index all of the fragments
- Parameters
-
a | pointer to the first word in the body (this is b/4 the first fragment) |
! Get a fragment Checks whether the index provided is valid. If index is out of range, returns a null pointer. Otherwise, it returns the ith pointer.
- Parameters
-
i | is the index of the fragment in the body (starting at 0) |
- Returns
- the pointer to the ith fragment or null if ith index doesn't exist
void FragmentIndex::indexFragments |
( |
uint16_t * |
begin, |
|
|
uint16_t * |
end |
|
) |
| |
! The indexing algorithm This will traverse the range of data in addresses [begin, end] and find all of the complete fragments. Every fragment found will be appended to the list of fragments m_frags. This is very similar to the constructor but differs in the arguments. The constructor expects that the first word of the body is passed, this expects that the pointer to the first fragment is passed. There should be a difference of 32-bits between the two arguments.
- Parameters
-
begin | a pointer to the first fragment |
end | pointer just beyond the last fragment |
! Indexes all of the fragments
- Parameters
-
data | a pointer to the first fragment |
nbytes | the number of bytes from start of first fragment to end of the body |
void FragmentIndex::indexFragments |
( |
uint16_t * |
data, |
|
|
size_t |
max_bytes |
|
) |
| |
|
inline |
! The indexing algorithm
- Parameters
-
data | a pointer to the first fragment |
nbytes | the number of bytes from start of first fragment to end of the body |
The documentation for this class was generated from the following files: