Gazebo Physics

API Reference

5.3.2
gz/physics/CanReadData.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 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 
18 #ifndef GZ_PHYSICS_CANREADDATA_HH_
19 #define GZ_PHYSICS_CANREADDATA_HH_
20 
21 
23 
24 namespace ignition
25 {
26  namespace physics
27  {
33  struct IGNITION_PHYSICS_VISIBLE ReadOptions
34  {
37  public: bool onlyReadUnqueriedData;
38 
42  public: explicit ReadOptions(const bool _onlyUnqueried = true);
43  };
44 
96  template <typename Derived, typename Specification>
98  {
102  public: CanReadRequiredData();
103 
112  public: template <typename CompositeType>
113  void ReadRequiredData(
114  const CompositeType &_data,
115  const ReadOptions &_options = ReadOptions());
116  };
117 
121  template <typename Derived, typename Specification>
123  {
127  public: CanReadExpectedData();
128 
137  public: template <typename CompositeType>
138  void ReadExpectedData(
139  const CompositeType &_data,
140  const ReadOptions &_options = ReadOptions());
141  };
142  }
143 }
144 
145 #include "gz/physics/detail/CanReadData.hh"
146 
147 #endif
void ReadRequiredData(const CompositeType &_data, const ReadOptions &_options=ReadOptions())
CanReadRequiredData provides compile-time static analysis to ensure that the inheriting class provide...
Definition: gz/physics/CanReadData.hh:97
Definition: gz/physics/CanReadData.hh:122
bool onlyReadUnqueriedData
If a type has already been queried, do not perform the read operation on it.
Definition: gz/physics/CanReadData.hh:37
ReadOptions provides customization for the ReadRequiredData and ReadExpectedData functions provided b...
Definition: gz/physics/CanReadData.hh:33
void ReadExpectedData(const CompositeType &_data, const ReadOptions &_options=ReadOptions())
ReadOptions(const bool _onlyUnqueried=true)
Default constructor.