blob: 54f2e49ca4d2f2521bb8b32013080367f0388976 (
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
|
// file : xsde/cxx/serializer/non-validating/qname-stl.cxx
// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC
// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
#include <xsde/cxx/serializer/non-validating/qname-stl.hxx>
namespace xsde
{
namespace cxx
{
namespace serializer
{
namespace non_validating
{
void qname_simpl::
pre (const qname& value)
{
value_ = value;
}
void qname_simpl::
_serialize_content ()
{
// Make sure we don't hold any references to the qname.
//
qname tmp ("a");
tmp.swap (value_);
if (!tmp.prefix ().empty ())
{
#ifdef XSDE_EXCEPTIONS
_characters (tmp.prefix ().c_str (), tmp.prefix ().size ());
_characters (":", 1);
_characters (tmp.name ().c_str (), tmp.name ().size ());
#else
if (_characters (tmp.prefix ().c_str (), tmp.prefix ().size ()))
{
if (_characters (":", 1))
_characters (tmp.name ().c_str (), tmp.name ().size ());
}
#endif
}
else
_characters (tmp.name ().c_str (), tmp.name ().size ());
}
}
}
}
}
|