##

Server.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef _SERVER_HH_
#define _SERVER_HH_
#include <string>
#include <list>
#include <sdf/sdf.hh>
#include "gazebo/msgs/msgs.hh"
#include "gazebo/transport/TransportTypes.hh"
#include "gazebo/common/CommonTypes.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
class Master;
// forward declaration of private class
struct ServerPrivate;
class GAZEBO_VISIBLE Server
{
public: Server();
public: virtual ~Server();
public: void PrintUsage();
public: bool ParseArgs(int _argc, char **_argv);
public: bool PreLoad();
public: bool LoadFile(const std::string &_filename="worlds/empty.world",
const std::string &_physics="");
public: bool LoadString(const std::string &_sdfString);
public: void Run();
public: void Stop();
public: void Fini();
public: void SetParams(const common::StrStr_M &_params);
public: bool GetInitialized() const;
private: bool LoadImpl(sdf::ElementPtr _elem,
const std::string &_physics="");
private: static void SigInt(int _v);
private: void ProcessParams();
private: void OnControl(ConstServerControlPtr &_msg);
private: bool OpenWorld(const std::string &_filename);
private: void ProcessControlMsgs();
private: std::unique_ptr<ServerPrivate> dataPtr;
};
}
#endif
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
TransportTypes.hh
Forward declarations for transport.
system.hh
msgs.hh
CommonTypes.hh
gazebo::common::StrStr_M
std::map< std::string, std::string > StrStr_M
Definition: CommonTypes.hh:101
gazebo::Server
Definition: Server.hh:41
GAZEBO_VISIBLE
#define GAZEBO_VISIBLE
Definition: system.hh:59