Lagrange
Loading...
Searching...
No Matches
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/AttributeFwd.h>
15#include <lagrange/AttributeValueType.h>
16#include <lagrange/api.h>
17#include <lagrange/utils/BitField.h>
18
19#include <string>
20#include <string_view>
21
23
31LA_CORE_API std::string_view to_string(AttributeElement element);
32
40LA_CORE_API std::string to_string(BitField<AttributeElement> element);
41
49LA_CORE_API std::string_view to_string(AttributeUsage usage);
50
60template <typename ValueType>
61std::string_view value_type_name(const lagrange::Attribute<ValueType>& attr);
62
70template <typename ValueType>
71std::string_view value_type_name();
72
80LA_CORE_API std::string_view value_type_name(AttributeValueType value_type);
81
82} // namespace lagrange::internal
Derived attribute class that stores the actual information.
Definition Attribute.h:174
Bit field utility class.
Definition BitField.h:31
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
AttributeValueType
Enum describing at runtime the value type of an attribute.
Definition AttributeValueType.h:25
nullptr_t, size_t, ptrdiff_t basic_ostream bad_weak_ptr extent, remove_extent, is_array,...
Definition attribute_string_utils.h:22
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()
Returns a string representation of the attribute value type.