Description:
The Util library basically contains a framework for creating command-line and server applications. Different configuration file formats are supported:Windows-style INI files, Java-style property files, XML
files and the Windows registry.Poco::Util::AbstractConfiguration provides a common interface for accessing configuration information from different sources.
Configuration settings are basically key/value pairs, where both key and value are strings.
-Keys have a hierarchical structure, consisting of names separated by
periods.
-Values can be converted to integers, doubles and booleans.
An optional default value can be specified in the getter functions. We use Poco::Util::Units::Values for the same.
We perform operations on a Value with a unit where,
The function *=( ) is used to increment units of values by specified value times.
Header File: Poco/Util/Units.h
Syntax:
Value & operator *= (
const ValueType & v
);
Program:
#include "Poco/Util/Units.h"
#include<iostream>
using namespace Poco::Util::Units::Values;
int main()
{
hour h;
h=day(2);
std::cout<<"Incrementing value by 2 times:"<<h*=2
//The values are converted to same type and then incrementing value by 2 times using the *=( ) function.
return 0;
}
Output:
96 hours
Comments