COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/lemon/invalid.h @ 1284:b941d044f87b

Last change on this file since 1284:b941d044f87b was 1164:80bb73097736, checked in by Alpar Juttner, 19 years ago

A year has passed again.

File size: 1.4 KB
RevLine 
[906]1/* -*- C++ -*-
[921]2 * src/lemon/invalid.h - Part of LEMON, a generic C++ optimization library
[906]3 *
[1164]4 * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
[906]5 * (Egervary Combinatorial Optimization Research Group, EGRES).
6 *
7 * Permission to use, modify and distribute this software is granted
8 * provided that this copyright notice appears in all copies. For
9 * precise terms see the accompanying LICENSE file.
10 *
11 * This software is provided "AS IS" with no warranty of any kind,
12 * express or implied, and with no claim as to its suitability for any
13 * purpose.
14 *
15 */
[162]16
[921]17#ifndef LEMON_INVALID_H
18#define LEMON_INVALID_H
[162]19
[242]20///\file
21///\brief Definition of INVALID.
22
[921]23namespace lemon {
[162]24
25  /// Dummy type to make it easier to make invalid iterators.
26 
27  /// See \ref INVALID, how to use it.
28 
[412]29  struct Invalid {
30  public:
31    bool operator==(Invalid) { return true;  }
32    bool operator!=(Invalid) { return false; }
33    bool operator< (Invalid) { return false; }
34  };
[162]35 
36  /// Invalid iterators.
37 
38  /// \ref Invalid is a global type that converts to each iterator
39  /// in such a way that the value of the target iterator will be invalid.
[184]40
41  // It is also used to convert the \c INVALID constant to the
42  // node iterator that makes is possible to write
43
[165]44  //extern Invalid INVALID;
[162]45
[169]46  //const Invalid &INVALID = *(Invalid *)0;
47  const Invalid INVALID = Invalid();
[162]48
[921]49} //namespace lemon
[162]50
51#endif
52 
Note: See TracBrowser for help on using the repository browser.