src/work/marci/macro_test.cc
author jacint
Thu, 06 May 2004 09:26:23 +0000
changeset 538 d8863141824d
parent 330 7ac0d4e8a31c
child 640 d426dca0aaf7
permissions -rw-r--r--
(none)
marci@330
     1
// -*- c++ -*-
marci@330
     2
#include <iostream>
marci@330
     3
#include <fstream>
marci@330
     4
marci@330
     5
#include <list_graph.h>
marci@330
     6
#include <for_each_macros.h>
marci@330
     7
marci@330
     8
using namespace hugo;
marci@330
     9
marci@330
    10
int main() 
marci@330
    11
{
marci@330
    12
  typedef ListGraph Graph;
marci@330
    13
  Graph g;
marci@330
    14
  Graph::Node n1=g.addNode();
marci@330
    15
  Graph::Node n2=g.addNode();
marci@330
    16
  Graph::NodeIt n;
marci@409
    17
  FOR_EACH_GLOB(n, g) {
marci@330
    18
    std::cout << g.id(n) << " ";
marci@330
    19
  }
marci@330
    20
  std::cout << std::endl;
marci@330
    21
  FOR_EACH_LOC(Graph::NodeIt, m, g) {
marci@330
    22
    std::cout << g.id(m) << " ";
marci@330
    23
  }
marci@330
    24
  std::cout << std::endl;
marci@330
    25
marci@330
    26
marci@330
    27
  return 0;
marci@330
    28
}