YARP
Yet Another Robot Platform
AllocatorOnTriples.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_ALLOCATORONTRIPLES_H
11 #define YARP_SERVERSQL_IMPL_ALLOCATORONTRIPLES_H
12 
15 
16 namespace yarp {
17 namespace serversql {
18 namespace impl {
19 
24 {
25 public:
27  regid = -1;
28  tmpid = -1;
29  mcastCursor = -1;
30  db = nullptr;
31  }
32 
33  void open(TripleSource *db, const AllocatorConfig& config) {
34  this->db = db;
35  this->config = config;
36  regid = -1;
37  tmpid = -1;
38  mcastCursor = -1;
39  }
40 
42 
44 
46 
48 
49  bool freePortResources(const yarp::os::Contact& c) override;
50 
51 private:
52  int regid;
53  int tmpid;
54  int mcastCursor;
55  TripleSource *db;
56  AllocatorConfig config;
57 };
58 
59 } // namespace impl
60 } // namespace serversql
61 } // namespace yarp
62 
63 
64 #endif // YARP_SERVERSQL_IMPL_ALLOCATORONTRIPLES_H
yarp::serversql::impl::AllocatorOnTriples::completePortName
yarp::os::Contact completePortName(const yarp::os::Contact &c) override
Definition: AllocatorOnTriples.cpp:24
yarp::serversql::impl::Allocator
Abstract interface for allocating network resources.
Definition: Allocator.h:42
Allocator.h
yarp::serversql::impl::AllocatorOnTriples::freePortResources
bool freePortResources(const yarp::os::Contact &c) override
Definition: AllocatorOnTriples.cpp:221
yarp::serversql::impl::TripleSource
Abstract view of a database as a collection of triples.
Definition: TripleSource.h:44
yarp::serversql::impl::AllocatorOnTriples::completeHost
yarp::os::Contact completeHost(const yarp::os::Contact &c)
Definition: AllocatorOnTriples.cpp:160
yarp::serversql::impl::AllocatorOnTriples::completePortNumber
yarp::os::Contact completePortNumber(const yarp::os::Contact &c)
Definition: AllocatorOnTriples.cpp:75
yarp::serversql::impl::AllocatorConfig
Upper and lower bounds on port numbers etc for allocation.
Definition: Allocator.h:24
yarp::serversql::impl::AllocatorOnTriples::completeSocket
yarp::os::Contact completeSocket(const yarp::os::Contact &c) override
Definition: AllocatorOnTriples.cpp:70
yarp::serversql::impl::AllocatorOnTriples::AllocatorOnTriples
AllocatorOnTriples()
Definition: AllocatorOnTriples.h:26
TripleSource.h
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::os::Contact
Represents how to reach a part of a YARP network.
Definition: Contact.h:39
yarp::serversql::impl::AllocatorOnTriples
Allocates network resources, and tracks them using a TripleSource.
Definition: AllocatorOnTriples.h:24
yarp::serversql::impl::AllocatorOnTriples::open
void open(TripleSource *db, const AllocatorConfig &config)
Definition: AllocatorOnTriples.h:33