aboutsummaryrefslogtreecommitdiff
path: root/odb/semantics/relational/deferrable.hxx
blob: 87d696c4e14787102c1b5675a7bb96f36bdbf9cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// file      : odb/semantics/relational/deferrable.hxx
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
// license   : GNU GPL v3; see accompanying LICENSE file

#ifndef ODB_SEMANTICS_RELATIONAL_DEFERRABLE_HXX
#define ODB_SEMANTICS_RELATIONAL_DEFERRABLE_HXX

#include <string>
#include <iosfwd>

namespace semantics
{
  namespace relational
  {
    struct deferrable
    {
      enum value
      {
        not_deferrable,
        immediate,
        deferred
      };

      deferrable (value v = value (0)) : v_ (v) {}
      operator value () const {return v_;}

      std::string
      string () const;

    private:
      value v_;
    };

    std::ostream&
    operator<< (std::ostream&, deferrable const&);

    std::istream&
    operator>> (std::istream&, deferrable&);
  }
}

#endif // ODB_SEMANTICS_RELATIONAL_DEFERRABLE_HXX