API documentation
Module Class Reference
Module super class! ABC for all Objects in the sequence framework. More...
#include <Module.h>
Inheritance diagram for Module:
Collaboration diagram for Module:Public Member Functions | |
| Module () | |
| Constructor. | |
| virtual | ~Module () |
| Destructor. | |
| Module (const Module &) | |
| Copy constructor. | |
| virtual Module * | Clone () const =0 |
| Clone a module. | |
| virtual void | GetValue (double *dAllVal, double const time) |
| Get the value of this element. | |
| virtual bool | Prepare (PrepareMode mode) |
| Get values for available Transmit coils for simulation only. | |
| void | Initialize (DOMNode *node) |
| Initialize this module. | |
| Module * | GetParent () |
| Get Parent. | |
| virtual double | GetDuration () |
| virtual int | GetNumOfTPOIs () |
| Get the Number of TPOIs of this module. | |
| vector< Module * > | GetChildren () |
| Get Children. | |
| Module * | GetChild (unsigned int position) |
| Get Child. | |
| int | GetNumberOfChildren () |
| Get number of Children. | |
| bool | InsertChild (string name) |
| Insert Child. | |
| virtual Module * | GetPrototypeByAttributeValue (string name, string attrib) |
| Get a Prototype by value of an attribute. | |
| bool | AddDOMattribute (const string attribute, const string value) |
| Add attribute and value to the DOM node of this module. | |
| void | AddAllDOMattributes (bool show_hidden=true) |
| TPOI * | GetTPOIs () |
| get the TPOIs of this module | |
| void | DumpTree (string file="", Module *mod=NULL, int ichild=0, int level=0) |
| Dump the sequence tree. | |
| bool | WriteStaticXML (string xml_file) |
| Rewrite XML-tree where all expressions are evaluated (for IDEA). | |
| bool | StaticDOM (DOMDocument *doc, DOMNode *node, bool append=true) |
| Create a DOM tree where all expressions are evaluated (for IDEA). | |
Protected Member Functions | |
| virtual string | GetInfo () |
| Get informations on this module. | |
Protected Attributes | |
| SequenceTree * | m_seq_tree |
| Reference to single instance of the sequence tree. | |
| Parameters * | m_parameters |
| Pointer to the sole instance of the Parameters. | |
| TPOI | m_tpoi |
| Time points of interest are stored the referred repository. | |
| string | m_info |
| Information string for this module. | |
| double | m_duration |
| The duration of this module. | |
| int | m_calls |
| Number of calls of this module. | |
Detailed Description
Module super class! ABC for all Objects in the sequence framework.
Definition at line 38 of file Module.h.
Constructor & Destructor Documentation
| Module::Module | ( | ) |
Constructor.
Default constructor
Definition at line 32 of file Module.cpp.
References m_calls, m_duration, Prototype::m_node, and m_seq_tree.
| virtual Module::~Module | ( | ) | [inline, virtual] |
| Module::Module | ( | const Module & | ) |
Copy constructor.
Default copy constructor.
Member Function Documentation
| void Module::AddAllDOMattributes | ( | bool | show_hidden = true |
) |
More elaborate desciption here please
Definition at line 138 of file Module.cpp.
References AddDOMattribute(), Attribute::GetAddress(), Attribute::GetTypeID(), Attribute::IsObservable(), Attribute::IsPublic(), and Prototype::m_attributes.
Referenced by SequenceTree::SerializeModules(), and WriteStaticXML().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Module::AddDOMattribute | ( | const string | attribute, | |
| const string | value | |||
| ) |
Add attribute and value to the DOM node of this module.
- Parameters:
-
attribute The new attribute of the DOMNode value The corresponding value
- Returns:
- False, if attribute already exists in DOM (XML)
Definition at line 126 of file Module.cpp.
References Prototype::HasDOMattribute(), and Prototype::m_node.
Referenced by AddAllDOMattributes(), and TriangleGradPulse::Prepare().
Here is the call graph for this function:
Here is the caller graph for this function:| virtual Module* Module::Clone | ( | ) | const [pure virtual] |
Clone a module.
Create and recieve a Clone of an unprepared module.
Implements Prototype.
Implemented in AnalyticGradPulse, AtomicSequence, ConcatSequence, ConstantGradPulse, DelayAtomicSequence, EmptyPulse, ExternalGradPulse, Parameters, SpiralGradPulse, TrapGradPulse, and TriangleGradPulse.
Referenced by ModulePrototypeFactory::CloneModule().
Here is the caller graph for this function:| void Module::DumpTree | ( | string | file = "", |
|
| Module * | mod = NULL, |
|||
| int | ichild = 0, |
|||
| int | level = 0 | |||
| ) |
Dump the sequence tree.
- Parameters:
-
file Optional output file. If, NULL stdout is used. mod The starting module from which the tree is dumped. ichild More elaborate description level More elaborate description
Definition at line 241 of file Module.cpp.
References GetChild(), GetChildren(), Prototype::GetClassType(), SequenceTree::GetDepth(), GetDuration(), GetInfo(), Prototype::GetName(), GetNumOfTPOIs(), Prototype::GetType(), and m_seq_tree.
Here is the call graph for this function:| Module * Module::GetChild | ( | unsigned int | position | ) |
Get Child.
- Parameters:
-
position The position in the list of children.
Definition at line 91 of file Module.cpp.
References SequenceTree::GetChild(), Prototype::m_node, and m_seq_tree.
Referenced by DumpTree(), DelayAtomicSequence::GetDelay(), DelayAtomicSequence::Prepare(), DelayAtomicSequence::SearchStartStopSeq(), and SequenceTree::SerializeModules().
Here is the call graph for this function:
Here is the caller graph for this function:| vector< Module * > Module::GetChildren | ( | ) |
Get Children.
- Returns:
- Vector of child modules.
Definition at line 83 of file Module.cpp.
References SequenceTree::GetChildren(), Prototype::m_node, and m_seq_tree.
Referenced by AtomicSequence::CollectTPOIs(), DumpTree(), ConcatSequence::GetDuration(), AtomicSequence::GetDuration(), GetNumberOfChildren(), Sequence::GetNumOfADCs(), ConcatSequence::GetNumOfTPOIs(), ConcatSequence::GetValue(), AtomicSequence::GetValue(), SequenceTree::Populate(), Sequence::Prepare(), Model::RunSequenceTree(), and Sequence::WriteSeqFile().
Here is the call graph for this function:
Here is the caller graph for this function:| virtual double Module::GetDuration | ( | ) | [inline, virtual] |
Get the duration of this module.
- Returns:
- Duration in ms
Reimplemented in AtomicSequence, ConcatSequence, Pulse, and Sequence.
Definition at line 129 of file Module.h.
Referenced by DumpTree(), and DelayAtomicSequence::GetDelay().
Here is the caller graph for this function:| virtual string Module::GetInfo | ( | ) | [inline, protected, virtual] |
Get informations on this module.
- Returns:
- Some useful information of a specific module
Reimplemented in AnalyticGradPulse, AtomicSequence, ConcatSequence, ConstantGradPulse, DelayAtomicSequence, EmptyPulse, ExternalGradPulse, GradPulse, Pulse, SpiralGradPulse, TrapGradPulse, and TriangleGradPulse.
Definition at line 223 of file Module.h.
Referenced by DumpTree().
Here is the caller graph for this function:| int Module::GetNumberOfChildren | ( | ) |
Get number of Children.
- Returns:
- Number of child modules.
Definition at line 99 of file Module.cpp.
References GetChildren().
Referenced by DelayAtomicSequence::GetDelay(), DelayAtomicSequence::Prepare(), DelayAtomicSequence::SearchStartStopSeq(), and SequenceTree::SerializeModules().
Here is the call graph for this function:
Here is the caller graph for this function:| virtual int Module::GetNumOfTPOIs | ( | ) | [inline, virtual] |
Get the Number of TPOIs of this module.
- Returns:
- The size of the member m_tpoi
Reimplemented in ConcatSequence.
Definition at line 136 of file Module.h.
References TPOI::GetSize(), and m_tpoi.
Referenced by AtomicSequence::CollectTPOIs(), DumpTree(), Sequence::GetNumOfADCs(), Model::RunSequenceTree(), and Sequence::WriteSeqFile().
Here is the call graph for this function:
Here is the caller graph for this function:| Module * Module::GetParent | ( | ) | [virtual] |
Get Parent.
- Returns:
- Parent module.
Reimplemented from Prototype.
Definition at line 75 of file Module.cpp.
References SequenceTree::GetParent(), Prototype::m_node, and m_seq_tree.
Referenced by DelayAtomicSequence::GetDelay(), Sequence::Prepare(), GradPulse::PrepareNLGfield(), and DelayAtomicSequence::SearchStartStopSeq().
Here is the call graph for this function:
Here is the caller graph for this function:| Module * Module::GetPrototypeByAttributeValue | ( | string | name, | |
| string | attrib | |||
| ) | [virtual] |
Get a Prototype by value of an attribute.
- Returns:
- Found Prototype
Reimplemented from Prototype.
Definition at line 70 of file Module.cpp.
References SequenceTree::GetModuleByAttributeValue(), and m_seq_tree.
Here is the call graph for this function:| TPOI* Module::GetTPOIs | ( | ) | [inline] |
get the TPOIs of this module
- Returns:
- Pointer to the private member TPOI.
Definition at line 188 of file Module.h.
References m_tpoi.
Referenced by AtomicSequence::CollectTPOIs(), and Model::RunSequenceTree().
Here is the caller graph for this function:| virtual void Module::GetValue | ( | double * | dAllVal, | |
| double const | time | |||
| ) | [inline, virtual] |
Get the value of this element.
Calculate the value of the particular pulse at a given time in a given cycle and put the values put the values in dAllVal. Successors must implements this method.
- Parameters:
-
dAllVal is an array of 5 doubles. {amplitude, phase, Gx, Gy, Gz} Gx, Gy, Gz equal to 1.0 for the direction of the Axis. 0.0 else. time constant double value of the time of invocation.
Reimplemented in AtomicSequence, ConcatSequence, DelayAtomicSequence, GradPulse, Pulse, and Sequence.
| void Module::Initialize | ( | DOMNode * | node | ) | [virtual] |
Initialize this module.
The first step after cloning! The method sets the Name of the Module, and pointers to the referring node and the (unique) SequenceTree.
- Parameters:
-
node The DOMNode referring to this module.
Implements Prototype.
Definition at line 42 of file Module.cpp.
References SequenceTree::GetParameters(), SequenceTree::instance(), Prototype::m_node, m_parameters, m_seq_tree, and Prototype::SetName().
Referenced by SequenceTree::CreateModule(), InsertChild(), and SequenceTree::SerializeModules().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Module::InsertChild | ( | string | name | ) |
Insert Child.
- Parameters:
-
name The name of the module from the ModulePrototypeFactory
- Returns:
- Success
Definition at line 107 of file Module.cpp.
References ModulePrototypeFactory::CloneModule(), SequenceTree::GetDOMDocument(), SequenceTree::GetModuleMap(), SequenceTree::GetMPF(), Prototype::GetNode(), Initialize(), and m_seq_tree.
Referenced by DelayAtomicSequence::Prepare().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Module::Prepare | ( | PrepareMode | mode | ) | [virtual] |
Get values for available Transmit coils for simulation only.
Get the values for each Transmit channel in this atomic sequence. And return the in dAllVal.
- Parameters:
-
dAllVal represents the pointer to array where results are returned. time represents the time of invocation. pos represents the position in x, y, z. Prepare this pulse. Called twice when root node prepares. First time not verbose. Successors must overload this method. mode Sets the preparation mode, one of enum PrepareMode {PREP_INIT,PREP_VERBOSE,PREP_UPDATE}.
Implements Prototype.
Reimplemented in AnalyticGradPulse, AtomicSequence, ConcatSequence, ConstantGradPulse, DelayAtomicSequence, EmptyPulse, ExternalGradPulse, GradPulse, Parameters, Pulse, Sequence, SpiralGradPulse, TrapGradPulse, and TriangleGradPulse.
Definition at line 60 of file Module.cpp.
References m_duration.
Referenced by SequenceTree::SerializeModules().
Here is the caller graph for this function:| bool Module::StaticDOM | ( | DOMDocument * | doc, | |
| DOMNode * | node, | |||
| bool | append = true | |||
| ) |
Create a DOM tree where all expressions are evaluated (for IDEA).
- Parameters:
-
node the DOM
- Returns:
- success or failure
Definition at line 354 of file Module.cpp.
Referenced by WriteStaticXML().
Here is the caller graph for this function:| bool Module::WriteStaticXML | ( | string | xml_file | ) |
Rewrite XML-tree where all expressions are evaluated (for IDEA).
- Parameters:
-
xml_file name of XML file
- Returns:
- success or failure
Definition at line 318 of file Module.cpp.
References AddAllDOMattributes(), Prototype::GetNode(), SequenceTree::GetParameters(), m_seq_tree, Prototype::SetNode(), StaticDOM(), and XMLIO::Write().
Here is the call graph for this function:The documentation for this class was generated from the following files:





























