Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
collision_detection::WorldDiff Class Reference

Maintain a diff list of changes that have happened to a World. More...

#include <world_diff.h>

Public Types

using const_iterator = std::map< std::string, World::Action >::const_iterator
 

Public Member Functions

const_iterator begin () const
 
void clearChanges ()
 Clear the internally maintained vector of changes. More...
 
const_iterator end () const
 
const_iterator find (const std::string &id) const
 
const std::map< std::string, World::Action > & getChanges () const
 Return all the changes that have been recorded. More...
 
void reset ()
 Turn off recording and erase all previously recorded changes. More...
 
void reset (const WorldPtr &world)
 Set which world to record. Erases all previously recorded changes.
More...
 
void set (const std::string &id, World::Action val)
 
void setWorld (const WorldPtr &world)
 Set which world to record. Records all objects in old world (if any) as DESTROYED and all objects in new world as CREATED and ADD_SHAPE. More...
 
size_t size () const
 
 WorldDiff ()
 Constructor. More...
 
 WorldDiff (const WorldPtr &world)
 Constructor. More...
 
 WorldDiff (WorldDiff &other)
 copy constructor. More...
 
 ~WorldDiff ()
 

Private Member Functions

void notify (const World::ObjectConstPtr &, World::Action)
 Notification function. More...
 

Private Attributes

std::map< std::string, World::Actionchanges_
 
World::ObserverHandle observer_handle_
 
WorldWeakPtr world_
 

Detailed Description

Maintain a diff list of changes that have happened to a World.

Definition at line 79 of file world_diff.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 111 of file world_diff.h.

Constructor & Destructor Documentation

◆ WorldDiff() [1/3]

collision_detection::WorldDiff::WorldDiff ( )

Constructor.

Definition at line 81 of file world_diff.cpp.

◆ WorldDiff() [2/3]

collision_detection::WorldDiff::WorldDiff ( const WorldPtr &  world)

Constructor.

Definition at line 85 of file world_diff.cpp.

◆ WorldDiff() [3/3]

collision_detection::WorldDiff::WorldDiff ( WorldDiff other)

copy constructor.

Definition at line 91 of file world_diff.cpp.

◆ ~WorldDiff()

collision_detection::WorldDiff::~WorldDiff ( )

Definition at line 74 of file world_diff.cpp.

Member Function Documentation

◆ begin()

const_iterator collision_detection::WorldDiff::begin ( ) const
inline

iterator pointing to first change

Definition at line 113 of file world_diff.h.

◆ clearChanges()

void collision_detection::WorldDiff::clearChanges ( )

Clear the internally maintained vector of changes.

Definition at line 144 of file world_diff.cpp.

◆ end()

const_iterator collision_detection::WorldDiff::end ( ) const
inline

iterator pointing to end of changes

Definition at line 118 of file world_diff.h.

◆ find()

const_iterator collision_detection::WorldDiff::find ( const std::string &  id) const
inline

find changes for a named object

Definition at line 128 of file world_diff.h.

◆ getChanges()

const std::map<std::string, World::Action>& collision_detection::WorldDiff::getChanges ( ) const
inline

Return all the changes that have been recorded.

Definition at line 106 of file world_diff.h.

◆ notify()

void collision_detection::WorldDiff::notify ( const World::ObjectConstPtr &  obj,
World::Action  action 
)
private

Notification function.

Definition at line 149 of file world_diff.cpp.

◆ reset() [1/2]

void collision_detection::WorldDiff::reset ( )

Turn off recording and erase all previously recorded changes.

Definition at line 104 of file world_diff.cpp.

◆ reset() [2/2]

void collision_detection::WorldDiff::reset ( const WorldPtr &  world)

Set which world to record. Erases all previously recorded changes.

Definition at line 115 of file world_diff.cpp.

◆ set()

void collision_detection::WorldDiff::set ( const std::string &  id,
World::Action  val 
)
inline

set the entry for an id

Definition at line 133 of file world_diff.h.

◆ setWorld()

void collision_detection::WorldDiff::setWorld ( const WorldPtr &  world)

Set which world to record. Records all objects in old world (if any) as DESTROYED and all objects in new world as CREATED and ADD_SHAPE.

Definition at line 128 of file world_diff.cpp.

◆ size()

size_t collision_detection::WorldDiff::size ( ) const
inline

number of changes stored

Definition at line 123 of file world_diff.h.

Member Data Documentation

◆ changes_

std::map<std::string, World::Action> collision_detection::WorldDiff::changes_
private

keep changes in a map so they can be coalesced

Definition at line 149 of file world_diff.h.

◆ observer_handle_

World::ObserverHandle collision_detection::WorldDiff::observer_handle_
private

Definition at line 152 of file world_diff.h.

◆ world_

WorldWeakPtr collision_detection::WorldDiff::world_
private

Definition at line 155 of file world_diff.h.


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


moveit_core
Author(s): Ioan Sucan , Sachin Chitta , Acorn Pooley
autogenerated on Tue Dec 24 2024 03:27:15