Fawkes API  Fawkes Development Version
fawkes::RCSoftMapGraph Class Reference

Read RCSoft map graphs. More...

#include <>>

List of all members.

Public Member Functions

 RCSoftMapGraph (std::string filename)
 Constructor.
 ~RCSoftMapGraph ()
 Destructor.
std::string graph_name ()
 Get graph name.
std::vector
< fawkes::RCSoftMapNode
nodes ()
 Get all parsed nodes.
fawkes::RCSoftMapNode node (std::string name_or_alias)
 Get node with given name or alias.
fawkes::RCSoftMapNode root_node ()
 Get root node.
fawkes::RCSoftMapNode closest_node (float pos_x, float pos_y, std::string property)
 Find node closest to a specified position.
std::vector
< fawkes::RCSoftMapNode
search_nodes (std::string property)
 Search nodes for specific property.

Detailed Description

Read RCSoft map graphs.

This class can be used to read and search map graphs of our old software framework RCSoft.

Author:
Tim Niemueller

Constructor & Destructor Documentation

fawkes::RCSoftMapGraph::RCSoftMapGraph ( std::string  filename)

Constructor.

Parameters:
filenamepath to the file to read

Definition at line 50 of file rcsoft_map_graph.cpp.

fawkes::RCSoftMapGraph::~RCSoftMapGraph ( )

Destructor.

Definition at line 66 of file rcsoft_map_graph.cpp.


Member Function Documentation

fawkes::RCSoftMapNode fawkes::RCSoftMapGraph::closest_node ( float  pos_x,
float  pos_y,
std::string  property 
)

Find node closest to a specified position.

Parameters:
pos_xX world coordinate of close point
pos_yY world coordinate of close point
propertyan optional property that nodes must have to be considered
Returns:
the closest node

Definition at line 256 of file rcsoft_map_graph.cpp.

std::string fawkes::RCSoftMapGraph::graph_name ( )

Get graph name.

Returns:
name of the graph.

Definition at line 180 of file rcsoft_map_graph.cpp.

RCSoftMapNode fawkes::RCSoftMapGraph::node ( std::string  name_or_alias)

Get node with given name or alias.

Parameters:
name_or_aliasname or alias to search for
Returns:
node with the given name or alias, or an invalid node if the node could not be found.

Definition at line 212 of file rcsoft_map_graph.cpp.

std::vector< fawkes::RCSoftMapNode > fawkes::RCSoftMapGraph::nodes ( )

Get all parsed nodes.

Returns:
vector of nodes

Definition at line 200 of file rcsoft_map_graph.cpp.

fawkes::RCSoftMapNode fawkes::RCSoftMapGraph::root_node ( )

Get root node.

Returns:
root node

Definition at line 190 of file rcsoft_map_graph.cpp.

std::vector< fawkes::RCSoftMapNode > fawkes::RCSoftMapGraph::search_nodes ( std::string  property)

Search nodes for specific property.

Searches all nodes and returns the ones which have the specified property.

Parameters:
propertyproperty to search for
Returns:
vector of nodes having the desired property

Definition at line 230 of file rcsoft_map_graph.cpp.


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