YARP
Yet Another Robot Platform
TripleSourceCreator.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 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
yarp::serversql::impl::TripleSourceCreator::~TripleSourceCreator
virtual ~TripleSourceCreator()
Definition: TripleSourceCreator.h:29
yarp::serversql::impl::TripleSourceCreator::close
bool close()
Definition: TripleSourceCreator.cpp:102
yarp::serversql::impl::TripleSourceCreator
Open and close a database, viewed as a collection of triples.
Definition: TripleSourceCreator.h:25
yarp::serversql::impl::TripleSourceCreator::TripleSourceCreator
TripleSourceCreator()=default
yarp::serversql::impl::TripleSource
Abstract view of a database as a collection of triples.
Definition: TripleSource.h:44
compiler.h
yarp::serversql::impl::TripleSourceCreator::open
TripleSource * open(const char *filename, bool cautious=false, bool fresh=false)
Definition: TripleSourceCreator.cpp:47
TripleSource.h
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18