VTK  9.4.20241108
Classes | Namespaces | Macros | Functions
vtkStringToken.h File Reference
#include <token/Token.h>
#include "vtkCompiler.h"
#include "vtkSmartPointer.h"
#include <vtk_nlohmannjson.h>
#include <VTK_NLOHMANN_JSON(json.hpp)>
#include <cstdint>
#include <unordered_set>
Include dependency graph for vtkStringToken.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  vtkStringToken
 Represent a string by its integer hash. More...
 
struct  std::hash< vtkStringToken >
 vtkStringTokens provide a specialization of std::hash so they can be used in unordered containers. More...
 

Namespaces

namespace  vtk
 Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
 
namespace  vtk::literals
 
namespace  std
 

Macros

#define VTK_STRING_TOKEN_SPACE_BEFORE_SUFFIX   0
 

Functions

void VTKCOMMONCORE_EXPORT from_json (const nlohmann::json &jj, vtkStringToken &tt)
 Convert a JSON value into a string token.
 
void VTKCOMMONCORE_EXPORT to_json (nlohmann::json &jj, const vtkStringToken &tt)
 Convert a string token into a JSON value.
 
constexpr VTKCOMMONCORE_EXPORT vtkStringToken::Hash vtk::literals::operator""_hash (const char *data, std::size_t size)
 Construct the hash of a string literal, like so:
 
constexpr VTKCOMMONCORE_EXPORT vtkStringToken vtk::literals::operator""_token (const char *data, std::size_t size)
 Construct a token from a string literal, like so:
 
bool VTKCOMMONCORE_EXPORT operator== (const std::string &a, const vtkStringToken &b)
 
bool VTKCOMMONCORE_EXPORT operator!= (const std::string &a, const vtkStringToken &b)
 
bool VTKCOMMONCORE_EXPORT operator> (const std::string &a, const vtkStringToken &b)
 
bool VTKCOMMONCORE_EXPORT operator< (const std::string &a, const vtkStringToken &b)
 
bool VTKCOMMONCORE_EXPORT operator>= (const std::string &a, const vtkStringToken &b)
 
bool VTKCOMMONCORE_EXPORT operator<= (const std::string &a, const vtkStringToken &b)
 
bool VTKCOMMONCORE_EXPORT operator== (const vtkStringToken &a, const std::string &b)
 
bool VTKCOMMONCORE_EXPORT operator!= (const vtkStringToken &a, const std::string &b)
 
bool VTKCOMMONCORE_EXPORT operator> (const vtkStringToken &a, const std::string &b)
 
bool VTKCOMMONCORE_EXPORT operator< (const vtkStringToken &a, const std::string &b)
 
bool VTKCOMMONCORE_EXPORT operator>= (const vtkStringToken &a, const std::string &b)
 
bool VTKCOMMONCORE_EXPORT operator<= (const vtkStringToken &a, const std::string &b)
 
bool VTKCOMMONCORE_EXPORT operator== (const char *a, const vtkStringToken &b)
 
bool VTKCOMMONCORE_EXPORT operator!= (const char *a, const vtkStringToken &b)
 
bool VTKCOMMONCORE_EXPORT operator> (const char *a, const vtkStringToken &b)
 
bool VTKCOMMONCORE_EXPORT operator< (const char *a, const vtkStringToken &b)
 
bool VTKCOMMONCORE_EXPORT operator>= (const char *a, const vtkStringToken &b)
 
bool VTKCOMMONCORE_EXPORT operator<= (const char *a, const vtkStringToken &b)
 
bool VTKCOMMONCORE_EXPORT operator== (const vtkStringToken &a, const char *b)
 
bool VTKCOMMONCORE_EXPORT operator!= (const vtkStringToken &a, const char *b)
 
bool VTKCOMMONCORE_EXPORT operator> (const vtkStringToken &a, const char *b)
 
bool VTKCOMMONCORE_EXPORT operator< (const vtkStringToken &a, const char *b)
 
bool VTKCOMMONCORE_EXPORT operator>= (const vtkStringToken &a, const char *b)
 
bool VTKCOMMONCORE_EXPORT operator<= (const vtkStringToken &a, const char *b)
 

Macro Definition Documentation

◆ VTK_STRING_TOKEN_SPACE_BEFORE_SUFFIX

#define VTK_STRING_TOKEN_SPACE_BEFORE_SUFFIX   0

