Ignition Physics

API Reference

2.3.0
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 IGNITION_PHYSICS_CANREADDATA_HH_
19 #define IGNITION_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 "ignition/physics/detail/CanReadData.hh"
146 
147 #endif
CanReadRequiredData provides compile-time static analysis to ensure that the inheriting class provide...
Definition: CanReadData.hh:97
Definition: CanReadData.hh:122
ReadOptions provides customization for the ReadRequiredData and ReadExpectedData functions provided b...
Definition: CanReadData.hh:33
bool onlyReadUnqueriedData
If a type has already been queried, do not perform the read operation on it.
Definition: CanReadData.hh:37