Class
List
Hierarchy
Modules
Common
Events
Math
Messages
Physics
Rendering
Sensors
Transport
Links
Gazebo Website
Wiki
Tutorials
Download
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
gazebo
sdf
interface
sdf/interface/Plugin.hh
Go to the documentation of this file.
1
2
/*
3
* Copyright 2011 Nate Koenig
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*/
18
/* Author: Nate Koenig, John Hsu */
19
20
#ifndef SDF_PLUGIN_HH
21
#define SDF_PLUGIN_HH
22
23
#include <string>
24
#include <vector>
25
26
#include "sdf/interface/SDFBase.hh"
27
28
namespace
sdf
29
{
30
class
Plugin
:
public
SDFBase
31
{
32
public
:
Plugin
() :
33
name
(
"name"
,
""
, true),
34
filename
(
"filename"
,
""
, true)
35
{
36
Param::End();
37
this->xmlTree =
"{plugin:name, filename}"
;
38
}
39
40
public
:
ParamT<std::string>
name
;
41
public
:
ParamT<std::string>
filename
;
42
public
: std::vector<ParamT<std::string> >
data
;
43
44
public
:
void
Clear
()
45
{
46
SDFBase::Clear();
47
std::vector<ParamT<std::string> >::iterator iter;
48
for
(iter = this->
data
.begin(); iter != this->
data
.end(); iter++)
49
iter->Reset();
50
this->
data
.clear();
51
}
52
53
public
:
void
Print
(
const
std::string &prefix)
54
{
55
std::cout << prefix <<
"Plugin: Name["
<< this->
name
56
<<
"] File["
<< this->
filename
<<
"]\n"
;
57
}
58
};
59
}
60
61
#endif
62
63