Cupt
|
Namespaces | |
namespace | cache |
namespace | download |
namespace | system |
Classes | |
class | Cache |
the source of package and version information More... | |
class | Exception |
general library exception class More... | |
class | Config |
stores library's configuration variables More... | |
class | File |
high-level interface to file routines More... | |
class | HashSums |
hash sums More... |
Functions | |
void | fatal (const char *format,...) |
void | warn (const char *format,...) |
void | debug (const char *format,...) |
void | simulate (const char *format,...) |
string | __ (const char *message) |
localizes message | |
void | consumePackageName (string::const_iterator begin, string::const_iterator end, string::const_iterator &resultEnd) |
reads package name in range | |
bool | checkPackageName (const string &packageName, bool throwOnError=true) |
checks package name for correctness | |
bool | checkVersionString (const string &versionString, bool throwOnError=true) |
checks version string for correctness | |
int | compareVersionStrings (const string &left, const string &right) |
compares two version strings |
Variables | |
const char *const | libraryVersion |
the version of Cupt library | |
int | messageFd |
message file descriptor |
string cupt::__ | ( | const char * | message | ) |
localizes message
message | input string |
bool cupt::checkPackageName | ( | const string & | packageName, |
bool | throwOnError = true |
||
) |
checks package name for correctness
packageName | package name |
throwOnError | if set to true , function will throw exception if packageName is not correct |
true
if the packageName is correct, false
if packageName is not correct and throwOnError is false
bool cupt::checkVersionString | ( | const string & | versionString, |
bool | throwOnError = true |
||
) |
checks version string for correctness
Equal to checkPackageName, only checks version string instead of package name
int cupt::compareVersionStrings | ( | const string & | left, |
const string & | right | ||
) |
compares two version strings
left | left version string |
right | right version string |
-1
, if left <
right, 0
if left ==
right, 1
if left >
right void cupt::consumePackageName | ( | string::const_iterator | begin, |
string::const_iterator | end, | ||
string::const_iterator & | resultEnd | ||
) |
reads package name in range
Tries to read as more characters as possible from the begin, which form a valid package name, until end.
begin | range begin iterator | |
end | range end iterator | |
[in,out] | resultEnd | consumed range end iterator |
"zzuf"
will be printed void cupt::debug | ( | const char * | format, |
... | |||
) |
void cupt::fatal | ( | const char * | format, |
... | |||
) |
void cupt::simulate | ( | const char * | format, |
... | |||
) |
void cupt::warn | ( | const char * | format, |
... | |||
) |
int cupt::messageFd |
message file descriptor
All library error, warning, debug and simulate messages will be pointed here. If messageFd ==
-1
, messages will be suppressed. Defaults to -1
.