YARP
Yet Another Robot Platform
AllocatorOnTriples.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_ALLOCATORONTRIPLES_H
8 #define YARP_SERVERSQL_IMPL_ALLOCATORONTRIPLES_H
9 
12 
13 namespace yarp {
14 namespace serversql {
15 namespace impl {
16 
21 {
22 public:
24  regid = -1;
25  tmpid = -1;
26  mcastCursor = -1;
27  db = nullptr;
28  }
29 
30  void open(TripleSource *db, const AllocatorConfig& config) {
31  this->db = db;
32  this->config = config;
33  regid = -1;
34  tmpid = -1;
35  mcastCursor = -1;
36  }
37 
39 
41 
43 
45 
46  bool freePortResources(const yarp::os::Contact& c) override;
47 
48 private:
49  int regid;
50  int tmpid;
51  int mcastCursor;
52  TripleSource *db;
53  AllocatorConfig config;
54 };
55 
56 } // namespace impl
57 } // namespace serversql
58 } // namespace yarp
59 
60 
61 #endif // YARP_SERVERSQL_IMPL_ALLOCATORONTRIPLES_H
Represents how to reach a part of a YARP network.
Definition: Contact.h:36
Upper and lower bounds on port numbers etc for allocation.
Definition: Allocator.h:21
Allocates network resources, and tracks them using a TripleSource.
yarp::os::Contact completeSocket(const yarp::os::Contact &c) override
bool freePortResources(const yarp::os::Contact &c) override
yarp::os::Contact completePortNumber(const yarp::os::Contact &c)
yarp::os::Contact completeHost(const yarp::os::Contact &c)
void open(TripleSource *db, const AllocatorConfig &config)
yarp::os::Contact completePortName(const yarp::os::Contact &c) override
Abstract interface for allocating network resources.
Definition: Allocator.h:39
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