Version: 8.3.0
YACS::HMI::VisitorSaveGuiSchema Class Reference

#include <VisitorSaveGuiSchema.hxx>

Inheritance diagram for YACS::HMI::VisitorSaveGuiSchema:
Collaboration diagram for YACS::HMI::VisitorSaveGuiSchema:

Public Member Functions

 VisitorSaveGuiSchema (YACS::ENGINE::Proc *proc)
 
virtual ~VisitorSaveGuiSchema ()
 
virtual void visitProc ()
 
- Public Member Functions inherited from YACS::ENGINE::VisitorSaveSalomeSchema
 VisitorSaveSalomeSchema (ComposedNode *root)
 
virtual ~VisitorSaveSalomeSchema ()
 
virtual void visitPresetNode (DataNode *node)
 
virtual void visitOutNode (DataNode *node)
 
virtual void visitStudyInNode (DataNode *node)
 
virtual void visitStudyOutNode (DataNode *node)
 
- Public Member Functions inherited from YACS::ENGINE::VisitorSaveSchema
 VisitorSaveSchema (ComposedNode *root)
 
virtual ~VisitorSaveSchema ()
 
void openFileSchema (std::string xmlDump) throw (Exception)
 
void closeFileSchema ()
 
virtual void visitBloc (Bloc *node)
 
virtual void visitElementaryNode (ElementaryNode *node)
 
virtual void visitForEachLoop (ForEachLoop *node)
 
virtual void visitOptimizerLoop (OptimizerLoop *node)
 
virtual void visitDynParaLoop (DynParaLoop *node)
 
virtual void visitForLoop (ForLoop *node)
 
virtual void visitInlineNode (InlineNode *node)
 
virtual void visitInlineFuncNode (InlineFuncNode *node)
 
virtual void visitLoop (Loop *node)
 
virtual void visitProc (Proc *node)
 
virtual void visitServiceNode (ServiceNode *node)
 
virtual void visitServerNode (ServerNode *node)
 
virtual void visitServiceInlineNode (ServiceInlineNode *node)
 
virtual void visitSwitch (Switch *node)
 
virtual void visitWhileLoop (WhileLoop *node)
 
- Public Member Functions inherited from YACS::ENGINE::Visitor
 Visitor (ComposedNode *root)
 

Protected Member Functions

virtual void writePresentation ()
 
virtual void writeItem (std::string name, SceneNodeItem *item)
 
- Protected Member Functions inherited from YACS::ENGINE::VisitorSaveSalomeSchema
virtual void writeDataNodeParameters (DataNode *node)
 
virtual void writeStudyInNodeParameters (DataNode *node)
 
virtual void writeOutNodeParameters (DataNode *node)
 
virtual void writeStudyOutNodeParameters (DataNode *node)
 
- Protected Member Functions inherited from YACS::ENGINE::VisitorSaveSchema
virtual void writeProperties (Node *node)
 
virtual void dumpTypeCode (TypeCode *type, std::set< std::string > &typeNames, std::map< std::string, TypeCode * > &typeMap, int depth)
 
virtual void writeTypeCodes (Proc *proc)
 
virtual void writeContainers (Proc *proc)
 
virtual void writeComponentInstances (Proc *proc)
 
virtual void writeInputPorts (Node *node)
 
virtual void writeInputDataStreamPorts (Node *node)
 
virtual void writeOutputPorts (Node *node)
 
virtual void writeOutputDataStreamPorts (Node *node)
 
virtual void writeControls (ComposedNode *node)
 
virtual void writeSimpleDataLinks (ComposedNode *node)
 
virtual void writeSimpleStreamLinks (ComposedNode *node)
 
virtual void writeParameters (Proc *proc)
 
virtual void writeParametersNode (ComposedNode *proc, Node *node)
 
virtual void beginCase (Node *node)
 
virtual void endCase (Node *node)
 
std::set< Node * > getAllNodes (ComposedNode *node)
 
int depthNode (Node *node)
 
std::string indent (int val)
 
- Protected Member Functions inherited from YACS::ENGINE::Visitor
std::map< std::string,
std::string > 
getNodeProperties (Node *node)
 
std::map< std::string, TypeCode * > getTypeCodeMap (Proc *proc)
 
std::map< std::string,
Container * > 
getContainerMap (Proc *proc)
 
std::list< TypeCodeObjref * > getListOfBases (TypeCodeObjref *objref)
 

Protected Attributes

YACS::ENGINE::Proc_proc
 

Detailed Description

Definition at line 39 of file VisitorSaveGuiSchema.hxx.

Constructor & Destructor Documentation

