Public Member Functions | Private Attributes
rail::interactive_world::Room Class Reference

Room configuration information. More...

#include <Room.h>

List of all members.

Public Member Functions

void addSurface (const Surface &surface)
 Surface adder.
const SurfacefindSurface (const std::string &name) const
 Surface finder.
const std::string & getFrameID () const
 Frame ID value accessor.
const std::string & getName () const
 Name value accessor.
size_t getNumSurfaces () const
 Surfaces size accessor.
const SurfacegetSurface (const size_t index) const
 Surface value accessor.
const std::vector< Surface > & getSurfaces () const
 Surfaces value accessor.
void removeSurface (const size_t index)
 Surface remover.
 Room (const std::string &name="", const std::string &frame_id="")
 Create a new Room.
void setFrameID (const std::string &frame_id)
 Frame ID value mutator.
void setName (const std::string &name)
 Name value mutator.

Private Attributes

std::string frame_id_
std::string name_
std::vector< Surfacesurfaces_

Detailed Description

Room configuration information.

A room consists of a series of surfaces.

Definition at line 28 of file Room.h.


Constructor & Destructor Documentation

Room::Room ( const std::string &  name = "",
const std::string &  frame_id = "" 
)

Create a new Room.

Create a new Room with the given name and frame ID. The surface list is empty by default.

Parameters:
nameThe name of the room (defaults to the empty string).
frame_idThe frame ID of the room (defaults to the empty string).

Definition at line 18 of file Room.cpp.


Member Function Documentation

void Room::addSurface ( const Surface surface)

Surface adder.

Add the surface to this World.

Parameters:
surfaceThe new surface to add.

Definition at line 64 of file Room.cpp.

const Surface & Room::findSurface ( const std::string &  name) const

Surface finder.

Find a surface with the given name. This will also check the aliases. Case is not important.

Parameters:
nameThe name or alias of the surface to find.
Exceptions:
std::out_of_rangeThrown if no surface with the given name exists.

Definition at line 81 of file Room.cpp.

const string & Room::getFrameID ( ) const

Frame ID value accessor.

Get the frame ID value of this Room.

Returns:
The frame ID value.

Definition at line 32 of file Room.cpp.

const string & Room::getName ( ) const

Name value accessor.

Get the name value of this Room.

Returns:
The name value.

Definition at line 22 of file Room.cpp.

size_t Room::getNumSurfaces ( ) const

Surfaces size accessor.

Get the number of surfaces of this World.

Returns:
The number of surfaces of this World.

Definition at line 47 of file Room.cpp.

const Surface & Room::getSurface ( const size_t  index) const

Surface value accessor.

Get the surface of this World at the given index.

Parameters:
iThe index of the Surface to get.
Returns:
The surface at the given index.
Exceptions:
std::out_of_rangeThrown if the surface at the given index does not exist.

Definition at line 52 of file Room.cpp.

const vector< Surface > & Room::getSurfaces ( ) const

Surfaces value accessor.

Get the surfaces of this World.

Returns:
The surfaces.

Definition at line 42 of file Room.cpp.

void Room::removeSurface ( const size_t  index)

Surface remover.

Remove the surface at the given index. An invalid index results in no effect.

Parameters:
iThe index of the surface to remove.
Exceptions:
std::out_of_rangeThrown if the surface at the given index does not exist.

Definition at line 69 of file Room.cpp.

void Room::setFrameID ( const std::string &  frame_id)

Frame ID value mutator.

Set the frame ID value of this Room.

Parameters:
frame_idThe new frame ID value.

Definition at line 37 of file Room.cpp.

void Room::setName ( const std::string &  name)

Name value mutator.

Set the name value of this Room.

Parameters:
nameThe new name value.

Definition at line 27 of file Room.cpp.


Member Data Documentation

Definition at line 137 of file Room.h.

std::string rail::interactive_world::Room::name_ [private]

Name of the surface and frame ID.

Definition at line 137 of file Room.h.

List of surfaces.

Definition at line 139 of file Room.h.


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


interactive_world_tools
Author(s): Russell Toris
autogenerated on Thu Jun 6 2019 21:34:15