Block2 Class Reference

`#include <blocktools.h>`

## Public Member Functions

| Block2 (size_t sx, size_t sy, size_t inset, size_t xmidlen, size_t ymidlen, unsigned int dpp=1)
| ~Block2 ()
double * | getOutBuffer (unsigned char subx, unsigned char suby)
double * | getOutBuffer (unsigned char bid)
double * | getInBuffer (unsigned char subx, unsigned char suby)
double * | getInBuffer (unsigned char bid)
size_t | getBuffSize (unsigned char subx, unsigned char suby)
size_t | getBuffSize (unsigned char bid)
size_t | startOffset (unsigned char subx, unsigned char suby)
void | displayBlock (unsigned char subx, unsigned char suby, bool out)
void | copyToBuffer (unsigned char buffid, double *src)
void | copyFromBuffer (unsigned char buffid, double *dest)
void | copyAllToBuffer (double *src)
void | copyUsedFromBuffer (double *dest)
void | setUsed (unsigned char buffid)

## Private Member Functions

void | populateDimsTable ()
void | populateOffsetTable (size_t inset, size_t xmidlen, size_t ymidlen)
void | createBuffArrays (double *startaddress, double *buffptr[27], size_t inset, size_t xmidlen, size_t ymidlen)

## Private Attributes

double * | inbuff
double * | outbuff
size_t | buffoffsets [9]
size_t | flatoffsets [9]
bool | used [9]
size_t | dims [9][2]
size_t | sx
size_t | sy
size_t | inset
size_t | xmidlen
size_t | ymidlen
double * | inbuffptr [9]
double * | outbuffptr [9]
const unsigned int | dpsize

## Constructor & Destructor Documentation

## Block2()

Block2::Block2 | ( | size_t | sx,
|  | size_t | sy,
|  | size_t | inset,
|  | size_t | xmidlen,
|  | size_t | ymidlen,
|  | unsigned int | dpp = `1`
| ) |  |

References createBuffArrays(), dims, dpsize, inbuff, inbuffptr, inset, outbuff, outbuffptr, populateDimsTable(), populateOffsetTable(), sx, sy, used, xmidlen, and ymidlen.

## ~Block2()

Block2::~Block2 | ( |  | ) |

References inbuff, and outbuff.

## Member Function Documentation

## copyAllToBuffer()

void Block2::copyAllToBuffer | ( | double * | src | ) |

References copyToBuffer().

Referenced by ripley::Rectangle::randomFillWorker().

## copyFromBuffer()

void Block2::copyFromBuffer | ( | unsigned char | buffid,
|  | double * | dest
| ) |  |

References dims, dpsize, inbuffptr, inset, startOffset(), and xmidlen.

Referenced by copyUsedFromBuffer().

## copyToBuffer()

void Block2::copyToBuffer | ( | unsigned char | buffid,
|  | double * | src
| ) |  |

References dims, dpsize, inset, outbuffptr, startOffset(), and xmidlen.

Referenced by copyAllToBuffer().

## copyUsedFromBuffer()

void Block2::copyUsedFromBuffer | ( | double * | dest | ) |

References copyFromBuffer(), and used.

Referenced by ripley::Rectangle::randomFillWorker().

## createBuffArrays()

void Block2::createBuffArrays | ( | double * | startaddress,
|  | double * | buffptr[27],
|  | size_t | inset,
|  | size_t | xmidlen,
|  | size_t | ymidlen
| ) |  |

private

References buffoffsets.

Referenced by Block2().

## displayBlock()

void Block2::displayBlock | ( | unsigned char | subx,
|  | unsigned char | suby,
|  | bool | out
| ) |  |

References dims, dpsize, inbuffptr, and outbuffptr.

## getBuffSize() [1/2]

size_t Block2::getBuffSize | ( | unsigned char | bid | ) |

References dims, and dpsize.

## getBuffSize() [2/2]

size_t Block2::getBuffSize | ( | unsigned char | subx,
|  | unsigned char | suby
| ) |  |

References dims, and dpsize.

Referenced by ripley::Rectangle::randomFillWorker().

## getInBuffer() [1/2]

double * Block2::getInBuffer | ( | unsigned char | bid | ) |

References inbuffptr.

## getInBuffer() [2/2]

double * Block2::getInBuffer | ( | unsigned char | subx,
|  | unsigned char | suby
| ) |  |

References inbuffptr.

Referenced by ripley::Rectangle::randomFillWorker().

## getOutBuffer() [1/2]

double * Block2::getOutBuffer | ( | unsigned char | bid | ) |

References outbuffptr.

## getOutBuffer() [2/2]

double * Block2::getOutBuffer | ( | unsigned char | subx,
|  | unsigned char | suby
| ) |  |

References outbuffptr.

Referenced by ripley::Rectangle::randomFillWorker().

## populateDimsTable()

void Block2::populateDimsTable | ( |  | ) |

private

References dims, inset, xmidlen, and ymidlen.

Referenced by Block2().

## populateOffsetTable()

void Block2::populateOffsetTable | ( | size_t | inset,
|  | size_t | xmidlen,
|  | size_t | ymidlen
| ) |  |

private

References buffoffsets, dims, dpsize, and flatoffsets.

Referenced by Block2().

## setUsed()

void Block2::setUsed | ( | unsigned char | buffid | ) |

References used.

Referenced by ripley::Rectangle::randomFillWorker().

## startOffset()

size_t Block2::startOffset | ( | unsigned char | subx,
|  | unsigned char | suby
| ) |  |

References dpsize, inset, xmidlen, and ymidlen.

Referenced by copyFromBuffer(), and copyToBuffer().

## Member Data Documentation

## buffoffsets

size_t Block2::buffoffsets[9]

private

Referenced by createBuffArrays(), and populateOffsetTable().

## dims

size_t Block2::dims[9][2]

private

Referenced by Block2(), copyFromBuffer(), copyToBuffer(), displayBlock(), getBuffSize(), populateDimsTable(), and populateOffsetTable().

## dpsize

const unsigned int Block2::dpsize

private

Referenced by Block2(), copyFromBuffer(), copyToBuffer(), displayBlock(), getBuffSize(), populateOffsetTable(), and startOffset().

## flatoffsets

size_t Block2::flatoffsets[9]

private

Referenced by populateOffsetTable().

## inbuff

double* Block2::inbuff

private

Referenced by Block2(), and ~Block2().

## inbuffptr

double* Block2::inbuffptr[9]

private

Referenced by Block2(), copyFromBuffer(), displayBlock(), and getInBuffer().

## inset

size_t Block2::inset

private

Referenced by Block2(), copyFromBuffer(), copyToBuffer(), populateDimsTable(), and startOffset().

## outbuff

double* Block2::outbuff

private

Referenced by Block2(), and ~Block2().

## outbuffptr

double* Block2::outbuffptr[9]

private

Referenced by Block2(), copyToBuffer(), displayBlock(), and getOutBuffer().

## sx

size_t Block2::sx

private

Referenced by Block2().

## sy

size_t Block2::sy

private

Referenced by Block2().

## used

bool Block2::used[9]

private

Referenced by Block2(), copyUsedFromBuffer(), and setUsed().

## xmidlen

size_t Block2::xmidlen

private

Referenced by Block2(), copyFromBuffer(), copyToBuffer(), populateDimsTable(), and startOffset().

## ymidlen

size_t Block2::ymidlen

private

Referenced by Block2(), populateDimsTable(), and startOffset().

The documentation for this class was generated from the following files:

- blocktools.h
- blocktools2.cpp