All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Root.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 #ifndef SDF_ROOT_HH_
18 #define SDF_ROOT_HH_
19 
20 #include <string>
21 
22 #include "sdf/Types.hh"
23 #include "sdf/system_util.hh"
24 
25 namespace sdf
26 {
27  // Forward declarations.
28  class RootPrivate;
29  class World;
30 
42  {
44  public: Root();
45 
47  public: ~Root();
48 
54  public: Errors Load(const std::string &_filename);
55 
60  public: std::string Version() const;
61 
65  public: void SetVersion(const std::string &_version);
66 
69  public: uint64_t WorldCount() const;
70 
76  public: const World *WorldByIndex(const uint64_t _index) const;
77 
81  public: bool WorldNameExists(const std::string &_name) const;
82 
84  private: RootPrivate *dataPtr = nullptr;
85  };
86 }
87 #endif
Root class that acts as an entry point to the SDF document model.
Definition: Root.hh:41
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:69
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:48
Definition: World.hh:31