OoOJoin  0.0.1
The next generation of out-of-order join operator
Shared Utils
Collaboration diagram for Shared Utils:

Modules

 Other common class or package under C++20 standard
 
 Configurations
 
 Log utils
 
 The Micro dataset
 

Classes

class  INTELLI::ConfigMap
 The unified map structure to store configurations in a key-value style. More...
 

Functions

void INTELLI::ConfigMap::spilt (const std::string s, const std::string &c, vector< std::string > &v)
 
void INTELLI::ConfigMap::edit (std::string key, uint64_t value)
 Edit the config map. If not exit the config, will create new, or will overwrite. More...
 
void INTELLI::ConfigMap::edit (std::string key, int64_t value)
 Edit the config map. If not exit the config, will create new, or will overwrite. More...
 
void INTELLI::ConfigMap::edit (std::string key, double value)
 Edit the config map. If not exit the config, will create new, or will overwrite. More...
 
void INTELLI::ConfigMap::edit (std::string key, std::string value)
 Edit the config map. If not exit the config, will create new, or will overwrite. More...
 
bool INTELLI::ConfigMap::existU64 (std::string key)
 To detect whether the key exists and related to a U64. More...
 
bool INTELLI::ConfigMap::existI64 (std::string key)
 To detect whether the key exists and related to a I64. More...
 
bool INTELLI::ConfigMap::existDouble (std::string key)
 To detect whether the key exists and related to a double. More...
 
bool INTELLI::ConfigMap::existString (std::string key)
 To detect whether the key exists and related to a std::string. More...
 
bool INTELLI::ConfigMap::exist (std::string key)
 To detect whether the key exists. More...
 
uint64_t INTELLI::ConfigMap::getU64 (std::string key)
 To get a U64 value by key. More...
 
int64_t INTELLI::ConfigMap::getI64 (std::string key)
 To get a I64 value by key. More...
 
double INTELLI::ConfigMap::getDouble (std::string key)
 To get a double value by key. More...
 
std::string INTELLI::ConfigMap::getString (std::string key)
 To get a std::string value by key. More...
 
std::string INTELLI::ConfigMap::toString (std::string separator="\t", std::string newLine="\n")
 convert the whole map to std::string and retuen More...
 
void INTELLI::ConfigMap::cloneInto (ConfigMap &dest)
 clone this config into destination More...
 
bool INTELLI::ConfigMap::toFile (std::string fname, std::string separator=",", std::string newLine="\n")
 convert the whole map to file More...
 
bool INTELLI::ConfigMap::fromFile (std::string fname, std::string separator=",", std::string newLine="\n")
 update the whole map from file More...
 
int64_t INTELLI::ConfigMap::tryI64 (string key, int64_t defaultValue=0, bool showWarning=false)
 Try to get an I64 from config map, if not exist, use default value instead. More...
 
uint64_t INTELLI::ConfigMap::tryU64 (string key, uint64_t defaultValue=0, bool showWarning=false)
 Try to get an U64 from config map, if not exist, use default value instead. More...
 
double INTELLI::ConfigMap::tryDouble (string key, double defaultValue=0, bool showWarning=false)
 Try to get a double from config map, if not exist, use default value instead. More...
 
string INTELLI::ConfigMap::tryString (string key, string defaultValue="", bool showWarning=false)
 Try to get an String from config map, if not exist, use default value instead. More...
 

Variables

std::map< std::string, uint64_t > INTELLI::ConfigMap::u64Map
 
std::map< std::string, int64_t > INTELLI::ConfigMap::i64Map
 
std::map< std::string, double > INTELLI::ConfigMap::doubleMap
 
std::map< std::string, std::string > INTELLI::ConfigMap::strMap
 

Detailed Description

This group provides common functions to support the Intelli Stream programs.

Function Documentation

◆ cloneInto()

void INTELLI::ConfigMap::cloneInto ( ConfigMap dest)
inline

clone this config into destination

Parameters
destThe clone destination

◆ edit() [1/4]

void INTELLI::ConfigMap::edit ( std::string  key,
double  value 
)
inline

Edit the config map. If not exit the config, will create new, or will overwrite.

Parameters
keyThe look up key in std::string
valueThe double value

◆ edit() [2/4]

void INTELLI::ConfigMap::edit ( std::string  key,
int64_t  value 
)
inline

Edit the config map. If not exit the config, will create new, or will overwrite.

Parameters
keyThe look up key in std::string
valueThe i64 value

◆ edit() [3/4]

