Class block_motion_handler

Inheritance Relationships

Base Types

  • public rer::client< block_motion_handler >

  • public cforaging::metrics::block_motion_metrics

Class Documentation

class block_motion_handler : public rer::client<block_motion_handler>, public cforaging::metrics::block_motion_metrics

Moves free blocks in the area according to the configured policy.

Public Functions

block_motion_handler(block_motion_handler&&) = delete
block_motion_handler(const block_motion_handler&) = delete
block_motion_handler(const config::block_motion_config *config, rmath::rng *rng)
size_t move_blocks(carena::base_arena_map *map)

Check each free block in the arena to see if it should be moved, and move blocks as needed.

Returns:

The # of blocks moved.

inline size_t n_moved(void) const override
block_motion_handler &operator=(block_motion_handler&&) = delete
const block_motion_handler &operator=(const block_motion_handler&) = delete

Public Static Attributes

static const std::string kPolicyNone = rconfig::constants::kNoValue
static const std::string kPolicyRandomWalk = "random_walk"