Open
Graph Drawing
Framework

 v.2012.05
 

PlanarLeafKey.h
Go to the documentation of this file.
00001 /*
00002  * $Revision: 2299 $
00003  * 
00004  * last checkin:
00005  *   $Author: gutwenger $ 
00006  *   $Date: 2012-05-07 15:57:08 +0200 (Mon, 07 May 2012) $ 
00007  ***************************************************************/
00008  
00043 #ifdef _MSC_VER
00044 #pragma once
00045 #endif
00046 
00047 
00048 #ifndef OGDF_PLANAR_LEAFKEY_H
00049 #define OGDF_PLANAR_LEAFKEY_H
00050 
00051 
00052 
00053 #include <ogdf/internal/planarity/PQLeafKey.h>
00054 #include <iostream>
00055 #include <string>
00056 
00057 
00058 
00059 
00060 namespace ogdf {
00061 
00062 
00063 template<class X>
00064 class PlanarLeafKey : public PQLeafKey<edge,X,bool>
00065 {
00066 public:
00067 
00068     PlanarLeafKey(edge e) : PQLeafKey<edge,X,bool>(e) { }
00069 
00070     virtual ~PlanarLeafKey() { }
00071 
00072     const char* print() {
00073         if (!this->m_printString) 
00074             this->m_printString = new char[128]; 
00075         int sId = this->m_userStructKey->source()->index();
00076         int tId = this->m_userStructKey->target()->index();
00077         ogdf::sprintf(this->m_printString, 128, " (%d,%d)",sId,tId);
00078         return this->m_printString;
00079     };
00080 
00081 };
00082 
00083 }
00084 
00085 #endif