src/work/marci/macro_test.cc
author deba
Wed, 08 Sep 2004 12:06:45 +0000 (2004-09-08)
changeset 822 88226d9fe821
parent 642 e812963087f0
child 921 818510fa3d99
permissions -rw-r--r--
The MapFactories have been removed from the code because
if we use macros then they increases only the complexity.

The pair iterators of the maps are separeted from the maps.

Some macros and comments has been changed.
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
}