Skip to content

Commit

Permalink
this version won't compile since CallStack is TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciccio authored and Ciccio committed Oct 4, 2012
1 parent 19020d3 commit eb42a3e
Show file tree
Hide file tree
Showing 8 changed files with 363 additions and 313 deletions.
4 changes: 2 additions & 2 deletions AdjMatrix.cpp
Expand Up @@ -40,12 +40,12 @@ AdjMatrix::AdjMatrix(int n, int m) {
}
}

void AdjMatrix::toDot(Nodeset &Ns) {
void AdjMatrix::toDot(Nodeset &Ns, string fname) {
FILE *fid;
Nodeset::iterator i;
Nodeset::iterator j;
int ii=0, ij=0;
fid=fopen((string(protname) + ".dot").c_str(), "w");
fid=fopen((string(fname)).c_str(), "w");
string attr_string="";
std::map<std::string, std::string>::iterator mapit;
std::map<std::string, std::string> attribs;
Expand Down
2 changes: 1 addition & 1 deletion AdjMatrix.h
Expand Up @@ -17,7 +17,7 @@ class AdjMatrix {
virtual ~AdjMatrix();
AdjMatrix(int n, int m);
int *&operator[](unsigned i) {return *_mat[i];}
void toDot(Nodeset &ns);
void toDot(Nodeset &ns, string fname);
void Set(unsigned, unsigned);
ostream& operator>>(std::ostream &);

Expand Down
2 changes: 1 addition & 1 deletion Frame.cpp
Expand Up @@ -91,7 +91,7 @@ Linkable* Frame::doAction(ACTION_TYPE type, Linkable * p1, Linkable * p2, Linkab
if(FRAME_DEBUG) *l>>cout << endl;
return l;
}
else cerr << "Reference not found: " <<(const char *)p1;
else cerr << "Reference not found: " <<(const char *)p1 << endl;
exit(1);

case ACT_GRAPHNAME:
Expand Down
4 changes: 2 additions & 2 deletions Graph.cpp
Expand Up @@ -39,7 +39,7 @@ void Graph::Destroy(void)
}


void Graph::Visit(void)
AdjMatrix &Graph::Visit(void)
{
Node i;
Nodeset::iterator j;
Expand Down Expand Up @@ -80,7 +80,7 @@ while(!stack.empty()){

}
//adjmat >> cout;
adjmat.toDot(GetNodes());
return(adjmat);
//cout << "dot made... all done!" << endl;

}
Expand Down
3 changes: 2 additions & 1 deletion Graph.h
Expand Up @@ -10,6 +10,7 @@

#include "Nodeset.h"
#include "Edgeset.h"
#include "AdjMatrix.h"

class Graph : public Linkable {

Expand All @@ -22,7 +23,7 @@ class Graph : public Linkable {
void Destroy(void);
Nodeset& GetOutputs(void);
Nodeset& GetInputs(void);
void Visit(void);
AdjMatrix &Visit(void);
ostream& operator>>(std::ostream &);
Edgeset& GetEdges(void) {return _E;}
void AddEdges(Edgeset &e);
Expand Down

0 comments on commit eb42a3e

Please sign in to comment.