src/work/marci/macro_test.cc
author alpar
Mon, 13 Sep 2004 17:20:03 +0000
changeset 842 a4bb28813570
parent 642 e812963087f0
child 921 818510fa3d99
permissions -rw-r--r--
Fix a DANGEROUS bug.
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@762
     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@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
}