Version: 8.3.0
YACS::HMI::ProcInvoc Class Reference

#include <commandsProc.hxx>

Inheritance diagram for YACS::HMI::ProcInvoc:
Collaboration diagram for YACS::HMI::ProcInvoc:

Public Member Functions

 ProcInvoc ()
 
- Public Member Functions inherited from YACS::HMI::Invocator
 Invocator ()
 
void add (Command *command)
 
bool undo ()
 
bool redo ()
 
std::list< std::string > getDone ()
 
std::list< std::string > getUndone ()
 
YACS::ENGINE::ProcgetUndoProc ()
 
YACS::ENGINE::CataloggetUndoCata ()
 
bool isSpecialReverse ()
 

Static Public Member Functions

static TypeOfElem getTypeOfNode (YACS::ENGINE::Node *node)
 
static TypeOfElem getTypeOfPort (YACS::ENGINE::DataPort *port)
 
static std::string getTypeName (TypeOfElem type)
 

Static Protected Attributes

static std::map< int, std::string > _typeNameMap
 

Additional Inherited Members

- Static Public Attributes inherited from YACS::HMI::Invocator
static int _ctr = 0
 
- Protected Attributes inherited from YACS::HMI::Invocator
std::vector< Command * > _commandsDone
 
std::vector< Command * > _commandsUndone
 
std::vector< Command * > _commandsInProgress
 
YACS::ENGINE::Proc_undoProc
 
YACS::ENGINE::Catalog_undoCata
 
bool _isRedo
 
bool _isUndo
 
bool _specialReverse
 

Detailed Description

Definition at line 96 of file commandsProc.hxx.

Constructor & Destructor Documentation

ProcInvoc::ProcInvoc ( )

Definition at line 99 of file commandsProc.cxx.

References _typeNameMap, YACS::HMI::BLOC, YACS::HMI::COMPONENT, YACS::HMI::CONTAINER, YACS::HMI::CONTROLLINK, YACS::HMI::CORBANODE, YACS::HMI::CPPNODE, YACS::HMI::DATALINK, YACS::HMI::DATATYPE, YACS::HMI::DFTODSFORLOOPNODE, YACS::HMI::DSTODFFORLOOPNODE, YACS::HMI::FOREACHLOOP, YACS::HMI::FORLOOP, YACS::HMI::INPUTDATASTREAMPORT, YACS::HMI::INPUTPORT, YACS::HMI::OPTIMIZERLOOP, YACS::HMI::OUTNODE, YACS::HMI::OUTPUTDATASTREAMPORT, YACS::HMI::OUTPUTPORT, YACS::HMI::PRESETNODE, YACS::HMI::PYFUNCNODE, YACS::HMI::PYTHONNODE, YACS::HMI::REFERENCE, YACS::HMI::SALOMENODE, YACS::HMI::SALOMEPROC, YACS::HMI::SALOMEPYTHONNODE, YACS::HMI::SPLITTERNODE, YACS::HMI::STUDYINNODE, YACS::HMI::STUDYOUTNODE, YACS::HMI::SWITCH, YACS::HMI::WHILELOOP, and YACS::HMI::XMLNODE.

