XTA: API Reference for C++ language
Main Page
Namespaces
Classes
Files
File List
File Members
Xid.cpp
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009-2018, Christian Ferrari <tiian@users.sourceforge.net>
3
* All rights reserved.
4
*
5
* This file is part of LIXA.
6
*
7
* LIXA is free software: you can redistribute this file and/or modify
8
* it under the terms of the GNU Lesser General Public License version 2.1 as
9
* published by the Free Software Foundation.
10
*
11
* LIXA is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with LIXA. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
21
22
/* include XTA header file */
23
#include "xta.h"
24
25
26
27
/* set module trace flag */
28
#ifdef LIXA_TRACE_MODULE
29
# undef LIXA_TRACE_MODULE
30
#endif
/* LIXA_TRACE_MODULE */
31
#define LIXA_TRACE_MODULE LIXA_TRACE_MOD_XTA
32
33
34
35
#include "
Exception.hpp
"
36
#include "
Xid.hpp
"
37
38
39
40
namespace
xta {
41
Xid::Xid
(
const
xta_xid_t *xid)
42
{
43
this->xid =
xid
;
44
};
45
46
Xid::~Xid
()
47
{
48
xid
= NULL;
49
};
50
51
string
Xid::toString
()
52
{
53
// retrieve an ASCII string, heap allocated
54
char
*tmp = xta_xid_to_string(
xid
);
55
// create a C++ string
56
string
result(tmp);
57
// memory allocated by xta_xid_to_string must be released
58
free(tmp);
59
return
result;
60
}
61
}
xta::Xid::toString
std::string toString()
Definition:
Xid.cpp:51
Xid.hpp
xta::Xid::~Xid
~Xid()
Definition:
Xid.cpp:46
Exception.hpp
xta::Xid::xid
const xta_xid_t * xid
Definition:
Xid.hpp:41
xta::Xid::Xid
Xid(const xta_xid_t *xid)
Definition:
Xid.cpp:41
Copyright © 2009-2019, Christian Ferrari
tiian@users.sourceforge.net
http://www.tiian.org/