ONE - On-device Neural Engine
Loading...
Searching...
No Matches
util.h File Reference
#include <errno.h>
#include "flatbuffers/base.h"
#include "flatbuffers/stl_emulation.h"
#include <sstream>
#include <iomanip>
#include <string>

Go to the source code of this file.

Namespaces

namespace  flatbuffers
 

Macros

#define __strtod_impl(s, pe)   strtod(s, pe)
 
#define __strtof_impl(s, pe)   static_cast<float>(strtod(s, pe))
 
#define __strtoull_impl(s, pe, b)   strtoull(s, pe, b)
 
#define __strtoll_impl(s, pe, b)   strtoll(s, pe, b)
 

Typedefs

typedef bool(* flatbuffers::LoadFileFunction) (const char *filename, bool binary, std::string *dest)
 
typedef bool(* flatbuffers::FileExistsFunction) (const char *filename)
 

Functions

bool flatbuffers::check_ascii_range (char x, char a, char b)
 
bool flatbuffers::is_alpha (char c)
 
bool flatbuffers::is_alpha_upper (char c)
 
bool flatbuffers::is_alpha_char (char c, char alpha)
 
bool flatbuffers::is_digit (char c)
 
bool flatbuffers::is_xdigit (char c)
 
bool flatbuffers::is_alnum (char c)
 
char flatbuffers::CharToUpper (char c)
 
char flatbuffers::CharToLower (char c)
 
template<typename T >
std::string flatbuffers::NumToString (T t)
 
template<>
std::string flatbuffers::NumToString< signed char > (signed char t)
 
template<>
std::string flatbuffers::NumToString< unsigned char > (unsigned char t)
 
template<>
std::string flatbuffers::NumToString< char > (char t)
 
template<typename T >
std::string flatbuffers::FloatToString (T t, int precision)
 
template<>
std::string flatbuffers::NumToString< double > (double t)
 
template<>
std::string flatbuffers::NumToString< float > (float t)
 
std::string flatbuffers::IntToStringHex (int i, int xdigits)
 
void flatbuffers::strtoval_impl (int64_t *val, const char *str, char **endptr, int base)
 
void flatbuffers::strtoval_impl (uint64_t *val, const char *str, char **endptr, int base)
 
void flatbuffers::strtoval_impl (double *val, const char *str, char **endptr)
 
 flatbuffers::__supress_ubsan__ ("float-cast-overflow") inline void strtoval_impl(float *val
 
template<typename T >
bool flatbuffers::StringToIntegerImpl (T *val, const char *const str, const int base=0, const bool check_errno=true)
 
template<typename T >
bool flatbuffers::StringToFloatImpl (T *val, const char *const str)
 
template<typename T >
bool flatbuffers::StringToNumber (const char *s, T *val)
 
template<>
bool flatbuffers::StringToNumber< int64_t > (const char *str, int64_t *val)
 
template<>
bool flatbuffers::StringToNumber< uint64_t > (const char *str, uint64_t *val)
 
template<>
bool flatbuffers::StringToNumber (const char *s, float *val)
 
template<>
bool flatbuffers::StringToNumber (const char *s, double *val)
 
int64_t flatbuffers::StringToInt (const char *s, int base=10)
 
uint64_t flatbuffers::StringToUInt (const char *s, int base=10)
 
LoadFileFunction flatbuffers::SetLoadFileFunction (LoadFileFunction load_file_function)
 
FileExistsFunction flatbuffers::SetFileExistsFunction (FileExistsFunction file_exists_function)
 
bool flatbuffers::FileExists (const char *name)
 
bool flatbuffers::DirExists (const char *name)
 
bool flatbuffers::LoadFile (const char *name, bool binary, std::string *buf)
 
bool flatbuffers::SaveFile (const char *name, const char *buf, size_t len, bool binary)
 
bool flatbuffers::SaveFile (const char *name, const std::string &buf, bool binary)
 
std::string flatbuffers::StripExtension (const std::string &filepath)
 
std::string flatbuffers::GetExtension (const std::string &filepath)
 
std::string flatbuffers::StripPath (const std::string &filepath)
 
std::string flatbuffers::StripFileName (const std::string &filepath)
 
std::string flatbuffers::ConCatPathFileName (const std::string &path, const std::string &filename)
 
std::string flatbuffers::PosixPath (const char *path)
 
void flatbuffers::EnsureDirExists (const std::string &filepath)
 
std::string flatbuffers::AbsolutePath (const std::string &filepath)
 
int flatbuffers::ToUTF8 (uint32_t ucc, std::string *out)
 
int flatbuffers::FromUTF8 (const char **in)
 
std::string flatbuffers::WordWrap (const std::string in, size_t max_length, const std::string wrapped_line_prefix, const std::string wrapped_line_suffix)
 
bool flatbuffers::EscapeString (const char *s, size_t length, std::string *_text, bool allow_non_utf8, bool natural_utf8)
 
std::string flatbuffers::BufferToHexText (const void *buffer, size_t buffer_size, size_t max_length, const std::string &wrapped_line_prefix, const std::string &wrapped_line_suffix)
 
std::string flatbuffers::RemoveStringQuotes (const std::string &s)
 
bool flatbuffers::SetGlobalTestLocale (const char *locale_name, std::string *_value=nullptr)
 
bool flatbuffers::ReadEnvironmentVariable (const char *var_name, std::string *_value=nullptr)
 
void flatbuffers::SetupDefaultCRTReportMode ()
 

Variables

const char * flatbuffers::str
 
const char char ** flatbuffers::endptr
 
FLATBUFFERS_CONSTEXPR char flatbuffers::kPathSeparator = '/'
 

Macro Definition Documentation

◆ __strtod_impl

#define __strtod_impl (   s,
  pe 
)    strtod(s, pe)

Definition at line 263 of file util.h.

◆ __strtof_impl

#define __strtof_impl (   s,
  pe 
)    static_cast<float>(strtod(s, pe))

Definition at line 264 of file util.h.

◆ __strtoll_impl

#define __strtoll_impl (   s,
  pe,
 
)    strtoll(s, pe, b)

Definition at line 270 of file util.h.

◆ __strtoull_impl

#define __strtoull_impl (   s,
  pe,
 
)    strtoull(s, pe, b)

Definition at line 269 of file util.h.