00001
00009 class StrWriter
00010 {
00011 protected:
00012
00013 char* namefile;
00014 ofstream* wf;
00015 bool g;
00016 bool d;
00017
00018 void NodesWrite(graph &,node_map<GLab> &);
00019 void NodesWrite(list<node>& ,node_map<GLab> &);
00020 void NodeWrite(GLab &);
00021 void EdgesWrite(graph &,node_map<GLab> &,edge_map<bool> &);
00022 void EdgesWrite(list<edge> &,list<node> &,edge_map<bool> &,node_map<GLab> &);
00023 void EdgeWrite(GLab &,GLab &,char*);
00024 void LabelWrite();
00025 public:
00026
00027 StrWriter(graph &,node_map<GLab> &,edge_map<bool> &,bool,bool,char* namefile);
00028 StrWriter(string &,char*);
00029 };
00030
00034 class StrReader
00035 {
00036 protected:
00037
00038 char* namefile;
00039 ifstream* rf;
00040 int size,nl,ncount;
00041
00042 void Init();
00043 void SizeRead();
00044 void GraphsRead();
00045 void GraphRead();
00046 void UndirectedTransform();
00047 bool IsUndirected();
00048 public:
00049
00050 node_map<GLab> gnl;
00051 edge_map<bool> gel;
00052 graph g;
00053 string s;
00054
00055 StrReader(char*);
00056 ~StrReader();
00057 void BaseRead();
00058 void BaseParse();
00059 };