Utility namespace
Utitlities.
Contents
- Reference
This library contains utility classes used by all other Corrade parts, like debug and error output (class Debug), access to configuration files (class Configuration) or compiling data files into the executable (class Resource, see also tutorial).
This library is built if WITH_UTILITY is enabled when building Corrade. To use this library with CMake, you need to request the Utility component of the Corrade package and link to the Corrade::Utility target:
find_package(Corrade REQUIRED Utility) # ... target_link_libraries(your-app Corrade::Utility)
See also Downloading and building Corrade and Using Corrade with CMake for more information.
Namespaces
Classes
-
template<std::class AbstractHash
size_t digestSize> - Base template for hashing classes.
- class AndroidLogStreamBuffer
- Stream buffer that sends the data to Android log.
- class Arguments
- Command-line argument parser.
- class Configuration
- Parser and writer for configuration files.
- class ConfigurationGroup
- Group of values in configuration file.
-
template<class T>struct ConfigurationValue
- Configuration value parser and writer.
-
template<>struct ConfigurationValue<bool>
- Configuration value parser and writer for
booltype. -
template<>struct ConfigurationValue<char32_t>
- Configuration value parser and writer for
char32_ttype. -
template<>struct ConfigurationValue<double>
- Configuration value parser and writer for
doubletype. -
template<>struct ConfigurationValue<float>
- Configuration value parser and writer for
floattype. -
template<>struct ConfigurationValue<int>
- Configuration value parser and writer for
inttype. -
template<>struct ConfigurationValue<long>
- Configuration value parser and writer for
longtype. -
template<>struct ConfigurationValue<long double>
- Configuration value parser and writer for
long doubletype. -
template<>struct ConfigurationValue<long long>
- Configuration value parser and writer for
long longtype. -
template<>struct ConfigurationValue<short>
- Configuration value parser and writer for
shorttype. -
template<>struct ConfigurationValue<std::string>
- Configuration value parser and writer for std::
string type. -
template<>struct ConfigurationValue<unsigned int>
- Configuration value parser and writer for
unsigned inttype. -
template<>struct ConfigurationValue<unsigned long>
- Configuration value parser and writer for
unsigned longtype. -
template<>struct ConfigurationValue<unsigned long long>
- Configuration value parser and writer for
unsigned long longtype. -
template<>struct ConfigurationValue<unsigned short>
- Configuration value parser and writer for
unsigned shorttype. - class Debug
- Debug output handler.
- class Endianness
- Endianness related functions.
- class Error
- Error output handler.
- class Fatal
- Warning output handler.
-
template<std::class HashDigest
size_t size> - Hash digest.
- class MurmurHash2
- MurmurHash 2.
- class Resource
- Data resource management.
- class Sha1
- SHA-1.
- class Warning
- Warning output handler.
Enums
-
enum class ConfigurationValueFlag: std::
uint8_t { Oct = 1 << 0, Hex = 1 << 1, Scientific = 1 << 2, Uppercase = 1 << 3 } - Configuration value conversion flag.
Typedefs
-
using ConfigurationValueFlags = Containers::
EnumSet<ConfigurationValueFlag> - Configuration value conversion flags.
-
template<class T>using IsIterable = std::
integral_constant<bool,(Implementation::HasMemberBegin<T>::value||Implementation::HasBegin<T>::value||Implementation::HasStdBegin<T>::value)&&(Implementation::HasMemberEnd<T>::value||Implementation::HasEnd<T>::value||Implementation::HasStdEnd<T>::value)> - Traits class for checking whether given type is iterable.
Functions
-
auto operator<<(Debug& debug,
Debug::
Color value) -> Debug& - Debug output operator.
-
void sleep(std::
size_t ms) deprecated - Sleep for given time.
Type utilities
-
template<class To, class From>auto bitCast(const From& from) -> To
- Cast type to another of the same size.
Enum documentation
enum class Corrade:: Utility:: ConfigurationValueFlag: std:: uint8_t
Configuration value conversion flag.
| Enumerators | |
|---|---|
| Oct |
Numeric value as octal |
| Hex |
Numeric value as hexadecimal |
| Scientific |
Floating point values in scientific notation |
| Uppercase |
Use uppercase characters for numeric output |
Typedef documentation
typedef Containers:: EnumSet<ConfigurationValueFlag> Corrade:: Utility:: ConfigurationValueFlags
Configuration value conversion flags.
template<class T>
using Corrade:: Utility:: IsIterable = std:: integral_constant<bool,(Implementation::HasMemberBegin<T>::value||Implementation::HasBegin<T>::value||Implementation::HasStdBegin<T>::value)&&(Implementation::HasMemberEnd<T>::value||Implementation::HasEnd<T>::value||Implementation::HasStdEnd<T>::value)>
Traits class for checking whether given type is iterable.
Equivalent to std::begin() / end() members, is usable with free begin() / end() functions or has std::
Function documentation
Debug& Corrade:: Utility:: operator<<(Debug& debug,
Debug:: Color value)
Debug output operator.
void Corrade:: Utility:: sleep(std:: size_t ms)
Sleep for given time.
template<class To, class From>
To Corrade:: Utility:: bitCast(const From& from)
Cast type to another of the same size.
Unlike reinterpret_cast this doesn't break strict-aliasing rules.