VisitorSaveGuiSchema::VisitorSaveGuiSchema ( YACS::ENGINE::Proc proc)

Definition at line 36 of file VisitorSaveGuiSchema.cxx.

References DEBTRACE.

37  : VisitorSaveSalomeSchema(proc), _proc(proc)
38 {
39  DEBTRACE("VisitorSaveGuiSchema::VisitorSaveGuiSchema");
40 }
VisitorSaveGuiSchema::~VisitorSaveGuiSchema ( )
virtual

Definition at line 42 of file VisitorSaveGuiSchema.cxx.

References DEBTRACE.

43 {
44  DEBTRACE("VisitorSaveGuiSchema::~VisitorSaveGuiSchema");
45 }

Member Function Documentation

void VisitorSaveGuiSchema::visitProc ( )
virtual

Definition at line 47 of file VisitorSaveGuiSchema.cxx.

References _proc, DEBTRACE, and writePresentation().

Referenced by YACS::HMI::GenericGui::onExportSchema(), and YACS::HMI::GenericGui::onExportSchemaAs().

48 {
49  DEBTRACE("VisitorSaveGuiSchema::visitProc");
50  VisitorSaveSalomeSchema::visitProc(_proc);
52 }
void VisitorSaveGuiSchema::writeItem ( std::string  name,
SceneNodeItem item 
)
protectedvirtual

Definition at line 78 of file VisitorSaveGuiSchema.cxx.

References YACS::ENGINE::VisitorSaveSchema::_out, YACS::HMI::SceneNodeItem::getExpandedHeight(), YACS::HMI::SceneNodeItem::getExpandedWidth(), YACS::HMI::SceneNodeItem::getExpandedX(), YACS::HMI::SceneNodeItem::getExpandedY(), YACS::HMI::AbstractSceneItem::getHeight(), YACS::HMI::SceneNodeItem::getShownState(), YACS::HMI::AbstractSceneItem::getWidth(), YACS::ENGINE::VisitorSaveSchema::indent(), and YACS::HMI::SceneNodeItem::isExpanded().

Referenced by writePresentation().

79 {
80  int depth = 1;
81  _out << indent(depth) << "<presentation";
82  _out << " name=\"" << name << "\"";
83  _out << " x=\"" << item->x() << "\"";
84  _out << " y=\"" << item->y() << "\"";
85  _out << " width=\"" << item->getWidth() << "\"";
86  _out << " height=\"" << item->getHeight() << "\"";
87  _out << " expanded=\"" << item->isExpanded() << "\"";
88  _out << " expx=\"" << item->getExpandedX() << "\"";
89  _out << " expy=\"" << item->getExpandedY() << "\"";
90  _out << " expWidth=\"" << item->getExpandedWidth() << "\"";
91  _out << " expHeight=\"" << item->getExpandedHeight() << "\"";
92  _out << " shownState=\"" << item->getShownState() << "\"";
93  _out << "/>" << endl;
94 }
void VisitorSaveGuiSchema::writePresentation ( )
protectedvirtual

Definition at line 54 of file VisitorSaveGuiSchema.cxx.

References YACS::HMI::QtGuiContext::_mapOfSceneItem, YACS::HMI::GuiContext::_mapOfSubjectNode, _proc, DEBTRACE, YACS::ENGINE::VisitorSaveSchema::getAllNodes(), YACS::ENGINE::ComposedNode::getChildName(), YACS::HMI::QtGuiContext::getQtCurrent(), YACS::HMI::GuiContext::getSubjectProc(), writeItem(), and YASSERT.

Referenced by visitProc().

55 {
56  DEBTRACE("VisitorSaveGuiSchema::writePresentation");
57  set<Node*> nodeSet = getAllNodes(_proc);
58 
59  for (set<Node*>::iterator iter = nodeSet.begin(); iter != nodeSet.end(); ++iter)
60  {
61  Node* node = *iter;
64  YASSERT(item);
65  SceneNodeItem* inode = dynamic_cast<SceneNodeItem*>(item);
66  YASSERT(inode);
67  writeItem(_proc->getChildName(node), inode);
68  }
69 
72  YASSERT(item);
73  SceneNodeItem* inode = dynamic_cast<SceneNodeItem*>(item);
74  YASSERT(inode);
75  writeItem("__ROOT__", inode);
76 }

Member Data Documentation

YACS::ENGINE::Proc* YACS::HMI::VisitorSaveGuiSchema::_proc
protected

Definition at line 50 of file VisitorSaveGuiSchema.hxx.

Referenced by visitProc(), and writePresentation().


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