summaryrefslogtreecommitdiff
path: root/TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Literals.hpp
blob: 2276339b9c3e4ae077dd749cee34687cd9de4767 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// file      : CCF/IDL2/SemanticGraph/Literals.hpp
// author    : Boris Kolpackov <boris@dre.vanderbilt.edu>
// cvs-id    : $Id$

#ifndef CCF_IDL2_SEMANTIC_GRAPH_LITERALS_HPP
#define CCF_IDL2_SEMANTIC_GRAPH_LITERALS_HPP

#include <string>
#include <iosfwd>

namespace CCF
{
  namespace IDL2
  {
    namespace SemanticGraph
    {
      //
      //
      //
      class StringLiteral
      {
      public:
        StringLiteral (std::string const& literal)
            : literal_ (literal)
        {
        }

        std::string
        literal () const
        {
          return literal_;
        }

      private:
        std::string literal_;
      };

      inline bool
      operator== (StringLiteral const& a, StringLiteral const& b)
      {
        return a.literal () == b.literal ();
      }

      inline bool
      operator!= (StringLiteral const& a, StringLiteral const& b)
      {
        return a.literal () != b.literal ();
      }

      std::ostream&
      operator<< (std::ostream& o, StringLiteral const& lit);
    }
  }
}

#endif  // CCF_IDL2_SEMANTIC_GRAPH_LITERALS_HPP