C++ Poco::Util::Units::Values::*=( )














































C++ Poco::Util::Units::Values::*=( )




C++ Poco::Util::Units::Values::*=( )

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,

  •     V is the type you are storing
  •     U is the unit of the Value
  •     template < typename V, typename U > 

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<<std::endl;

//The values are converted to same type and then incrementing value by 2 times using the *=( ) function.

return 0;

}


Output:

96 hours


More Articles of Sanjana P:

Name Views Likes
C++ Poco::Util::Units::Values::atto( ) 146 7
C++ Poco::Util::Units::Values::micro( ) 159 7
C++ Poco::Util::Units::Values::deca( ) 147 1
C++ Poco::Util::Units::Values::tera( ) 142 7
C++ Poco::Util::Units::Values::deci( ) 118 0
C++ Poco::Util::Units::Values::-( ) 227 68
C++ Poco::Util::Units::Values::femto( ) 152 3
C++Poco::Util::Units::Values::==( ) 176 0
C++ Poco::Util::Units::Values::+( ) 208 11
C++ Poco::Util::Units::Values::/( ) 229 68
C++ Poco::Util::Units::Values::=( ) 195 0
C++ Poco::Util::Units::Values::peta( ) 136 6
C++ Poco::Util::Units::Values::zetta( ) 156 12
C++ Poco::Util::Units::Values::mega( ) 165 2
C++ Poco::Util::Units::Values::giga( ) 180 3
C++ Poco::Util::Units::Values::hecto( ) 140 4
C++ Poco::Util::Units::Values::yocto( ) 148 10
C++ Poco::Util::Units::Values::zepto( ) 197 19
C++ Poco::Util::Units::Values::exa( ) 137 2
C++ Poco::Util::Units::Values::nano( ) 160 7
C++ Poco::Util::Units::Values::--( ) 194 0
C++Poco::Util::Units::Values::>=( ) 176 0
C++ Poco::Util::Units::Values::<( ) 224 68
C++ Poco::Util::Units::Values::*=( ) 193 0
C++ Poco::Util::Units::Values::>( ) 224 68
C++ Poco::Util::Units::Values::++( ) 135 6
C++ Poco::Util::Units::Values::+=( ) 187 0
C++ Poco::Utils::Units::Values::*( ) 175 6
C++Poco::Util::Units::Values::<=( ) 196 11
C++ Poco::Util::Units::Values::yotta( ) 130 15
C++ Poco::Util::Units::Values::pico( ) 130 4
C++Poco::Util::Units::Values::/=( ) 175 0
C++ Poco::Util::Units::Values::centi( ) 126 11
C++ Poco::Util::Units::Values::milli( ) 152 11
C++ Poco::Util::Units::Values::kilo( ) 140 0
C++Poco::Util::Units::Values::!=( ) 176 0
C++ Poco::Util::Units::Values::-=( ) 194 0

Comments