Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

BlumSkeleton.h

Go to the documentation of this file.
00001 
00035 #ifndef __SKELETON_H__
00036 #define __SKELETON_H__
00037 
00038 #include <fstream.h>
00039 #include "sg.h"
00040 
00041 typedef std::istream istream;
00042 typedef std::ostream ostream;
00043 
00044 using namespace sg;
00045 
00046 class BlumSkeleton
00047 {
00048 public:
00049         virtual void Read(istream& is) = 0;
00050         virtual void Write(ostream& os) = 0;
00051         virtual ~BlumSkeleton() {}
00052 };
00053 
00054 class McGillSkeleton : public BlumSkeleton
00055 {
00056         sg::DDSkeleton* pMAT;
00057 
00058 public:
00059         McGillSkeleton(sg::DDSkeleton* p = NULL) { pMAT = p; }
00060         ~McGillSkeleton() { delete pMAT; }
00061 
00062         sg::DDSkeleton* GetSkeleton() { return pMAT; }
00063         void SetSkeleton(sg::DDSkeleton* p) { pMAT = p; }
00064 
00065         sg::DDSkeleton* ReadDDSkeleton(istream& is);
00066         void WriteDDSkeleton(ostream& os, sg::DDSkeleton& dds);
00067 
00068         void ReadNodesAndEdges(istream& is, DDSkeleton& dds);
00069         void WriteNodesAndEdges(ostream& os, DDSkeleton& dds);
00070 
00071         void Read(istream& is) { pMAT = ReadDDSkeleton(is); }
00072         void Write(ostream& os) { WriteDDSkeleton(os, *pMAT); }
00073 };
00074 
00075 #endif //__SKELETON_H__

Generated on Sat Nov 13 11:21:21 2004 for Noisy DAG Matcher by doxygen1.2.18