Fawkes API  Fawkes Development Version
fawkes::RCSoftMapGraph Class Reference

Read RCSoft map graphs. More...

#include <>>

Public Member Functions

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

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

Definition at line 41 of file rcsoft_map_graph.h.

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.

Referenced by fawkes::EclExternalRCSoftMapGraph::map_graph().

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.

Referenced by fawkes::EclExternalRCSoftMapGraph::map_graph().

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.

Referenced by fawkes::EclExternalRCSoftMapGraph::map_graph().

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.

Referenced by fawkes::EclExternalRCSoftMapGraph::map_graph().


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