|
| 1 | +/* |
| 2 | + * Copyright (C) 2022 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 SDF_USD_SDF_PARSER_SENSOR_HH_ |
| 19 | +#define SDF_USD_SDF_PARSER_SENSOR_HH_ |
| 20 | + |
| 21 | +#include <string> |
| 22 | + |
| 23 | +// TODO(ahcorde) this is to remove deprecated "warnings" in usd, these warnings |
| 24 | +// are reported using #pragma message so normal diagnostic flags cannot remove |
| 25 | +// them. This workaround requires this block to be used whenever usd is |
| 26 | +// included. |
| 27 | +#pragma push_macro ("__DEPRECATED") |
| 28 | +#undef __DEPRECATED |
| 29 | +#include <pxr/usd/usd/stage.h> |
| 30 | +#pragma pop_macro ("__DEPRECATED") |
| 31 | + |
| 32 | +#include "sdf/Sensor.hh" |
| 33 | +#include "sdf/usd/Export.hh" |
| 34 | +#include "sdf/usd/UsdError.hh" |
| 35 | +#include "sdf/sdf_config.h" |
| 36 | + |
| 37 | +namespace sdf |
| 38 | +{ |
| 39 | + // Inline bracket to help doxygen filtering. |
| 40 | + inline namespace SDF_VERSION_NAMESPACE { |
| 41 | + // |
| 42 | + namespace usd |
| 43 | + { |
| 44 | + /// \brief Parse an SDF sensor into a USD stage. |
| 45 | + /// \param[in] _sensor The SDF sensor to parse. |
| 46 | + /// \param[in] _stage The stage that should contain the USD representation |
| 47 | + /// of _sensor. |
| 48 | + /// \param[in] _path The USD path of the parsed sensor in _stage, which must |
| 49 | + /// be a valid USD path. |
| 50 | + /// \return UsdErrors, which is a vector of UsdError objects. Each UsdError |
| 51 | + /// includes an error code and message. An empty vector indicates no error. |
| 52 | + UsdErrors IGNITION_SDFORMAT_USD_VISIBLE ParseSdfSensor( |
| 53 | + const sdf::Sensor &_sensor, |
| 54 | + pxr::UsdStageRefPtr &_stage, |
| 55 | + const std::string &_path); |
| 56 | + } |
| 57 | + } |
| 58 | +} |
| 59 | + |
| 60 | +#endif |
0 commit comments