alpar@906: /* -*- C++ -*- alpar@921: * src/test/path_test.cc - Part of LEMON, a generic C++ optimization library alpar@906: * alpar@906: * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport alpar@906: * (Egervary Combinatorial Optimization Research Group, EGRES). alpar@906: * alpar@906: * Permission to use, modify and distribute this software is granted alpar@906: * provided that this copyright notice appears in all copies. For alpar@906: * precise terms see the accompanying LICENSE file. alpar@906: * alpar@906: * This software is provided "AS IS" with no warranty of any kind, alpar@906: * express or implied, and with no claim as to its suitability for any alpar@906: * purpose. alpar@906: * alpar@906: */ alpar@906: hegyi@820: #include hegyi@820: #include klao@959: #include alpar@921: #include alpar@921: #include hegyi@820: hegyi@820: using namespace std; alpar@921: using namespace lemon; klao@959: using namespace lemon::concept; hegyi@820: hegyi@831: template void checkCompilePath(Path &P) hegyi@831: { hegyi@831: typedef typename Path::EdgeIt EdgeIt; hegyi@831: typedef typename Path::NodeIt NodeIt; hegyi@831: typedef typename Path::GraphNode GraphNode; hegyi@831: typedef typename Path::GraphEdge GraphEdge; hegyi@831: //typedef typename Path::Builder Builder; hegyi@831: //??? ha csinalok ilyet es siman Builderrel peldanyositok, akkor warningol. Talan friend miatt? De ki az? hegyi@820: hegyi@831: EdgeIt ei; hegyi@831: NodeIt ni; hegyi@831: GraphNode gn; hegyi@831: GraphEdge ge; hegyi@831: hegyi@831: size_t st; hegyi@831: bool b; hegyi@831: hegyi@831: //Path(const Graph &_G) {} //the constructor has been already called hegyi@831: hegyi@831: st=P.length(); //size_t length() const {return 0;} hegyi@831: b=P.empty(); //bool empty() const {} hegyi@831: P.clear(); //void clear() {} hegyi@831: hegyi@831: gn=P.head(); //GraphNode/*It*/ head() const {return INVALID;} hegyi@831: gn=P.tail(); //GraphNode/*It*/ tail() const {return INVALID;} hegyi@831: hegyi@831: ei=P.first(ei); //It& first(It &i) const { return i=It(*this); } hegyi@831: hegyi@831: ni=P.head(ei); //NodeIt head(const EdgeIt& e) const {} hegyi@831: ni=P.tail(ei); //NodeIt tail(const EdgeIt& e) const {} hegyi@831: hegyi@831: hegyi@831: ListGraph lg; hegyi@831: Path p(lg); hegyi@831: hegyi@831: EdgeIt i; //EdgeIt() {} hegyi@831: EdgeIt j(INVALID); //EdgeIt(Invalid) {} hegyi@831: EdgeIt k(p); //EdgeIt(const Path &_p) {} hegyi@831: hegyi@831: i=++j; //EdgeIt& operator++() {} hegyi@831: b=(i==j); //bool operator==(const EdgeIt& e) const {return true;} hegyi@831: b=(i!=j); //bool operator!=(const EdgeIt& e) const {return true;} hegyi@831: hegyi@831: hegyi@831: NodeIt l; //NodeIt() {} hegyi@831: NodeIt m(INVALID); //NodeIt(Invalid) {} hegyi@831: NodeIt n(p); //NodeIt(const Path &_p) {} hegyi@831: hegyi@831: l=++m; //NodeIt& operator++() {} hegyi@831: b=(m==n); //bool operator==(const NodeIt& e) const {} hegyi@831: b=(m!=n); //bool operator!=(const NodeIt& e) const {} hegyi@831: hegyi@831: typename Path::Builder builder(p); //Builder(Path &_P) : P(_P) {} hegyi@831: builder.setStartNode(gn); //void setStartNode(const GraphNode &) {} hegyi@831: builder.pushFront(ge); //void pushFront(const GraphEdge& e) {} hegyi@831: builder.pushBack(ge); //void pushBack(const GraphEdge& e) {} hegyi@831: builder.commit(); //void commit() {} hegyi@831: builder.reserveFront(st); //void reserveFront(size_t r) {} hegyi@831: builder.reserveBack(st); //void reserveBack(size_t r) {} hegyi@831: hegyi@820: } hegyi@820: klao@959: template void checkCompilePath< concept::Path >(concept::Path &); hegyi@831: template void checkCompilePath< DirPath >(DirPath &); hegyi@831: template void checkCompilePath< UndirPath >(UndirPath &); hegyi@820: hegyi@831: int main() hegyi@831: { hegyi@820: }