YARP
Yet Another Robot Platform
TripleSourceCreator.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * Copyright (C) 2006-2010 RobotCub Consortium
4  * All rights reserved.
5  *
6  * This software may be modified and distributed under the terms of the
7  * BSD-3-Clause license. See the accompanying LICENSE file for details.
8  */
9 
10 #ifndef YARP_SERVERSQL_IMPL_TRIPLESOURCECREATOR_H
11 #define YARP_SERVERSQL_IMPL_TRIPLESOURCECREATOR_H
12 
14 #include <yarp/conf/compiler.h>
15 
16 
17 namespace yarp {
18 namespace serversql {
19 namespace impl {
20 
25 {
26 public:
27  TripleSourceCreator() = default;
28 
30  {
31  if (implementation != nullptr) {
32  close();
33  }
34  }
35 
36  TripleSource *open(const char *filename,
37  bool cautious = false,
38  bool fresh = false);
39 
40  bool close();
41 
42 private:
43  void* implementation {nullptr};
44  TripleSource* accessor {nullptr};
45 };
46 
47 } // namespace impl
48 } // namespace serversql
49 } // namespace yarp
50 
51 
52 #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:44
The main, catch-all namespace for YARP.
Definition: environment.h:25