当前位置: 首页>>代码示例>>C++>>正文


C++ period类代码示例

本文整理汇总了C++中period的典型用法代码示例。如果您正苦于以下问题:C++ period类的具体用法?C++ period怎么用?C++ period使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了period类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: return

 inline
 bool 
 period<point_rep,duration_rep>::is_adjacent(const period<point_rep,duration_rep>& other) const 
 {
   return (other.begin() == end() ||
           begin_ == other.end());
 }
开发者ID:,项目名称:,代码行数:7,代码来源:

示例2: start

 inline
 period<point_rep,duration_rep>
 period<point_rep,duration_rep>::span(const period<point_rep,duration_rep>& other) const 
 {
   point_rep start((begin_ < other.begin_) ? begin() : other.begin());
   point_rep newend((last_  < other.last_)  ? other.end() : this->end());
   return period<point_rep,duration_rep>(start, newend);
 }
开发者ID:,项目名称:,代码行数:8,代码来源:

示例3:

 inline
 period<point_rep,duration_rep>
 period<point_rep,duration_rep>::intersection(const period<point_rep,duration_rep>& other) const 
 {
   if (begin_ > other.begin_) {
     if (last_ <= other.last_) { //case2
       return *this;  
     }
     //case 1
     return period<point_rep,duration_rep>(begin_, other.end());
   }
   else {
     if (last_ <= other.last_) { //case3
       return period<point_rep,duration_rep>(other.begin_, this->end());
     }
     //case4
     return other;
   }
   //unreachable
 }
开发者ID:,项目名称:,代码行数:20,代码来源:

示例4:

 bool operator <= (const period& pe) const {return this->total() <= pe.total();}
开发者ID:algotrust,项目名称:qmlib,代码行数:1,代码来源:datestring.hpp

示例5: value

 /// Allow periods to be compared for equality
 bool operator==(const period &p) const {
     return this->period<void>::operator==(p) && value() == p.value();
 }
开发者ID:KayEss,项目名称:fost-base,代码行数:4,代码来源:period.hpp

示例6: start

 /// Allow periods to be compared for equality
 bool operator==(const period<void> &p) const {
     return start() == p.start() && end() == p.end();
 }
开发者ID:KayEss,项目名称:fost-base,代码行数:4,代码来源:period.hpp


注:本文中的period类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。