src/work/deba/invalid.h
author klao
Tue, 27 Apr 2004 13:53:27 +0000
changeset 445 6fe0d7d70674
permissions -rw-r--r--
Egy helyes (warning nelkuli) megvalositasa az operator<< -nek az stGraphWrapper
Node es Edge-enek. Csak a konverziok es templates fuggvenyek "alacsony
prioritasa" miatt hasznalhatatlan.

Magyarul az stGW::Node -ra jol mukodik, de a NodeIt-ra mar nem, pedig van hozza
konverzio. Csak akkor mar inkabb a ListGraph::Node-jara definialt nem
template-es fuggvenyt hasznalja.
deba@378
     1
// -*- mode:C++ -*-
deba@378
     2
deba@378
     3
#ifndef HUGO_INVALID_H
deba@378
     4
#define HUGO_INVALID_H
deba@378
     5
deba@378
     6
///\file
deba@378
     7
///\brief Definition of INVALID.
deba@378
     8
deba@378
     9
namespace hugo {
deba@378
    10
deba@378
    11
  /// Dummy type to make it easier to make invalid iterators.
deba@378
    12
  
deba@378
    13
  /// See \ref INVALID, how to use it.
deba@378
    14
  
deba@378
    15
  struct Invalid {};
deba@378
    16
  
deba@378
    17
  /// Invalid iterators.
deba@378
    18
  
deba@378
    19
  /// \ref Invalid is a global type that converts to each iterator
deba@378
    20
  /// in such a way that the value of the target iterator will be invalid.
deba@378
    21
deba@378
    22
  // It is also used to convert the \c INVALID constant to the
deba@378
    23
  // node iterator that makes is possible to write 
deba@378
    24
deba@378
    25
  //extern Invalid INVALID;
deba@378
    26
deba@378
    27
  //const Invalid &INVALID = *(Invalid *)0;
deba@378
    28
  const Invalid INVALID = Invalid();
deba@378
    29
deba@378
    30
};
deba@378
    31
deba@378
    32
#endif
deba@378
    33