XTA: API Reference for C++ language

NativeXaResource.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 "NativeXaResource.hpp"
37 
38 
39 
40 namespace xta {
41  NativeXaResource::NativeXaResource(std::string const& name,
42  std::string const& switch_file,
43  std::string const& open_info,
44  std::string const& close_info)
45  {
46  if (NULL == (nxar = xta_native_xa_resource_new(
47  name.c_str(), switch_file.c_str(),
48  open_info.c_str(), close_info.c_str())))
49  throw Exception(LIXA_RC_NULL_OBJECT,
50  "xta_native_xa_resource_new");
51  };
52 
54  {
55  xta_native_xa_resource_delete(nxar);
56  nxar = NULL;
57  };
58 
59 }
NativeXaResource(std::string const &name, std::string const &switch_file, std::string const &open_info, std::string const &close_info)
xta_native_xa_resource_t * nxar

Copyright © 2009-2019, Christian Ferrari tiian@users.sourceforge.net http://www.tiian.org/