summaryrefslogtreecommitdiff
path: root/libcutl/cutl/xml/qname.cxx
blob: a32add2cd55354bbc418aac24101d1d3982d5c48 (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
// file      : cutl/xml/qname.cxx
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
// license   : MIT; see accompanying LICENSE file

#include <ostream>

#include <cutl/xml/qname.hxx>

using namespace std;

namespace cutl
{
  namespace xml
  {
    string qname::
    string () const
    {
      std::string r;
      if (!ns_.empty ())
      {
        r += ns_;
        r += '#';
      }

      r += name_;
      return r;
    }

    ostream&
    operator<< (ostream& os, const qname& qn)
    {
      return os << qn.string ();
    }
  }
}