100  : Invocator()
101 {
102  _typeNameMap.clear();
103  _typeNameMap[SALOMEPROC] = "SALOMEPROC";
104  _typeNameMap[BLOC] = "BLOC";
105  _typeNameMap[FOREACHLOOP] = "FOREACHLOOP";
106  _typeNameMap[OPTIMIZERLOOP] = "OPTIMIZERLOOP";
107  _typeNameMap[FORLOOP] = "FORLOOP";
108  _typeNameMap[WHILELOOP] = "WHILELOOP";
109  _typeNameMap[SWITCH] = "SWITCH";
110  _typeNameMap[PYTHONNODE] = "PYTHONNODE";
111  _typeNameMap[PYFUNCNODE] = "PYFUNCNODE";
112  _typeNameMap[CORBANODE] = "CORBANODE";
113  _typeNameMap[SALOMENODE] = "SALOMENODE";
114  _typeNameMap[CPPNODE] = "CPPNODE";
115  _typeNameMap[SALOMEPYTHONNODE] = "SALOMEPYTHONNODE";
116  _typeNameMap[XMLNODE] = "XMLNODE";
117  _typeNameMap[SPLITTERNODE] = "SPLITTERNODE";
118  _typeNameMap[DFTODSFORLOOPNODE] = "DFTODSFORLOOPNODE";
119  _typeNameMap[DSTODFFORLOOPNODE] = "DSTODFFORLOOPNODE";
120  _typeNameMap[PRESETNODE] = "PRESETNODE";
121  _typeNameMap[OUTNODE] = "OUTNODE";
122  _typeNameMap[STUDYINNODE] = "STUDYINNODE";
123  _typeNameMap[STUDYOUTNODE] = "STUDYOUTNODE";
124  _typeNameMap[INPUTPORT] = "INPUTPORT";
125  _typeNameMap[OUTPUTPORT] = "OUTPUTPORT";
126  _typeNameMap[INPUTDATASTREAMPORT] = "INPUTDATASTREAMPORT";
127  _typeNameMap[OUTPUTDATASTREAMPORT] = "OUTPUTDATASTREAMPORT";
128  _typeNameMap[DATALINK] = "DATALINK";
129  _typeNameMap[CONTROLLINK] = "CONTROLLINK";
130  _typeNameMap[CONTAINER] = "CONTAINER";
131  _typeNameMap[COMPONENT] = "COMPONENT";
132  _typeNameMap[REFERENCE] = "REFERENCE";
133  _typeNameMap[DATATYPE] = "DATATYPE";
134 }

Member Function Documentation

std::string ProcInvoc::getTypeName ( TypeOfElem  type)
static

Definition at line 170 of file commandsProc.cxx.

References _typeNameMap.

Referenced by YACS::HMI::CommandDestroy::dump(), and YACS::HMI::ItemEditionBase::ItemEditionBase().

171 {
172  if (_typeNameMap.count(type))
173  return _typeNameMap[type];
174  else
175  return "UNKNOWN";
176 }
TypeOfElem ProcInvoc::getTypeOfNode ( YACS::ENGINE::Node node)
static

Definition at line 136 of file commandsProc.cxx.

References YACS::HMI::BLOC, YACS::HMI::CORBANODE, YACS::HMI::CPPNODE, YACS::HMI::FOREACHLOOP, YACS::HMI::FORLOOP, YACS::HMI::OPTIMIZERLOOP, YACS::HMI::OUTNODE, YACS::HMI::PRESETNODE, YACS::HMI::PYFUNCNODE, YACS::HMI::PYTHONNODE, YACS::HMI::SALOMENODE, YACS::HMI::SALOMEPYTHONNODE, YACS::HMI::SPLITTERNODE, YACS::HMI::STUDYINNODE, YACS::HMI::STUDYOUTNODE, YACS::HMI::SWITCH, YACS::HMI::UNKNOWN, YACS::HMI::WHILELOOP, and YACS::HMI::XMLNODE.

Referenced by YACS::HMI::SubjectComposedNode::addSubjectNode(), YACS::HMI::ItemEditionBase::ItemEditionBase(), YACS::HMI::CommandAddNodeFromCatalog::localExecute(), YACS::HMI::CommandReparentNode::localExecute(), YACS::HMI::CommandPutInComposedNode::localExecute(), YACS::HMI::CommandReparentNode::localReverse(), YACS::HMI::CommandPutInComposedNode::localReverse(), YACS::HMI::SubjectNode::notifyObserver(), YACS::HMI::SchemaInPortItem::SchemaInPortItem(), and YACS::HMI::SchemaInPortItem::update().

