YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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
13namespace yarp::serversql::impl {
14
19{
20public:
22 regid = -1;
23 tmpid = -1;
24 mcastCursor = -1;
25 db = nullptr;
26 }
27
28 void open(TripleSource *db, const AllocatorConfig& config) {
29 this->db = db;
30 this->config = config;
31 regid = -1;
32 tmpid = -1;
33 mcastCursor = -1;
34 }
35
37
39
41
43
44 bool freePortResources(const yarp::os::Contact& c) override;
45
46private:
47 int regid;
48 int tmpid;
49 int mcastCursor;
50 TripleSource *db;
51 AllocatorConfig config;
52};
53
54} // namespace yarp::serversql::impl
55
56
57#endif // YARP_SERVERSQL_IMPL_ALLOCATORONTRIPLES_H
Represents how to reach a part of a YARP network.
Definition Contact.h:33
Upper and lower bounds on port numbers etc for allocation.
Definition Allocator.h:19
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:37
Abstract view of a database as a collection of triples.