Bifrost SDK
Bifrost SDK documentation
StringStl.h
Go to the documentation of this file.
1//-
2// =============================================================================
3// Copyright 2023 Autodesk, Inc. All rights reserved.
4//
5// Use of this software is subject to the terms of the Autodesk license
6// agreement provided at the time of installation or download, or which
7// otherwise accompanies this software in either electronic or hard copy form.
8// =============================================================================
9
10//+
11
13
14#ifndef AMINO_CORE_STRING_STL_H
15#define AMINO_CORE_STRING_STL_H
16
17#include "String.h"
18
19#include <ostream>
20#include <string>
21
22namespace std {
23
25template <>
26struct hash<Amino::String> {
28 using result_type = size_t;
29
31 return hash<string>()(str.c_str());
32 }
33};
34
35} // namespace std
36
37namespace Amino {
38
47inline std::ostream& operator<<(std::ostream& os, const String& str) {
48 os << str.c_str();
49 return os;
50}
51
52} // namespace Amino
53
54#endif
String class.
Definition: HostData.h:33
std::ostream & operator<<(std::ostream &os, const String &str)
Insert the contents of the string str into the output stream os.
Definition: StringStl.h:47
Definition: Ptr.h:2080
The string class used by Amino.
Definition: String.h:46
const char * c_str() const
Return the string as a char*.
result_type operator()(const argument_type &str) const
Definition: StringStl.h:30