sculpto
Namespaces | Macros | Typedefs | Functions
string_id.h File Reference

String id generating by CRC32 algoritm implemetation module. Can be used both in compiletime anr runtime. More...

Go to the source code of this file.

Namespaces

namespace  scl
 

Macros

#define SCL_MAKE_STRING(T)   #T
 
#define SCL_STRING_ID(Str)   std::integral_constant<scl::string_id, scl::crc32(Str, sizeof(Str) - 1)>::value
 

Typedefs

using scl::string_id = unsigned int
 

Functions

constexpr string_id scl::crc32_impl (const char *p, size_t len, string_id crc)
 
constexpr string_id scl::crc32 (const char *data, size_t length)
 
constexpr size_t scl::strlen_c (const char *str)
 
constexpr string_id scl::StringId (const char *Str)
 
template<typename StringClass >
constexpr string_id scl::StringId (const StringClass &Str)
 
constexpr string_id scl::operator""_id (const char *Str, size_t Length)
 

Detailed Description

String id generating by CRC32 algoritm implemetation module. Can be used both in compiletime anr runtime.

Author
Sabitov Kirill
Date
24 June 2022

Definition in file string_id.h.

Macro Definition Documentation

◆ SCL_MAKE_STRING

#define SCL_MAKE_STRING (   T)    #T

Definition at line 12 of file string_id.h.

◆ SCL_STRING_ID

#define SCL_STRING_ID (   Str)    std::integral_constant<scl::string_id, scl::crc32(Str, sizeof(Str) - 1)>::value
  • Generate string id using crc32 algorithm function at compiletime.
Parameters
Str- srting to genrerate id of.
Returns
id of string.

Definition at line 120 of file string_id.h.