![]() |
COOLFluiD
Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
|
Manages a set of maps. More...
#include <SignalFrame.hpp>
Public Member Functions | |
| SignalFrame (XmlNode xml=XmlNode()) | |
| SignalFrame (boost::shared_ptr< XmlDoc > doc) | |
| SignalFrame (const std::string &target, const URI &sender, const URI &receiver) | |
| ~SignalFrame () | |
| Destructor. More... | |
| XmlNode | set_option (const std::string &value_key, const std::string type_name, const std::string &value_str, const std::string &descr=std::string()) |
| XmlNode | set_array (const std::string &value_key, const std::string element_type_name, const std::string &value_str, const std::string &delimiter, const std::string &descr=std::string()) |
| template<typename TYPE > | |
| TYPE | get_option (const std::string &name) const |
| template<typename TYPE > | |
| std::vector< TYPE > | get_array (const std::string &name) const |
| bool | has_map (const std::string &name) const |
| bool | has_entry (const std::string &name) const |
| bool | has_reply () const |
| SignalFrame & | map (const std::string &name) |
| const SignalFrame & | map (const std::string &name) const |
| SignalFrame | create_reply (const URI &sender=URI()) |
| SignalFrame | get_reply () const |
| void | insert (std::vector< std::string > &input) |
| Inserts the options, translating them from strings. More... | |
| std::string | to_script (int indentation=0) const |
| Converts this signal to a string in the CF script format. More... | |
| std::string | to_python_script (int indentation=0) const |
| Converts this signal to a string in the CF python script format. More... | |
| void | flush_maps () |
Flushes internal SignalOptions maps. More... | |
| SignalOptions & | options (const std::string &name=std::string()) |
| const SignalOptions & | options (const std::string &name=std::string()) const |
Public Attributes | |
| XmlNode | node |
| The frame node. More... | |
| Map | main_map |
| The main map. More... | |
| boost::shared_ptr< XmlDoc > | xml_doc |
Private Attributes | |
| std::map< std::string, SignalFrame > | m_maps |
| Maps contained in this frame. More... | |
| std::map< std::string, SignalOptions > | m_options |
Manages a set of maps.
Definition at line 31 of file SignalFrame.hpp.
| SignalFrame | ( | XmlNode | xml = XmlNode() | ) |
| SignalFrame | ( | boost::shared_ptr< XmlDoc > | doc | ) |
Constructor
| doc | The document the frame is based on. |
Definition at line 85 of file SignalFrame.cpp.
| SignalFrame | ( | const std::string & | target, |
| const URI & | sender, | ||
| const URI & | receiver | ||
| ) |
Contructor. Builds a new XML document and adds frame node to it.
| target | The signal name. |
| sender | The sender CPATH. |
| receiver | The receiver CPATH |
Definition at line 138 of file SignalFrame.cpp.
| ~SignalFrame | ( | ) |
Destructor.
Definition at line 152 of file SignalFrame.cpp.
| SignalFrame create_reply | ( | const URI & | sender = URI() | ) |
Creates a reply to this signal. The reply is created as a sibling node and has the same parent as this frame node.
| sender | The sender CPATH. If empty, or not a CPATH, the receiver of this frame node is used. |
| XmlError | If the sender argument is not valid and the receiver could not be found in the frame node. |
Definition at line 253 of file SignalFrame.cpp.
| void flush_maps | ( | ) |
Flushes internal SignalOptions maps.
Definition at line 343 of file SignalFrame.cpp.
| std::vector< TYPE > get_array | ( | const std::string & | name | ) | const |
Gets an array from the main map.
| name | The array name. |
Definition at line 201 of file SignalFrame.cpp.
| TYPE get_option | ( | const std::string & | name | ) | const |
Gets an option from the main map.
| name | The option name. |
Definition at line 182 of file SignalFrame.cpp.
| SignalFrame get_reply | ( | ) | const |
Retrieves the reply to this signal.
Definition at line 279 of file SignalFrame.cpp.
| bool has_entry | ( | const std::string & | name | ) | const |
Checks if an option or array exists with specified name
| name | the name of the option |
Definition at line 191 of file SignalFrame.cpp.
| bool has_map | ( | const std::string & | name | ) | const |
Checks wether a frame the a specified name exists.
| name | The frame name |
true if the frame exists, otherwise, returns false. Definition at line 210 of file SignalFrame.cpp.
| bool has_reply | ( | ) | const |
Checks whether a reply for this present as sibling node of this signal.
true if a reply has been found; otherwise, returns false. Definition at line 217 of file SignalFrame.cpp.
| void insert | ( | std::vector< std::string > & | input | ) |
Inserts the options, translating them from strings.
Definition at line 300 of file SignalFrame.cpp.
| SignalFrame & map | ( | const std::string & | name | ) |
Returns a sub-frame with a specified name. If the frame does not exist yet, it is created.
| name | The frame name. |
Definition at line 224 of file SignalFrame.cpp.
| const SignalFrame & map | ( | const std::string & | name | ) | const |
Returns a sub-frame with a specified name. The frame must exist.
| name | The frame name. |
Definition at line 241 of file SignalFrame.cpp.
| SignalOptions & options | ( | const std::string & | name = std::string() | ) |
Definition at line 362 of file SignalFrame.cpp.
| const SignalOptions & options | ( | const std::string & | name = std::string() | ) | const |
Definition at line 377 of file SignalFrame.cpp.
| XmlNode set_array | ( | const std::string & | value_key, |
| const std::string | element_type_name, | ||
| const std::string & | value_str, | ||
| const std::string & | delimiter, | ||
| const std::string & | descr = std::string() |
||
| ) |
Sets an option to the main map. #Map::set_array_value() is used to acheive this.
| name | The option name. |
| value | The option value. |
| delimiter | The delimiter string. |
Definition at line 172 of file SignalFrame.cpp.
| XmlNode set_option | ( | const std::string & | value_key, |
| const std::string | type_name, | ||
| const std::string & | value_str, | ||
| const std::string & | descr = std::string() |
||
| ) |
Sets an option to the main map. #Map::set_single_value() is used to acheive this.
| name | The option name. |
| value | The option value. |
Definition at line 163 of file SignalFrame.cpp.
| std::string to_python_script | ( | int | indentation = 0 | ) | const |
Converts this signal to a string in the CF python script format.
Definition at line 428 of file SignalFrame.cpp.
| std::string to_script | ( | int | indentation = 0 | ) | const |
Converts this signal to a string in the CF script format.
Definition at line 392 of file SignalFrame.cpp.
|
private |
Maps contained in this frame.
Definition at line 154 of file SignalFrame.hpp.
|
private |
Definition at line 156 of file SignalFrame.hpp.
| Map main_map |
The main map.
Definition at line 141 of file SignalFrame.hpp.
| XmlNode node |
The frame node.
Definition at line 138 of file SignalFrame.hpp.
| boost::shared_ptr<XmlDoc> xml_doc |
The XML document. This pointer is not null only if a document was created by this class.
Definition at line 145 of file SignalFrame.hpp.
1.8.9.1
|
Send comments to: COOLFluiD Web Admin |