classhueplusplus_1_1time_1_1_absolute_varied_time.html 19.2 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>hueplusplus: hueplusplus::time::AbsoluteVariedTime Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">hueplusplus
   &#160;<span id="projectnumber">1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacehueplusplus.html">hueplusplus</a></li><li class="navelem"><a class="el" href="namespacehueplusplus_1_1time.html">time</a></li><li class="navelem"><a class="el" href="classhueplusplus_1_1time_1_1_absolute_varied_time.html">AbsoluteVariedTime</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classhueplusplus_1_1time_1_1_absolute_varied_time-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">hueplusplus::time::AbsoluteVariedTime Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_time_pattern_8h_source.html">hueplusplus/TimePattern.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for hueplusplus::time::AbsoluteVariedTime:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classhueplusplus_1_1time_1_1_absolute_varied_time__inherit__graph.png" border="0" usemap="#hueplusplus_1_1time_1_1_absolute_varied_time_inherit__map" alt="Inheritance graph"/></div>
<map name="hueplusplus_1_1time_1_1_absolute_varied_time_inherit__map" id="hueplusplus_1_1time_1_1_absolute_varied_time_inherit__map">
<area shape="rect" id="node2" href="classhueplusplus_1_1time_1_1_absolute_time.html" title="One&#45;time, absolute time point. " alt="" coords="9,5,155,47"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="closed.png" alt="+"/> Collaboration diagram for hueplusplus::time::AbsoluteVariedTime:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classhueplusplus_1_1time_1_1_absolute_varied_time__coll__graph.png" border="0" usemap="#hueplusplus_1_1time_1_1_absolute_varied_time_coll__map" alt="Collaboration graph"/></div>
<map name="hueplusplus_1_1time_1_1_absolute_varied_time_coll__map" id="hueplusplus_1_1time_1_1_absolute_varied_time_coll__map">
<area shape="rect" id="node2" href="classhueplusplus_1_1time_1_1_absolute_time.html" title="One&#45;time, absolute time point. " alt="" coords="9,5,155,47"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:adc658d451620f95d63661194d506442d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1time_1_1_absolute_varied_time.html#adc658d451620f95d63661194d506442d">AbsoluteVariedTime</a> (clock::time_point baseTime, clock::duration variation=std::chrono::seconds(0))</td></tr>
<tr class="memdesc:adc658d451620f95d63661194d506442d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create absolute time point.  <a href="#adc658d451620f95d63661194d506442d">More...</a><br /></td></tr>
<tr class="separator:adc658d451620f95d63661194d506442d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4789cce97d2e3e58dace7b10726f14a2"><td class="memItemLeft" align="right" valign="top">clock::duration&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1time_1_1_absolute_varied_time.html#a4789cce97d2e3e58dace7b10726f14a2">getRandomVariation</a> () const</td></tr>
<tr class="memdesc:a4789cce97d2e3e58dace7b10726f14a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get random variation or zero.  <a href="#a4789cce97d2e3e58dace7b10726f14a2">More...</a><br /></td></tr>
<tr class="separator:a4789cce97d2e3e58dace7b10726f14a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b5f5159c7b8e4aabf09e412cd32b996"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1time_1_1_absolute_varied_time.html#a4b5f5159c7b8e4aabf09e412cd32b996">toString</a> () const</td></tr>
<tr class="memdesc:a4b5f5159c7b8e4aabf09e412cd32b996"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get formatted string as expected by Hue API.  <a href="#a4b5f5159c7b8e4aabf09e412cd32b996">More...</a><br /></td></tr>
<tr class="separator:a4b5f5159c7b8e4aabf09e412cd32b996"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classhueplusplus_1_1time_1_1_absolute_time"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classhueplusplus_1_1time_1_1_absolute_time')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classhueplusplus_1_1time_1_1_absolute_time.html">hueplusplus::time::AbsoluteTime</a></td></tr>
<tr class="memitem:a78ed85e1ea1356be6dbf319385498b30 inherit pub_methods_classhueplusplus_1_1time_1_1_absolute_time"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1time_1_1_absolute_time.html#a78ed85e1ea1356be6dbf319385498b30">AbsoluteTime</a> (clock::time_point baseTime)</td></tr>
<tr class="memdesc:a78ed85e1ea1356be6dbf319385498b30 inherit pub_methods_classhueplusplus_1_1time_1_1_absolute_time"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create absolute time point.  <a href="classhueplusplus_1_1time_1_1_absolute_time.html#a78ed85e1ea1356be6dbf319385498b30">More...</a><br /></td></tr>
<tr class="separator:a78ed85e1ea1356be6dbf319385498b30 inherit pub_methods_classhueplusplus_1_1time_1_1_absolute_time"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8db3aa8a4f512313791980dcd78c537e inherit pub_methods_classhueplusplus_1_1time_1_1_absolute_time"><td class="memItemLeft" align="right" valign="top">clock::time_point&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1time_1_1_absolute_time.html#a8db3aa8a4f512313791980dcd78c537e">getBaseTime</a> () const</td></tr>
<tr class="memdesc:a8db3aa8a4f512313791980dcd78c537e inherit pub_methods_classhueplusplus_1_1time_1_1_absolute_time"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get base time point.  <a href="classhueplusplus_1_1time_1_1_absolute_time.html#a8db3aa8a4f512313791980dcd78c537e">More...</a><br /></td></tr>
<tr class="separator:a8db3aa8a4f512313791980dcd78c537e inherit pub_methods_classhueplusplus_1_1time_1_1_absolute_time"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2581f035406533868d71e4c234f513d inherit pub_methods_classhueplusplus_1_1time_1_1_absolute_time"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1time_1_1_absolute_time.html#ab2581f035406533868d71e4c234f513d">toString</a> () const</td></tr>
<tr class="memdesc:ab2581f035406533868d71e4c234f513d inherit pub_methods_classhueplusplus_1_1time_1_1_absolute_time"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get formatted string as expected by Hue API.  <a href="classhueplusplus_1_1time_1_1_absolute_time.html#ab2581f035406533868d71e4c234f513d">More...</a><br /></td></tr>
<tr class="separator:ab2581f035406533868d71e4c234f513d inherit pub_methods_classhueplusplus_1_1time_1_1_absolute_time"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a9621c48e0c537df73552162bdaba7b32"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classhueplusplus_1_1time_1_1_absolute_varied_time.html">AbsoluteVariedTime</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1time_1_1_absolute_varied_time.html#a9621c48e0c537df73552162bdaba7b32">parse</a> (const std::string &amp;s)</td></tr>
<tr class="memdesc:a9621c48e0c537df73552162bdaba7b32"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse <a class="el" href="classhueplusplus_1_1time_1_1_absolute_time.html" title="One-time, absolute time point. ">AbsoluteTime</a> from formatted string in local timezone.  <a href="#a9621c48e0c537df73552162bdaba7b32">More...</a><br /></td></tr>
<tr class="separator:a9621c48e0c537df73552162bdaba7b32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_methods_classhueplusplus_1_1time_1_1_absolute_time"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classhueplusplus_1_1time_1_1_absolute_time')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classhueplusplus_1_1time_1_1_absolute_time.html">hueplusplus::time::AbsoluteTime</a></td></tr>
<tr class="memitem:ace5da237dfaf5e1b524d378e47c98828 inherit pub_static_methods_classhueplusplus_1_1time_1_1_absolute_time"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classhueplusplus_1_1time_1_1_absolute_time.html">AbsoluteTime</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1time_1_1_absolute_time.html#ace5da237dfaf5e1b524d378e47c98828">parse</a> (const std::string &amp;s)</td></tr>
<tr class="memdesc:ace5da237dfaf5e1b524d378e47c98828 inherit pub_static_methods_classhueplusplus_1_1time_1_1_absolute_time"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse <a class="el" href="classhueplusplus_1_1time_1_1_absolute_time.html" title="One-time, absolute time point. ">AbsoluteTime</a> from formatted string in local timezone.  <a href="classhueplusplus_1_1time_1_1_absolute_time.html#ace5da237dfaf5e1b524d378e47c98828">More...</a><br /></td></tr>
<tr class="separator:ace5da237dfaf5e1b524d378e47c98828 inherit pub_static_methods_classhueplusplus_1_1time_1_1_absolute_time"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96322623cd27d6dad3fb7276475a098d inherit pub_static_methods_classhueplusplus_1_1time_1_1_absolute_time"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classhueplusplus_1_1time_1_1_absolute_time.html">AbsoluteTime</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1time_1_1_absolute_time.html#a96322623cd27d6dad3fb7276475a098d">parseUTC</a> (const std::string &amp;s)</td></tr>
<tr class="memdesc:a96322623cd27d6dad3fb7276475a098d inherit pub_static_methods_classhueplusplus_1_1time_1_1_absolute_time"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse <a class="el" href="classhueplusplus_1_1time_1_1_absolute_time.html" title="One-time, absolute time point. ">AbsoluteTime</a> from formatted UTC string.  <a href="classhueplusplus_1_1time_1_1_absolute_time.html#a96322623cd27d6dad3fb7276475a098d">More...</a><br /></td></tr>
<tr class="separator:a96322623cd27d6dad3fb7276475a098d inherit pub_static_methods_classhueplusplus_1_1time_1_1_absolute_time"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>One-time, absolute time point with possible random variation</p>
<p>Can be either used to represent a specific date and time, or a date and time with a random variation. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="adc658d451620f95d63661194d506442d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc658d451620f95d63661194d506442d">&#9670;&nbsp;</a></span>AbsoluteVariedTime()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">hueplusplus::time::AbsoluteVariedTime::AbsoluteVariedTime </td>
          <td>(</td>
          <td class="paramtype">clock::time_point&#160;</td>
          <td class="paramname"><em>baseTime</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">clock::duration&#160;</td>
          <td class="paramname"><em>variation</em> = <code>std::chrono::seconds(0)</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create absolute time point. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">baseTime</td><td>Absolute time point </td></tr>
    <tr><td class="paramname">variation</td><td>Random variation, optional. When not zero, the time is randomly chosen between <code>baseTime - variation</code> and <code>baseTime + variation</code> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a4789cce97d2e3e58dace7b10726f14a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4789cce97d2e3e58dace7b10726f14a2">&#9670;&nbsp;</a></span>getRandomVariation()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">system_clock::duration hueplusplus::time::AbsoluteVariedTime::getRandomVariation </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get random variation or zero. </p>
<p>The time can vary up to this amount in both directions. </p>

</div>
</div>
<a id="a9621c48e0c537df73552162bdaba7b32"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9621c48e0c537df73552162bdaba7b32">&#9670;&nbsp;</a></span>parse()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classhueplusplus_1_1time_1_1_absolute_varied_time.html">AbsoluteVariedTime</a> hueplusplus::time::AbsoluteVariedTime::parse </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Parse <a class="el" href="classhueplusplus_1_1time_1_1_absolute_time.html" title="One-time, absolute time point. ">AbsoluteTime</a> from formatted string in local timezone. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>Timestamp in the same format as returned by <a class="el" href="classhueplusplus_1_1time_1_1_absolute_varied_time.html#a4b5f5159c7b8e4aabf09e412cd32b996">toString()</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classhueplusplus_1_1time_1_1_absolute_varied_time.html">AbsoluteVariedTime</a> with base time and variation from <code>s</code> </dd></dl>

</div>
</div>
<a id="a4b5f5159c7b8e4aabf09e412cd32b996"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b5f5159c7b8e4aabf09e412cd32b996">&#9670;&nbsp;</a></span>toString()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string hueplusplus::time::AbsoluteVariedTime::toString </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get formatted string as expected by Hue API. </p>
<dl class="section return"><dt>Returns</dt><dd>when variation is 0: Timestamp in the format <code>YYYY-MM-DD</code><b>T</b><code>hh:mm:ss</code> </dd>
<dd>
when there is variation: Timestamp in the format <code>YYYY-MM-DD</code><b>T</b><code>hh:mm:ss</code><b>A</b><code>hh:mm:ss</code> with base time first, variation second </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/hueplusplus/<a class="el" href="_time_pattern_8h_source.html">TimePattern.h</a></li>
<li>src/<a class="el" href="_time_pattern_8cpp.html">TimePattern.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>