Common Tesseract Types.
More...
#include <tesseract/common/macros.h>
#include <cstddef>
#include <functional>
#include <iosfwd>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
|
| namespace | tesseract::common |
| | Namespace owning boost's hash_is_avalanching, and defined iff boost has the trait at all.
|
| |
|
| std::size_t | tesseract::common::nameIdHash (const std::string &name) noexcept |
| | Hash a name into a NameId value.
|
| |
| std::size_t | tesseract::common::combineNameIdHash (std::size_t f, std::size_t s) noexcept |
| | Mix two id values into one bucket hash — the hash of the OrderedIdPair holding them, so a caller can compute a pair's bucket hash without constructing one.
|
| |
|
template<typename Tag > |
| std::ostream & | tesseract::common::operator<< (std::ostream &os, const NameId< Tag > &id) |
| | Stream insertion: writes exactly id.name(). Print value() explicitly where the numeric id matters.
|
| |
|
template<typename IdT > |
| std::vector< IdT > | tesseract::common::toIds (const std::vector< std::string > &names) |
| | Convert a vector of strings to a vector of NameId<Tag>
|
| |
|
template<typename Container > |
| std::vector< std::string > | tesseract::common::toNames (const Container &ids) |
| | Convert any container of NameId<Tag> to a vector of name strings.
|
| |
Common Tesseract Types.
- Author
- Levi Armstrong
-
Roelof Oomen
- Date
- January 18, 2018
- Copyright
- Copyright (c) 2017, Southwest Research Institute
- License
- Software License Agreement (Apache License)
- 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.