src/work/marci/macro_test.cc
author alpar
Wed, 21 Jul 2004 17:38:02 +0000
changeset 720 193d881b23ad
parent 640 d426dca0aaf7
child 762 511200bdb71f
permissions -rw-r--r--
MapBase added
marci@330
     1
// -*- c++ -*-
marci@330
     2
#include <iostream>
marci@330
     3
#include <fstream>
marci@330
     4
marci@642
     5
#include <sage_graph.h>
marci@640
     6
#include <hugo/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@642
    12
  typedef SageGraph 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
}