identt
Macros | Functions
StoreBase.cc File Reference

identt More...

#include <iomanip>
#include <sstream>
#include <cmath>
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
#include <store/StoreBase.hpp>

Macros

#define IDENTT_MACRO_HEX(A)   std::setbase(16) << std::setfill ('0') << std::setw ( A )
 
#define IDENTT_MACRO_STR(A)   std::setfill (' ') << std::setw ( A )
 
#define IDENTT_FMT_ID_KEY(A)   IDENTT_MACRO_HEX(IDENTT_KEYID_LEN) << A
 
#define IDENTT_FMT_NODE_ONLY(A)   IDENTT_MACRO_HEX(IDENTT_NODE_LEN) << A
 
#define IDENTT_FMT_NODE_KEY(A, B)   IDENTT_FMT_ID_KEY(A) << IDENTT_FMT_NODE_ONLY(B)
 
#define IDENTT_FMT_SEP   ":"
 
#define IDENTT_FMT_UINT_ONLY(A)   IDENTT_FMT_NODE_ONLY(A)
 
#define IDENTT_FMT_STRN_ONLY(A)   A
 
#define IDENTT_FMT_SINT_ONLY(A)   IDENTT_MACRO_HEX(IDENTT_NODE_LEN) << A
 
#define IDENTT_FMT_UINT_KEY(A, B)   IDENTT_FMT_ID_KEY(A) << IDENTT_FMT_UINT_ONLY(B)
 
#define IDENTT_FMT_STRN_KEY(A, B)   IDENTT_FMT_ID_KEY(A) << IDENTT_FMT_STRN_ONLY(B)
 

Functions

template<typename T , size_t N>
std::string Base80String (T dividend)
 Base80String : Get limited char string : someone needs to get a faster way for this to be usable refer http://www.hackersdelight.org/divcMore.pdf. More...
 
uint64_t Str2Uint64 (std::string str)
 Str2Uint64 : Convert the first 8 characters of a string to 64 bit. More...
 

Detailed Description

identt

Author
S Roychowdhury <sroycode at="" gmail="" dot="" com>="">
Version
1.0.0

LICENSE

Copyright (c) 2017 S Roychowdhury.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

DESCRIPTION

StoreBase.cc : Store Base Implementation

Function Documentation

§ Base80String()

template<typename T , size_t N>
std::string Base80String ( dividend)
inline

Base80String : Get limited char string : someone needs to get a faster way for this to be usable refer http://www.hackersdelight.org/divcMore.pdf.

§ Str2Uint64()

uint64_t Str2Uint64 ( std::string  str)
inline

Str2Uint64 : Convert the first 8 characters of a string to 64 bit.

Parameters
strstd::string& string to change
Returns
uint64_t hash