Lagrange
attribute_string_utils.h
1/*
2 * Copyright 2022 Adobe. All rights reserved.
3 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License. You may obtain a copy
5 * of the License at http://www.apache.org/licenses/LICENSE-2.0
6 *
7 * Unless required by applicable law or agreed to in writing, software distributed under
8 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 * OF ANY KIND, either express or implied. See the License for the specific language
10 * governing permissions and limitations under the License.
11 */
12#pragma once
13
14#include <lagrange/api.h>
15#include <lagrange/AttributeFwd.h>
16#include <lagrange/utils/BitField.h>
17
18#include <string>
19#include <string_view>
20
22
30LA_CORE_API std::string_view to_string(AttributeElement element);
31
39LA_CORE_API std::string to_string(BitField<AttributeElement> element);
40
48LA_CORE_API std::string_view to_string(AttributeUsage usage);
49
59template <typename ValueType>
60std::string_view value_type_name(const lagrange::Attribute<ValueType>& attr);
61
69template <typename ValueType>
70std::string_view value_type_name();
71
72} // namespace lagrange::internal
AttributeUsage
Usage tag indicating how the attribute should behave under mesh transformations.
Definition: AttributeFwd.h:54
AttributeElement
Type of element to which the attribute is attached.
Definition: AttributeFwd.h:26
nullptr_t, size_t, ptrdiff_t basic_ostream bad_weak_ptr extent, remove_extent, is_array,...
Definition: attribute_string_utils.h:21
LA_CORE_API std::string_view to_string(AttributeElement element)
Returns a string representation of an attribute element type.
Definition: attribute_string_utils.cpp:22
std::string_view value_type_name(const lagrange::Attribute< ValueType > &attr)
Returns a string representation of the attribute value type.