Dogecoin Core
1.14.2
P2P Digital Currency
|
#include "compat.h"
#include "tinyformat.h"
#include "utiltime.h"
#include <atomic>
#include <exception>
#include <map>
#include <stdint.h>
#include <string>
#include <vector>
#include <boost/filesystem/path.hpp>
#include <boost/signals2/signal.hpp>
#include <boost/thread/exceptions.hpp>
Go to the source code of this file.
Classes | |
class | CTranslationInterface |
Signals for translation. More... | |
Macros | |
#define | LogPrint(category, ...) |
#define | LogPrintf(...) |
Functions | |
std::string | _ (const char *psz) |
Translation function: Call Translate signal on UI interface, which returns a boost::optional result. More... | |
void | SetupEnvironment () |
bool | SetupNetworking () |
bool | LogAcceptCategory (const char *category) |
Return true if log accepts specified category. More... | |
int | LogPrintStr (const std::string &str) |
Send a string to the log output. More... | |
template<typename... Args> | |
bool | error (const char *fmt, const Args &... args) |
void | PrintExceptionContinue (const std::exception *pex, const char *pszThread) |
void | ParseParameters (int argc, const char *const argv[]) |
void | FileCommit (FILE *file) |
bool | TruncateFile (FILE *file, unsigned int length) |
int | RaiseFileDescriptorLimit (int nMinFD) |
this function tries to raise the file descriptor limit to the requested number. More... | |
void | AllocateFileRange (FILE *file, unsigned int offset, unsigned int length) |
this function tries to make a particular range of a file allocated (corresponding to disk space) it is advisory, and the range specified in the arguments will never contain live data More... | |
bool | RenameOver (boost::filesystem::path src, boost::filesystem::path dest) |
bool | TryCreateDirectory (const boost::filesystem::path &p) |
Ignores exceptions thrown by Boost's create_directory if the requested directory exists. More... | |
boost::filesystem::path | GetDefaultDataDir () |
const boost::filesystem::path & | GetDataDir (bool fNetSpecific=true) |
void | ClearDatadirCache () |
boost::filesystem::path | GetConfigFile (const std::string &confPath) |
boost::filesystem::path | GetPidFile () |
void | CreatePidFile (const boost::filesystem::path &path, pid_t pid) |
void | ReadConfigFile (const std::string &confPath) |
void | OpenDebugLog () |
void | ShrinkDebugFile () |
void | runCommand (const std::string &strCommand) |
bool | IsSwitchChar (char c) |
bool | IsArgSet (const std::string &strArg) |
Return true if the given argument has been manually set. More... | |
std::string | GetArg (const std::string &strArg, const std::string &strDefault) |
Return string argument or default value. More... | |
int64_t | GetArg (const std::string &strArg, int64_t nDefault) |
Return integer argument or default value. More... | |
bool | GetBoolArg (const std::string &strArg, bool fDefault) |
Return boolean argument or default value. More... | |
bool | SoftSetArg (const std::string &strArg, const std::string &strValue) |
Set an argument if it doesn't already have a value. More... | |
bool | SoftSetBoolArg (const std::string &strArg, bool fValue) |
Set a boolean argument if it doesn't already have a value. More... | |
void | ForceSetArg (const std::string &strArg, const std::string &strValue) |
std::string | HelpMessageGroup (const std::string &message) |
Format a string to be used as group of options in help messages. More... | |
std::string | HelpMessageOpt (const std::string &option, const std::string &message) |
Format a string to be used as option description in help messages. More... | |
int | GetNumCores () |
Return the number of physical cores available on the current system. More... | |
void | RenameThread (const char *name) |
template<typename Callable > | |
void | TraceThread (const char *name, Callable func) |
std::string | CopyrightHolders (const std::string &strPrefix) |
Variables | |
const std::map< std::string, std::vector< std::string > > & | mapMultiArgs |
bool | fDebug |
bool | fPrintToConsole |
bool | fPrintToDebugLog |
bool | fLogTimestamps |
bool | fLogTimeMicros |
bool | fLogIPs |
std::atomic< bool > | fReopenDebugLog |
CTranslationInterface | translationInterface |
const char *const | BITCOIN_CONF_FILENAME |
const char *const | BITCOIN_PID_FILENAME |
#define LogPrint | ( | category, | |
... | |||
) |
#define LogPrintf | ( | ... | ) |
|
inline |
void AllocateFileRange | ( | FILE * | file, |
unsigned int | offset, | ||
unsigned int | length | ||
) |
std::string CopyrightHolders | ( | const std::string & | strPrefix | ) |
void CreatePidFile | ( | const boost::filesystem::path & | path, |
pid_t | pid | ||
) |
bool error | ( | const char * | fmt, |
const Args &... | args | ||
) |
void ForceSetArg | ( | const std::string & | strArg, |
const std::string & | strValue | ||
) |
std::string GetArg | ( | const std::string & | strArg, |
const std::string & | strDefault | ||
) |
int64_t GetArg | ( | const std::string & | strArg, |
int64_t | nDefault | ||
) |
bool GetBoolArg | ( | const std::string & | strArg, |
bool | fDefault | ||
) |
boost::filesystem::path GetConfigFile | ( | const std::string & | confPath | ) |
const boost::filesystem::path& GetDataDir | ( | bool | fNetSpecific = true | ) |
boost::filesystem::path GetDefaultDataDir | ( | ) |
int GetNumCores | ( | ) |
boost::filesystem::path GetPidFile | ( | ) |
std::string HelpMessageGroup | ( | const std::string & | message | ) |
std::string HelpMessageOpt | ( | const std::string & | option, |
const std::string & | message | ||
) |
Format a string to be used as option description in help messages.
option | Option message (e.g. "-rpcuser=<user>") |
message | Option description (e.g. "Username for JSON-RPC connections") |
Definition at line 452 of file util.cpp.
bool IsArgSet | ( | const std::string & | strArg | ) |
|
inline |
bool LogAcceptCategory | ( | const char * | category | ) |
int LogPrintStr | ( | const std::string & | str | ) |
void ParseParameters | ( | int | argc, |
const char *const | argv[] | ||
) |
void PrintExceptionContinue | ( | const std::exception * | pex, |
const char * | pszThread | ||
) |
int RaiseFileDescriptorLimit | ( | int | nMinFD | ) |
void ReadConfigFile | ( | const std::string & | confPath | ) |
bool RenameOver | ( | boost::filesystem::path | src, |
boost::filesystem::path | dest | ||
) |
void RenameThread | ( | const char * | name | ) |
void runCommand | ( | const std::string & | strCommand | ) |
void SetupEnvironment | ( | ) |
bool SetupNetworking | ( | ) |
void ShrinkDebugFile | ( | ) |
bool SoftSetArg | ( | const std::string & | strArg, |
const std::string & | strValue | ||
) |
bool SoftSetBoolArg | ( | const std::string & | strArg, |
bool | fValue | ||
) |
Set a boolean argument if it doesn't already have a value.
strArg | Argument to set (e.g. "-foo") |
fValue | Value (e.g. false) |
Definition at line 428 of file util.cpp.
void TraceThread | ( | const char * | name, |
Callable | func | ||
) |
bool TryCreateDirectory | ( | const boost::filesystem::path & | p | ) |
|
extern |
|
extern |
|
extern |