namespace GraphEditor {
-// class OutNode : public GraphBase::Graph {
class OutNode : public GraphBase::Base {
private :
bool Executable() ;
bool LoadNodes( map< string , int > & aMapOfNodes ,
- const GraphBase::ListOfNodes &aNodes ) ;
+ const GraphBase::ListOfSNodes &aNodes ) ;
bool LoadLinks( map< string , int > & aMapOfNodes ,
- const GraphBase::ListOfLinks &aLinks ) ;
+ const GraphBase::ListOfSLinks &aLinks ) ;
bool LoadDatas( map< string , int > & aMapOfNodes ,
- const GraphBase::ListOfLinks &aDatas ) ;
+ const GraphBase::ListOfSLinks &aDatas ) ;
// bool GraphEditor::OutNode::LinkSaveXML( ostream &f , char *Tabs ,
bool GraphEditor::OutNode::LinkSaveXML( QDomDocument & Graph , QDomElement & link ,
GraphBase::SLink aLink ,
bool wdata ) const ;
// bool SaveXML(ostream &f ) ;QDomDocument & Graph
- bool SaveXML(QDomDocument & Graph ) ;
+ bool SaveXML( ostream & f , QDomDocument & Graph ,
+ bool aSuperGraph , QDomElement & supergraph ) ;
bool GraphEditor::OutNode::LinkSavePY( ostream &f ,
const char *aGraphName ,
bool fromparam ,
bool toparam ,
bool wdata ) const;
- bool SavePY(ostream &f ) ;
+ bool SavePY(ostream &f , bool importSuperV ) ;
void DateModification() ;
+ // asv 20.09.04 added from GraphExecutor::FiniteStateMachine class (removed from there)
+// static map< string , GraphBase::Graph * > _MapOfGraphs ;
+// static map< string , int > _MapOfGraphNames ;
+
+// GraphBase::Graph * MapGraph( const char * aGraphName ) ;
+// bool MapGraph( GraphBase::Graph * aGraph , const char * aGraphName ) ;
+// void EraseGraph( const char * aGraphName ) ;
+// bool GraphName( const char * aGraphName ) ;
+// string GraphInstanceName( const char * aGraphName ) ;
+ // end added from FiniteStateMachine
+
+
public:
OutNode();
const char * DebugFileName ) ;
virtual ~OutNode();
+ bool Name( const char * aName ) ;
+
void Set_prof_debug( CORBA::ORB_ptr ORB , const char * DebugFileName ) ;
GraphBase::StreamGraph * StreamGraph() {
return _StreamGraph ; } ;
return _Graph ; } ;
bool LoadDataFlow( const GraphBase::SGraph *aDataFlow ) ;
- bool LoadXml( const char* myFileName ) ;
+ bool LoadXml( const char* myFileName , GraphBase::ListOfSGraphs & aListOfDataFlows ) ;
+// bool LoadXml( const char* myFileName ) ;
bool LoadInfo( const GraphBase::SNode &aDataFlowInfo ) ;
bool SaveXml(const char* myFileName ) ;
bool SavePy(const char* myFileName ) ;
// get all DataFlow informations (for a .XML file) :
- GraphBase::SGraph * GetDataFlow() ;
+ GraphBase::ListOfSGraphs * GetDataFlows( GraphBase::ListOfSGraphs * aListOfDataFlows ) ;
// void DateModification() ;
bool AddLink( const char* FromNodeName ,
const char* FromServiceParameterName ,
const char* ToNodeName ,
- const char* ToServiceParameterName ,
- const CORBA::Any aValue ) {
+ const char* ToServiceParameterName ) {
+// , const CORBA::Any aValue ) {
DateModification() ;
_Valid = false ;
return _Graph->AddLink( FromNodeName , FromServiceParameterName ,
- ToNodeName , ToServiceParameterName ,
- aValue ) ; } ;
+ ToNodeName , ToServiceParameterName ) ; } ;
+// , aValue ) ; } ;
bool RemoveLink( const char* FromNodeName ,
const char* FromServiceParameterName ,
const char* ToServiceParameterName ,
const int index , long &X , long &Y ) ;
- bool AddInputData( const char* ToNodeName1 ,
- const char* ToParameterName1 ,
- const char* ToNodeName2 ,
- const char* ToParameterName2 ) ;
bool IsValid() {
if ( !_Valid )
return _Valid ; } ;
bool IsNotValid() const {
return !_Valid ; } ;
- bool UnValid() {
- bool RetVal = _Valid ;
- _Valid = false ;
- return RetVal ; } ;
+ bool UnValid() ;
bool IsExecutable() {
if ( !_Valid )
bool IsNotExecutable() const {
return !_Executable ; } ;
+ // iterate through ALL links (OutPort-InPort pairs) and check if their types are
+ // compatible - IsCompatible(type1, type2).
+ // Returns true if all are compatible.
+ bool IsLinksCompatible();
+
+ // Returns true if an out-port of type "OutPortType" can be bound with
+ // in-port of type "InPortType". Called from IsLinksCompatible() and Link_Impl::IsValid().
+ bool IsCompatible( const char* OutPortType, const char* InPortType ) const;
+
const CORBA::Any *GetInData( const char *ToNodeName ,
const char *ToParameterName ) ;
const CORBA::Any *GetOutData( const char *FromNodeName ,