// Copyright 2015 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef ${PROJECT_NAME_UPPER}__VERSION_H_
#define ${PROJECT_NAME_UPPER}__VERSION_H_

/// \def ${PROJECT_NAME_UPPER}_VERSION_MAJOR
/// Defines ${PROJECT_NAME_UPPER} major version number
#define ${PROJECT_NAME_UPPER}_VERSION_MAJOR (${VERSION_MAJOR})

/// \def ${PROJECT_NAME_UPPER}_VERSION_MINOR
/// Defines ${PROJECT_NAME_UPPER} minor version number
#define ${PROJECT_NAME_UPPER}_VERSION_MINOR (${VERSION_MINOR})

/// \def ${PROJECT_NAME_UPPER}_VERSION_PATCH
/// Defines ${PROJECT_NAME_UPPER} version patch number
#define ${PROJECT_NAME_UPPER}_VERSION_PATCH (${VERSION_PATCH})

/// \def ${PROJECT_NAME_UPPER}_VERSION_STR
/// Defines ${PROJECT_NAME_UPPER} version string
#define ${PROJECT_NAME_UPPER}_VERSION_STR "${VERSION_STR}"

/// \def ${PROJECT_NAME_UPPER}_VERSION_GTE
/// Defines a macro to check whether the version of ${PROJECT_NAME_UPPER} is greater than or equal to
/// the given version triple.
#define ${PROJECT_NAME_UPPER}_VERSION_GTE(major, minor, patch) ( \
     (major < ${PROJECT_NAME_UPPER}_VERSION_MAJOR) ? true \
     : ((major > ${PROJECT_NAME_UPPER}_VERSION_MAJOR) ? false \
     : ((minor < ${PROJECT_NAME_UPPER}_VERSION_MINOR) ? true \
     : ((minor > ${PROJECT_NAME_UPPER}_VERSION_MINOR) ? false \
     : ((patch < ${PROJECT_NAME_UPPER}_VERSION_PATCH) ? true \
     : ((patch > ${PROJECT_NAME_UPPER}_VERSION_PATCH) ? false \
     : true))))))

#endif  // ${PROJECT_NAME_UPPER}__VERSION_H_