Definition at line 51 of file vtkStringToken.h.

Function Documentation

◆ from_json()

void VTKCOMMONCORE_EXPORT from_json ( const nlohmann::json &  jj,
vtkStringToken tt 
)
inline

Convert a JSON value into a string token.

The value jj must be an integer or string. If it is a string, it will be hashed into a token. If it is an integer, it will be treated as a hash.

Definition at line 142 of file vtkStringToken.h.

◆ to_json()

void VTKCOMMONCORE_EXPORT to_json ( nlohmann::json &  jj,
const vtkStringToken tt 
)
inline

Convert a string token into a JSON value.

If tt has a valid string, jj will be set to the string. Otherwise, jj will be set to the integer hash held by tt.

Definition at line 162 of file vtkStringToken.h.

◆ operator==() [1/4]

bool VTKCOMMONCORE_EXPORT operator== ( const std::string &  a,
const vtkStringToken b 
)

◆ operator!=() [1/4]

bool VTKCOMMONCORE_EXPORT operator!= ( const std::string &  a,
const vtkStringToken b 
)

◆ operator>() [1/4]

bool VTKCOMMONCORE_EXPORT operator> ( const std::string &  a,
const vtkStringToken b 
)

◆ operator<() [1/4]

bool VTKCOMMONCORE_EXPORT operator< ( const std::string &  a,
const vtkStringToken b 
)

◆ operator>=() [1/4]

bool VTKCOMMONCORE_EXPORT operator>= ( const std::string &  a,
const vtkStringToken b 
)

◆ operator<=() [1/4]

bool VTKCOMMONCORE_EXPORT operator<= ( const std::string &  a,
const vtkStringToken b 
)

◆ operator==() [2/4]

bool VTKCOMMONCORE_EXPORT operator== ( const vtkStringToken a,
const std::string &  b 
)

◆ operator!=() [2/4]

bool VTKCOMMONCORE_EXPORT operator!= ( const vtkStringToken a,
const std::string &  b 
)

◆ operator>() [2/4]

bool VTKCOMMONCORE_EXPORT operator> ( const vtkStringToken a,
const std::string &  b 
)

◆ operator<() [2/4]

bool VTKCOMMONCORE_EXPORT operator< ( const vtkStringToken a,
const std::string &  b 
)

◆ operator>=() [2/4]

bool VTKCOMMONCORE_EXPORT operator>= ( const vtkStringToken a,
const std::string &  b 
)

◆ operator<=() [2/4]

bool VTKCOMMONCORE_EXPORT operator<= ( const vtkStringToken a,
const std::string &  b 
)

◆ operator==() [3/4]

bool VTKCOMMONCORE_EXPORT operator== ( const char *  a,
const vtkStringToken b 
)

◆ operator!=() [3/4]

bool VTKCOMMONCORE_EXPORT operator!= ( const char *  a,
const vtkStringToken b 
)

◆ operator>() [3/4]

bool VTKCOMMONCORE_EXPORT operator> ( const char *  a,
const vtkStringToken b 
)

◆ operator<() [3/4]

bool VTKCOMMONCORE_EXPORT operator< ( const char *  a,
const vtkStringToken b 
)

◆ operator>=() [3/4]

bool VTKCOMMONCORE_EXPORT operator>= ( const char *  a,
const vtkStringToken b 
)

◆ operator<=() [3/4]

bool VTKCOMMONCORE_EXPORT operator<= ( const char *  a,
const vtkStringToken b 
)

◆ operator==() [4/4]

bool VTKCOMMONCORE_EXPORT operator== ( const vtkStringToken a,
const char *  b 
)

◆ operator!=() [4/4]

bool VTKCOMMONCORE_EXPORT operator!= ( const vtkStringToken a,
const char *  b 
)

◆ operator>() [4/4]

bool VTKCOMMONCORE_EXPORT operator> ( const vtkStringToken a,
const char *  b 
)

◆ operator<() [4/4]

bool VTKCOMMONCORE_EXPORT operator< ( const vtkStringToken a,
const char *  b 
)

◆ operator>=() [4/4]

bool VTKCOMMONCORE_EXPORT operator>= ( const vtkStringToken a,
const char *  b 
)

◆ operator<=() [4/4]

bool VTKCOMMONCORE_EXPORT operator<= ( const vtkStringToken a,
const char *  b 
)