void INTELLI::ConfigMap::edit ( std::string  key,
std::string  value 
)
inline

Edit the config map. If not exit the config, will create new, or will overwrite.

Parameters
keyThe look up key in std::string
valueThe std::string value

◆ edit() [4/4]

void INTELLI::ConfigMap::edit ( std::string  key,
uint64_t  value 
)
inline

Edit the config map. If not exit the config, will create new, or will overwrite.

Parameters
keyThe look up key in std::string
valueThe u64 value

◆ exist()

bool INTELLI::ConfigMap::exist ( std::string  key)
inline

To detect whether the key exists.

Parameters
key
Returns
bool for the result

◆ existDouble()

bool INTELLI::ConfigMap::existDouble ( std::string  key)
inline

To detect whether the key exists and related to a double.

Parameters
key
Returns
bool for the result

◆ existI64()

bool INTELLI::ConfigMap::existI64 ( std::string  key)
inline

To detect whether the key exists and related to a I64.

Parameters
key
Returns
bool for the result

◆ existString()

bool INTELLI::ConfigMap::existString ( std::string  key)
inline

To detect whether the key exists and related to a std::string.

Parameters
key
Returns
bool for the result

◆ existU64()

bool INTELLI::ConfigMap::existU64 ( std::string  key)
inline

To detect whether the key exists and related to a U64.

Parameters
key
Returns
bool for the result

◆ fromFile()

bool INTELLI::ConfigMap::fromFile ( std::string  fname,
std::string  separator = ",",
std::string  newLine = "\n" 
)
inline

update the whole map from file

Parameters
fnameThe file name
separatorThe separator std::string, default "," for csv style
newLineThe newline std::string, default "\n"
Returns
bool, whether the file is loaded

◆ getDouble()

double INTELLI::ConfigMap::getDouble ( std::string  key)
inline

To get a double value by key.

Parameters
key
Returns
value
Warning
the key must exist!!

◆ getI64()

int64_t INTELLI::ConfigMap::getI64 ( std::string  key)
inline

To get a I64 value by key.

Parameters
key
Returns
value
Warning
the key must exist!!

◆ getString()

std::string INTELLI::ConfigMap::getString ( std::string  key)
inline

To get a std::string value by key.

Parameters
key
Returns
value
Warning
the key must exist!!

◆ getU64()

uint64_t INTELLI::ConfigMap::getU64 ( std::string  key)
inline

To get a U64 value by key.

Parameters
key
Returns
value
Warning
the key must exist!!

◆ toFile()

bool INTELLI::ConfigMap::toFile ( std::string  fname,
std::string  separator = ",",
std::string  newLine = "\n" 
)
inline

convert the whole map to file

Parameters
fnameThe file name
separatorThe separator std::string, default "," for csv style
newLineThe newline std::string, default "\n"
Returns
bool, whether the file is created

◆ toString()

std::string INTELLI::ConfigMap::toString ( std::string  separator = "\t",
std::string  newLine = "\n" 
)
inline

convert the whole map to std::string and retuen

Parameters
separatorThe separator std::string, default "\t"
newLineThe newline std::string, default "\n"
Returns
the result

◆ tryDouble()

double INTELLI::ConfigMap::tryDouble ( string  key,
double  defaultValue = 0,
bool  showWarning = false 
)
inline

Try to get a double from config map, if not exist, use default value instead.

Parameters
keyThe key
defaultValueThe default
showWarningWhether show warning logs if not found
Returns
The returned value

◆ tryI64()

int64_t INTELLI::ConfigMap::tryI64 ( string  key,
int64_t  defaultValue = 0,
bool  showWarning = false 
)
inline

Try to get an I64 from config map, if not exist, use default value instead.

Parameters
keyThe key
defaultValueThe default
showWarningWhether show warning logs if not found
Returns
The returned value

◆ tryString()

string INTELLI::ConfigMap::tryString ( string  key,
string  defaultValue = "",
bool  showWarning = false 
)
inline

Try to get an String from config map, if not exist, use default value instead.

Parameters
keyThe key
defaultValueThe default
showWarningWhether show warning logs if not found
Returns
The returned value

◆ tryU64()

uint64_t INTELLI::ConfigMap::tryU64 ( string  key,
uint64_t  defaultValue = 0,
bool  showWarning = false 
)
inline

Try to get an U64 from config map, if not exist, use default value instead.

Parameters
keyThe key
defaultValueThe default
showWarningWhether show warning logs if not found
Returns
The returned value