projects
/
profile
/
ivi
/
swig.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Upstream version 1.3.40
[profile/ivi/swig.git]
/
Examples
/
perl5
/
xmlstring
/
example.h
1
#include <xercesc/util/XMLString.hpp>
2
3
4
class XMLChTest
5
{
6
XMLCh *_val;
7
8
public:
9
10
XMLChTest() : _val(0)
11
{
12
}
13
14
void set(const XMLCh *v)
15
{
16
size_t len = XERCES_CPP_NAMESPACE::XMLString::stringLen(v);
17
delete[] _val;
18
_val = new XMLCh[len + 1];
19
for (int i = 0; i < len; ++i) {
20
_val[i] = v[i];
21
}
22
_val[len] = 0;
23
}
24
25
const XMLCh *get()
26
{
27
return _val;
28
}
29
30
XMLCh get_first()
31
{
32
return _val[0];
33
}
34
35
};
36