YARP
Yet Another Robot Platform
TripleSourceCreator.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef YARP_SERVERSQL_IMPL_TRIPLESOURCECREATOR_H
8 #define YARP_SERVERSQL_IMPL_TRIPLESOURCECREATOR_H
9 
11 #include <yarp/conf/compiler.h>
12 
13 
14 namespace yarp {
15 namespace serversql {
16 namespace impl {
17 
22 {
23 public:
24  TripleSourceCreator() = default;
25 
27  {
28  if (implementation != nullptr) {
29  close();
30  }
31  }
32 
33  TripleSource *open(const char *filename,
34  bool cautious = false,
35  bool fresh = false);
36 
37  bool close();
38 
39 private:
40  void* implementation {nullptr};
41  TripleSource* accessor {nullptr};
42 };
43 
44 } // namespace impl
45 } // namespace serversql
46 } // namespace yarp
47 
48 
49 #endif // YARP_SERVERSQL_IMPL_TRIPLESOURCECREATOR_H
Open and close a database, viewed as a collection of triples.
TripleSource * open(const char *filename, bool cautious=false, bool fresh=false)
Abstract view of a database as a collection of triples.
Definition: TripleSource.h:41
The main, catch-all namespace for YARP.
Definition: dirs.h:16