137 {
138  TypeOfElem nodeType = UNKNOWN;
139  if (dynamic_cast<YACS::ENGINE::Bloc*>(node)) nodeType = BLOC;
140  else if (dynamic_cast<YACS::ENGINE::PythonNode*>(node)) nodeType = PYTHONNODE;
141  else if (dynamic_cast<YACS::ENGINE::PyFuncNode*>(node)) nodeType = PYFUNCNODE;
142  else if (dynamic_cast<YACS::ENGINE::CORBANode*>(node)) nodeType = CORBANODE;
143  else if (dynamic_cast<YACS::ENGINE::CppNode*>(node)) nodeType = CPPNODE;
144  else if (dynamic_cast<YACS::ENGINE::SalomeNode*>(node)) nodeType = SALOMENODE;
145  else if (dynamic_cast<YACS::ENGINE::SalomePythonNode*>(node)) nodeType = SALOMEPYTHONNODE;
146  else if (dynamic_cast<YACS::ENGINE::XmlNode*>(node)) nodeType = XMLNODE;
147  else if (dynamic_cast<YACS::ENGINE::SplitterNode*>(node)) nodeType = SPLITTERNODE;
148  else if (dynamic_cast<YACS::ENGINE::ForLoop*>(node)) nodeType = FORLOOP;
149  else if (dynamic_cast<YACS::ENGINE::WhileLoop*>(node)) nodeType = WHILELOOP;
150  else if (dynamic_cast<YACS::ENGINE::Switch*>(node)) nodeType = SWITCH;
151  else if (dynamic_cast<YACS::ENGINE::ForEachLoop*>(node)) nodeType = FOREACHLOOP;
152  else if (dynamic_cast<YACS::ENGINE::OptimizerLoop*>(node)) nodeType = OPTIMIZERLOOP;
153  else if (dynamic_cast<YACS::ENGINE::PresetNode*>(node)) nodeType = PRESETNODE;
154  else if (dynamic_cast<YACS::ENGINE::OutNode*>(node)) nodeType = OUTNODE;
155  else if (dynamic_cast<YACS::ENGINE::StudyInNode*>(node)) nodeType = STUDYINNODE;
156  else if (dynamic_cast<YACS::ENGINE::StudyOutNode*>(node)) nodeType = STUDYOUTNODE;
157  return nodeType;
158 }
TypeOfElem ProcInvoc::getTypeOfPort ( YACS::ENGINE::DataPort port)
static

Definition at line 160 of file commandsProc.cxx.

References YACS::HMI::INPUTDATASTREAMPORT, YACS::HMI::INPUTPORT, YACS::HMI::OUTPUTDATASTREAMPORT, YACS::HMI::OUTPUTPORT, and YACS::HMI::UNKNOWN.

Referenced by YACS::HMI::SchemaInPortItem::dropMimeData(), YACS::HMI::ItemEditionBase::ItemEditionBase(), YACS::HMI::SchemaInPortItem::SchemaInPortItem(), YACS::HMI::SchemaOutPortItem::SchemaOutPortItem(), and YACS::HMI::SchemaInPortItem::update().

161 {
162  TypeOfElem portType = UNKNOWN;
163  if (dynamic_cast<YACS::ENGINE::InputPort*>(port)) portType = INPUTPORT;
164  else if (dynamic_cast<YACS::ENGINE::OutputPort*>(port)) portType = OUTPUTPORT;
165  else if (dynamic_cast<YACS::ENGINE::InputDataStreamPort*>(port)) portType = INPUTDATASTREAMPORT;
166  else if (dynamic_cast<YACS::ENGINE::OutputDataStreamPort*>(port)) portType = OUTPUTDATASTREAMPORT;
167  return portType;
168 }

Member Data Documentation

std::map< int, std::string > ProcInvoc::_typeNameMap
staticprotected

Definition at line 104 of file commandsProc.hxx.

Referenced by getTypeName(), and ProcInvoc().


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