Salome HOME
[EDF28974] : Move to python implementation of driver and integrate monitoring into...
[modules/yacs.git] / src / engine / Node.cxx
index 18309aa9a9ad41b7b7dc5eb4518e87e45a9c4adb..b2e41304dbad4c9e6beef515195c04789f794d3e 100644 (file)
@@ -27,6 +27,7 @@
 #include "InputDataStreamPort.hxx"
 #include "OutputDataStreamPort.hxx"
 #include <iostream>
+#include <fstream>
 
 //#define _DEVDEBUG_
 #include "YacsTrace.hxx"
@@ -616,6 +617,12 @@ void Node::writeDot(std::ostream &os) const
   os << getQualifiedName() <<"\"];\n";
 }
 
+void Node::writeDotInFile(const std::string& fileName) const
+{
+  std::ofstream f(fileName);
+  this->writeDot(f);
+}
+
 //! same as Node::getName() in most cases, but differs for children of switch
 /*!
  *  used by writeDot to distinguish children of switch, by adding a prefix to the name.