Tkrzw
Namespaces | Functions
tkrzw_cmd_util.h File Reference

Command-line utilities. More...

#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <mutex>
#include <random>
#include <set>
#include <string>
#include <string_view>
#include <thread>
#include <vector>
#include <cinttypes>
#include <cstdarg>
#include "tkrzw_containers.h"
#include "tkrzw_compress.h"
#include "tkrzw_dbm.h"
#include "tkrzw_dbm_async.h"
#include "tkrzw_dbm_baby.h"
#include "tkrzw_dbm_cache.h"
#include "tkrzw_dbm_common_impl.h"
#include "tkrzw_dbm_hash.h"
#include "tkrzw_dbm_hash_impl.h"
#include "tkrzw_dbm_poly.h"
#include "tkrzw_dbm_shard.h"
#include "tkrzw_dbm_skip.h"
#include "tkrzw_dbm_skip_impl.h"
#include "tkrzw_dbm_std.h"
#include "tkrzw_dbm_tiny.h"
#include "tkrzw_dbm_tree.h"
#include "tkrzw_dbm_tree_impl.h"
#include "tkrzw_dbm_ulog.h"
#include "tkrzw_file.h"
#include "tkrzw_file_mmap.h"
#include "tkrzw_file_pos.h"
#include "tkrzw_file_std.h"
#include "tkrzw_file_util.h"
#include "tkrzw_hash_util.h"
#include "tkrzw_index.h"
#include "tkrzw_key_comparators.h"
#include "tkrzw_lib_common.h"
#include "tkrzw_logger.h"
#include "tkrzw_message_queue.h"
#include "tkrzw_str_util.h"
#include "tkrzw_thread_util.h"
#include "tkrzw_time_util.h"

Namespaces

 tkrzw
 Common namespace of Tkrzw.
 

Functions

void tkrzw::Print ()
 Prints an empty string to the stdout and flush the buffer. More...
 
template<typename FIRST , typename... REST>
void tkrzw::Print (const FIRST &first, const REST &... rest)
 Prints strings to the stdout and flush the buffer. More...
 
void tkrzw::PrintL ()
 Prints an empty string and a line feed to the stdout and flush the buffer. More...
 
template<typename FIRST , typename... REST>
void tkrzw::PrintL (const FIRST &first, const REST &... rest)
 Prints strings and a line feed to the stdout and flush the buffer. More...
 
void tkrzw::PrintF (const char *format,...)
 Prints a formatted string to the stdout and flush the buffer. More...
 
void tkrzw::PutChar (char c)
 Prints a character to the stdout and flush the buffer. More...
 
void tkrzw::EPrint ()
 Prints an empty string to the stderr and flush the buffer. More...
 
template<typename FIRST , typename... REST>
void tkrzw::EPrint (const FIRST &first, const REST &... rest)
 Prints strings to the stderr and flush the buffer. More...
 
void tkrzw::EPrintL ()
 Prints an empty string and a line feed to the stderr and flush the buffer. More...
 
template<typename FIRST , typename... REST>
void tkrzw::EPrintL (const FIRST &first, const REST &... rest)
 Prints strings and a line feed to the stderr and flush the buffer. More...
 
void tkrzw::EPrintF (const char *format,...)
 Prints a formatted string to the stderr and flush the buffer. More...
 
void tkrzw::EPutChar (char c)
 Prints a character to the stderr and flush the buffer. More...
 
bool tkrzw::ParseCommandArguments (int32_t argc, const char **argv, const std::map< std::string, int32_t > &configs, std::map< std::string, std::vector< std::string >> *result, std::string *error_message)
 Parses command line arguments. More...
 
std::string tkrzw::GetStringArgument (const std::map< std::string, std::vector< std::string >> &args, const std::string &name, int32_t index, const std::string &default_value)
 Gets a string argument of parsed command arguments. More...
 
int64_t tkrzw::GetIntegerArgument (const std::map< std::string, std::vector< std::string >> &args, const std::string &name, int32_t index, int64_t default_value)
 Gets an integer argument of parsed command arguments. More...
 
double tkrzw::GetDoubleArgument (const std::map< std::string, std::vector< std::string >> &args, const std::string &name, int32_t index, double default_value)
 Gets a real number argument of parsed command arguments. More...
 
void tkrzw::Die (const std::string &message)
 Throws an exception of StatusException to terminates the process with a message. More...
 
template<typename FIRST , typename... REST>
void tkrzw::Die (const FIRST &first, const REST &... rest)
 Throws an exception of StatusException to terminates the process with a message. More...
 
std::unique_ptr< File > tkrzw::MakeFileOrDie (const std::string &impl_name, int64_t alloc_init_size, double alloc_inc_factor)
 Makes a file object or die. More...
 
void tkrzw::SetAccessStrategyOrDie (File *file, int64_t block_size, bool is_direct_io, bool is_sync_io, bool is_padding, bool is_pagecache)
 Sets access strategy of the positional access file. More...
 
void tkrzw::SetHeadBufferOfFileOrDie (File *file, int64_t size)
 Sets the head buffer of the positional access file. More...
 
void tkrzw::PrintDBMRecordsInTSV (DBM *dbm)
 Prints all records of a DBM in TSV format. More...
 
std::string tkrzw::MakeCyclishText (size_t size, int32_t seed)
 Makes a text whose characters appear in a cyclic pattern. More...
 
std::string tkrzw::MakeNaturalishText (size_t size, int32_t seed)
 Makes a text whose character distribution is sililar to natural Englsh. More...
 

Detailed Description

Command-line utilities.