18 #ifndef CUPT_COMMON_SEEN
19 #define CUPT_COMMON_SEEN
22 #define CUPT_API __attribute__ ((visibility("default")))
23 #define CUPT_LOCAL __attribute__ ((visibility("hidden")))
55 : std::runtime_error(message)
62 : std::runtime_error(message)
68 using std::shared_ptr;
69 using std::static_pointer_cast;
70 using std::dynamic_pointer_cast;
81 void CUPT_API
fatal(
const char* format, ...);
83 void CUPT_API
warn(
const char* format, ...);
85 void CUPT_API
debug(
const char* format, ...);
87 void CUPT_API
simulate(
const char* format, ...);
90 CUPT_API
string sf(
const string& format, ...);
91 CUPT_API
string join(
const string& joiner,
const vector< string >& parts);
92 CUPT_API
string humanReadableSizeString(uint64_t bytes);
101 string CUPT_API
__(
const char* message);
121 void CUPT_API
consumePackageName(string::const_iterator begin, string::const_iterator end,
122 string::const_iterator& resultEnd);
130 bool CUPT_API
checkPackageName(
const string& packageName,
bool throwOnError =
true);
136 bool CUPT_API
checkVersionString(
const string& versionString,
bool throwOnError =
true);
152 #include <cupt/format2.hpp>