YARP
Yet Another Robot Platform
yarpserversql.cpp
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 
11 
12 #include <yarp/os/Network.h>
13 #include <yarp/serversql/Server.h>
16 
17 using yarp::os::Network;
19 
21 {
22  auto* nc = new NameServerContainer;
23  if (!nc) {
24  return nullptr;
25  }
27  if (!nc->open(options)) {
28  delete nc;
29  return nullptr;
30  }
31  nc->goPublic();
32  return nc;
33 }
34 
35 int yarpserver_main(int argc, char *argv[])
36 {
39  return yServer.run(argc, argv);
40 }
@ WarningType
Definition: Log.h:80
Abstract interface for a database of port names.
Definition: NameStore.h:23
Utilities for manipulating the YARP network, including initialization and shutdown.
Definition: Network.h:786
A base class for nested structures that can be searched.
Definition: Searchable.h:69
int run(int argc, char *argv[])
Definition: Server.cpp:41
@ YARP_CLOCK_SYSTEM
Definition: Time.h:32
void setMinumumLogType(yarp::os::Log::LogType minumumLogType)
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::os::NameStore * yarpserver_create(yarp::os::Searchable &options)
int yarpserver_main(int argc, char *argv[])