亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? smil_time.h

?? 彩信瀏覽器
?? H
字號:
/* * This file is part of Ambulant Player, www.ambulantplayer.org. * * Copyright (C) 2003-2007 Stichting CWI,  * Kruislaan 413, 1098 SJ Amsterdam, The Netherlands. * * Ambulant Player is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * Ambulant Player is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with Ambulant Player; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA *//*  * @$Id: smil_time.h,v 1.12 2007/02/12 14:14:45 jackjansen Exp $  */#ifndef AMBULANT_SMIL2_SMIL_TIME_H#define AMBULANT_SMIL2_SMIL_TIME_H#include "ambulant/config/config.h"#   if __GNUC__ == 2 && __GNUC_MINOR__ <= 97#include "ambulant/compat/limits"#else#include <limits>#endif#include <cmath>// std::set<time_type> definition#include <set>#include <list>#ifdef max#undef max#endif#ifdef min#undef min#endif// This module defines a data type modeling a time value // as defined by "The SMIL 2.0 Timing and Synchronization Module".// The defined data type implements all the arithmetic // operations described in that module.// a) Min and max are automatically available due the selected // representation of "indefinite" and "unresolved".// b) Operations +, -, * are defined as required // e.g. "indefinite" and "unresolved" behave as math// infinity except that 0*indefinite is defined to be 0// and 0*unresolved to be unresolved.// Actually this module defines a template of such types.// This is to allow for the underlying representations of smil_time // to be an integral or a floating numeric.// Exactness requires an integral numeric such as long.// The smil_time class defines operations for smil_time instances.// But, since it allows implicit convertions of the numeric T to smil_time// the operations are actually available when the rhs of the// operation is of type T.// The class, to avoid unexpected site effects, does not allow // the reverse:// e.g. implicit convertions of smil_time<T> to type T.// This conversion requires the explicit application// of the operator().namespace ambulant {namespace smil2 {template<class T>class smil_time {		// The underlying numeric representation of smil_time	T m_val;	  public:  		// Create smil_time from type T	// Allow implicit convertions of T to smil_time	smil_time(T t = 0) : m_val(t) {}		smil_time(const smil_time& o) : m_val(o()) {}		// define operator += for times	// unresolved and indefinite behave as math infinity	smil_time& operator+=(const smil_time& rhs);		// define operator -=	// unresolved and indefinite behave as math infinity	smil_time& operator-=(const smil_time& rhs);		// define operator *=	// unresolved and indefinite behave as math infinity	// except that 0*indefinite is defined to be 0	// and 0*unresolved to be unresolved.		smil_time& operator*=(const smil_time& rhs);		// scaling	smil_time& operator*=(int n) {m_val*=n; return *this;}	smil_time& operator/=(int n) {m_val/=n; return *this;}		// negation	smil_time& operator-() {m_val = -m_val; return *this;}		// Time type indicators	bool is_unresolved() const { return m_val == unresolved();}	bool is_indefinite() const { return m_val == indefinite();}	bool is_definite() const { return !is_indefinite() && !is_unresolved();}	bool is_resolved() const { return m_val != unresolved();}		// unspefied is an alias for unresolved	bool is_specified() const { return m_val != unspecified();}	bool is_unspecified() const { return m_val == unspecified();}		// define comparisons	bool operator<(const smil_time& rhs) const {return  m_val < rhs.m_val;}	bool operator<=(const smil_time& rhs) const {return  m_val <= rhs.m_val;}	bool operator==(const smil_time& rhs) const {return  m_val == rhs.m_val;}	bool operator>(const smil_time& rhs) const {return  m_val > rhs.m_val;}	bool operator>=(const smil_time& rhs) const {return  m_val >= rhs.m_val;}	bool operator!=(const smil_time& rhs) const {return  m_val != rhs.m_val;}		// define operations +, -, *	smil_time operator+(const smil_time& rhs) const { smil_time t(this->m_val); t+= rhs; return t;}	smil_time operator-(const smil_time& rhs) const { smil_time t(this->m_val); t-= rhs; return t;}	smil_time operator*(const smil_time& rhs) const { smil_time t(this->m_val); t*= rhs; return t;}	smil_time operator/(const smil_time& rhs) const { smil_time t(this->m_val); t/= rhs; return t;}		smil_time i_rem(const smil_time& m) const { 		if(!m.is_definite()) return m_val;		else if(m == 0) return smil_time(0);		return m_val - m()*(m_val/m());	}		smil_time f_rem(const smil_time& m) const {	  //assert(false);// not impl		return 0; 	}		smil_time rem(const smil_time& m) const { 		if(std::numeric_limits<T>::round_error() == 0) 			return i_rem(m);		return f_rem(m);	}		T i_mod(const smil_time& m) const { 		if(!m.is_definite()) return 0;		else if(m == 0) return indefinite();		return m_val/m();	}		T f_mod(const smil_time& m) const { 	        //assert(false); // not impl		return 0; 	}		T mod(const smil_time& m) const { 		if(std::numeric_limits<T>::round_error() == 0) 			return i_mod(m);		return f_mod(m);	}	smil_time abs() const {return m_val>=0?m_val:-m_val;} 		// Explicit convertion of smil_time<T> to T.	// The returned value has default meaning 	// when this->is_definite().	T operator()() const { return m_val;}		// indefinite and unresolved instances	static smil_time indefinite;	static smil_time unresolved;		// the minimum value	static smil_time minus_infinity;		// alias for unresolved	static smil_time unspecified;};template<class T>struct smil_interval {	typedef smil_time<T> time_type;		smil_interval():	begin(), end() {}		smil_interval(const time_type& t1, const time_type& t2)	:	begin(t1), end(t2) {}		smil_interval(const smil_interval& rhs)	:	begin(rhs.begin), end(rhs.end) {}		bool is_valid() const { 		return begin.is_definite() && begin <= end;	}		bool is_valid_child(const smil_interval& parent) const { 		return begin < parent.end && end >= parent.begin;	}		bool is_zero_dur() const { 		return begin.is_definite() && begin == end;	}		bool is_definite() const { 		return is_valid() && end.is_definite();	}		void translate(const time_type& t) {		begin += t; end += t;	}		void translate_to_begin() {		end -= begin; begin = 0;	}		bool contains(const time_type& t) const {		return  t==begin || (t> begin && t<end); 	}	bool before(const time_type& t) const {		return  end < t; 	}	bool after(const time_type& t) const {		return  begin > t;	}	bool contains(const smil_interval& other) const {		return  contains(other.begin) && (contains(other.end) || end == other.end); 	}		bool overlaps(const time_type& b, const time_type& e) const {		return b<=end && e>=begin;	}		bool operator==(const smil_interval& rhs) const {			return begin == rhs.begin && end == rhs.end;	}		bool operator!=(const smil_interval& rhs) const {			return begin != rhs.begin || end != rhs.end;	}	// Returns true when this smil_interval starts before 	// or when the rhs begins, and ends before the rhs ends.	// The rest of the comparisons are based on this.	bool operator<(const smil_interval& rhs) const {			return (begin <= rhs.begin && end < rhs.end);	}		bool operator>(const smil_interval& rhs) const {			return rhs < *this;	}		bool operator<=(const smil_interval& rhs) const {			return !(rhs < *this);	}		bool operator>=(const smil_interval& rhs) const {			return !(*this < rhs);	}			// the begin of this smil_interval	time_type begin;		// the end of this smil_interval	time_type end;		// An instance with begin and end unresolved	// May be used to reperesent the null smil_interval	static smil_interval unresolved;		// Super interval instance with begin equals 	// to zero and end unresolved	// May be used for hyperlinking	// (a hyperlink maybe seen as a negative begin spec 	// for the root element with respect to this interval). 	static smil_interval superinterval;};// times qualificationclass time_node;// A representation of a single time instance within the model.// The time instance is initialized from the simple time of a node// and may be converted to any other allowed by the model.// The model allows always up-conversions.class q_smil_time : public std::pair<const time_node*, smil_time<long> > {  public:	typedef long value_type;	typedef smil_time<long> time_type;		q_smil_time(const first_type& f, const second_type& s) 	:	std::pair<first_type, second_type>(f, s) {}		q_smil_time(const first_type& f, long t) 	:	std::pair<first_type, second_type>(f, second_type(t)) {}		time_type to_ancestor(const time_node *a);	time_type to_descendent(const time_node *d);	time_type to_node(const time_node *n);	time_type to_doc();		time_type as_doc_time() const;	time_type as_node_time(const time_node *n) const;	time_type as_time_down_to(const time_node *n) const;		value_type as_doc_time_value() const { return as_doc_time()();}	value_type as_node_time_value(const time_node *n) const { return as_node_time(n)();};	value_type as_time_value_down_to(const time_node *n) const { return as_time_down_to(n)();}		q_smil_time as_qtime_down_to(const time_node *n) const;		q_smil_time& operator+(time_type rhs) { 		this->second += rhs;		return *this;	}		q_smil_time& operator+(value_type rhs) { 		this->second += rhs;		return *this;	}	q_smil_time&  operator+=(value_type rhs) {this->second += rhs; return *this;}	q_smil_time&  operator-=(value_type rhs) {this->second -= rhs; return *this;}	  private:	bool up();	void down(const time_node *child);};template<class T>class q_smil_interval : public std::pair<const time_node*, smil_interval<T> > {};// Time traitsstruct time_traits {	// The selected underlying type for time	typedef long value_type;	typedef unsigned long u_value_type;		// The smil time class type for the selected value_type	// Specifies an instance in the model 	// with respect to an implicit clock	typedef smil_time<value_type> time_type;		// An unambigous time instance within the model	// Specifies explicitly the clock used.	typedef q_smil_time qtime_type;		// The smil interval class for the selected value_type	// The reference clock is implicit.	typedef smil_interval<value_type> interval_type;		// An unambigous interval within the model	// Specifies explicitly the clock used.	typedef std::pair<const time_node*, interval_type> qinterval_type;		// a set of smil time instances	typedef std::set<time_type> time_set;	typedef std::multiset<time_type> time_mset;		// a list of smil time instances	typedef std::list<time_type> time_list;		// time units enum	enum time_unit {tu_sec, tu_ms};		// the selected time units	time_unit unit() const { return tu_ms;}		// converts secs to the selected time unit	static time_type secs_to_time_type(double v) {		return time_type(value_type(::floor(v*1000 + 0.5)));	}	// converts the selected time unit to secs	static double time_type_to_secs(value_type v) {		return (v/1000) + 0.001*(v % 1000);	}	static double time_type_to_secs(time_type v) {		return time_type_to_secs(v());	}};///////////////////////////////////// Inline implementation// Defines operator += for times.// Unresolved and indefinite behave as math infinity.template<class T> inlinesmil_time<T>& smil_time<T>::operator+=(const smil_time<T>& rhs) {	if(this->is_unresolved()) {		return (*this);	} else if(rhs.is_unresolved()) {		m_val = unresolved();	} else if(this->is_indefinite()) {		return (*this);	} else if(rhs.is_indefinite()) {		m_val = indefinite();	} else {		m_val += rhs();	}	return *this;}// Defines operator -= for times.// Unresolved and indefinite behave as math infinity.template<class T> inlinesmil_time<T>& smil_time<T>::operator-=(const smil_time<T>& rhs) {	if(this->is_unresolved()) {		return (*this);	} else if(rhs.is_unresolved()) {		m_val = unresolved();	} else if(this->is_indefinite()) {		return (*this);	} else if(rhs.is_indefinite()) {		m_val = indefinite();	} else {		m_val -= rhs();	}	return *this;}// Defines operator *= for times.// Unresolved and indefinite behave as math infinity// except that 0*indefinite is defined to be 0// and 0*unresolved to be unresolved.	template<class T> inlinesmil_time<T>& smil_time<T>::operator*=(const smil_time<T>& rhs) {	if(this->is_unresolved()) {		return (*this);	} else if(rhs.is_unresolved()) {		m_val = unresolved();	} else if(this->is_indefinite()) {		if(rhs() != 0)			return (*this);		else {			m_val = 0;		}	} else if(rhs.is_indefinite()) {		if(m_val != 0) {			m_val = indefinite();		} else {			return (*this);		}	} else {		m_val *= rhs();	}	return *this;}// indefinite instance representationtemplate<class T>smil_time<T> smil_time<T>::indefinite = (std::numeric_limits<T>::infinity() != 0)?	smil_time<T>(std::numeric_limits<T>::max()) : 	smil_time<T>(std::numeric_limits<T>::max()-1);// unresolved instance representationtemplate<class T>smil_time<T> smil_time<T>::unresolved = (std::numeric_limits<T>::infinity() != 0)?	smil_time<T>(std::numeric_limits<T>::infinity()) :	smil_time<T>(std::numeric_limits<T>::max());	// unspecified is an alias for unresolvedtemplate<class T>smil_time<T> smil_time<T>::unspecified = smil_time<T>::unresolved;// minus_infinity instance representationtemplate<class T>smil_time<T> smil_time<T>::minus_infinity = 	smil_time<T>(std::numeric_limits<T>::min());// unresolved smil interval representation// May be used to represent nulltemplate<class T>smil_interval<T> smil_interval<T>::unresolved = 	smil_interval<T>(smil_time<T>::unresolved, smil_time<T>::unresolved);	// superinterval representationtemplate<class T>smil_interval<T> smil_interval<T>::superinterval = 	smil_interval<T>(smil_time<T>(0), smil_time<T>::unresolved);} // namespace smil2 } // namespace ambulant#include <string>#include <stdio.h>inline std::string repr(const ambulant::smil2::smil_time<long>& t) {	if(t ==  ambulant::smil2::smil_time<long>::minus_infinity) 		return "minus_infinity";	if(t.is_definite()) {		char buf[16];		sprintf(buf, "%ld", t());		return buf;	}	return t.is_unresolved()?"unresolved":"indefinite";}inline std::string repr(const ambulant::smil2::smil_interval<long>& interval) {	char buf[64];	sprintf(buf, "[%s, %s]", repr(interval.begin).c_str(), repr(interval.end).c_str());	return buf;}#endif // AMBULANT_SMIL2_SMIL_TIME_H

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区在线影院| 在线观看一区二区视频| www.一区二区| 日韩欧美综合一区| 亚洲免费av高清| 国产不卡视频在线播放| 日韩欧美国产成人一区二区| 夜夜嗨av一区二区三区中文字幕 | 久久电影网站中文字幕| 99国产精品一区| 国产日韩欧美电影| 久久国产精品露脸对白| 欧美高清你懂得| 一区二区三区四区高清精品免费观看 | 日本大香伊一区二区三区| 国产视频一区在线播放| 精品一区二区在线视频| 欧美日韩一区高清| 亚洲一区二区三区免费视频| 99久久国产免费看| 国产精品伦一区| 成人晚上爱看视频| 国产视频911| 国产一区二区在线观看视频| 精品日本一线二线三线不卡| 日韩电影免费在线| 欧美一区二区不卡视频| 亚洲一区二区三区四区在线免费观看 | 欧美视频日韩视频在线观看| 亚洲日本欧美天堂| 色偷偷一区二区三区| 1区2区3区国产精品| 色综合天天狠狠| 亚洲男同性恋视频| 欧美亚州韩日在线看免费版国语版| 亚洲视频网在线直播| 色婷婷国产精品| 亚洲国产视频一区二区| 欧美日本在线一区| 欧美aaa在线| 精品国产不卡一区二区三区| 国产最新精品精品你懂的| 国产亚洲欧美色| av日韩在线网站| 亚洲午夜羞羞片| 欧美成人伊人久久综合网| 93久久精品日日躁夜夜躁欧美| 国产精品天干天干在线综合| 91麻豆文化传媒在线观看| 亚洲福利国产精品| 日韩精品一区二区三区在线观看| 久久不见久久见免费视频1| 久久久久久久久岛国免费| 成人免费av网站| 亚洲高清免费视频| 精品久久久三级丝袜| 成人精品在线视频观看| 夜夜精品浪潮av一区二区三区| 欧美丰满一区二区免费视频| 国产综合一区二区| 亚洲日本成人在线观看| 欧美一区二区三区啪啪| 国产成人av影院| 亚洲午夜久久久久久久久久久| 日韩一级免费一区| 97精品国产露脸对白| 天堂久久久久va久久久久| 久久久久97国产精华液好用吗| 一本久久综合亚洲鲁鲁五月天 | 中文字幕第一区综合| 欧美丝袜第三区| 国产成人亚洲综合a∨婷婷图片| 亚洲精品一二三四区| 精品国产伦一区二区三区观看体验| av电影一区二区| 久草在线在线精品观看| 有码一区二区三区| 国产亚洲美州欧州综合国| 欧美日本视频在线| 北条麻妃国产九九精品视频| 久久精品理论片| 一区二区三区资源| 欧美激情综合五月色丁香小说| 欧美日韩一区二区三区在线| 丰满白嫩尤物一区二区| 蜜臀精品久久久久久蜜臀| 一区二区三区欧美日韩| 亚洲欧洲三级电影| 久久久久久久综合日本| 日韩欧美亚洲国产另类| 欧美日韩中文一区| 91免费国产视频网站| 丁香一区二区三区| 国产精品一区二区视频| 极品瑜伽女神91| 日本三级亚洲精品| 视频一区二区三区入口| 一区二区理论电影在线观看| 最新高清无码专区| 中文字幕在线观看不卡| 国产午夜三级一区二区三| ww久久中文字幕| 精品第一国产综合精品aⅴ| 欧美一级欧美一级在线播放| 精品视频免费在线| 色妞www精品视频| 97se亚洲国产综合自在线不卡| 床上的激情91.| 国产成人免费视频| 国产v日产∨综合v精品视频| 国产久卡久卡久卡久卡视频精品| 蓝色福利精品导航| 蜜桃av噜噜一区| 麻豆精品视频在线观看视频| 日本欧美一区二区| 久久99深爱久久99精品| 精品一区二区三区在线播放| 日韩激情av在线| 免费视频最近日韩| 精品亚洲欧美一区| 国产精品影视在线| 99国产精品久| 欧美精品 国产精品| 欧美一区二区三区免费观看视频| 8v天堂国产在线一区二区| 欧美一区二区精品久久911| 日韩视频中午一区| 久久久国产精品不卡| 国产精品国产三级国产有无不卡| 中文字幕一区二区三区视频| 一区二区三区四区高清精品免费观看 | 亚洲精品国产第一综合99久久| 亚洲精品网站在线观看| 亚洲成人精品一区| 另类的小说在线视频另类成人小视频在线 | 亚洲国产一区二区a毛片| 亚洲成人免费视| 免费精品视频在线| 成人av在线电影| 欧美日韩亚洲丝袜制服| 精品国产一区二区精华| 自拍av一区二区三区| 日本成人中文字幕在线视频| 国产成人av资源| 欧美日韩中字一区| 久久影院电视剧免费观看| 亚洲色图.com| 麻豆精品视频在线| 成人免费av在线| 欧美日韩国产中文| 久久精品亚洲国产奇米99| 亚洲卡通欧美制服中文| 美女mm1313爽爽久久久蜜臀| 成人福利视频网站| 欧美丰满嫩嫩电影| 中文字幕欧美日韩一区| 日韩精品一区第一页| 国产91富婆露脸刺激对白| 欧美人伦禁忌dvd放荡欲情| 国产视频亚洲色图| 天堂一区二区在线| 99精品视频中文字幕| 精品久久久久一区| 午夜影院在线观看欧美| 处破女av一区二区| 欧美一区二区精品| 一区二区高清在线| 成人黄色777网| 26uuu成人网一区二区三区| 午夜亚洲福利老司机| aaa欧美色吧激情视频| 久久综合久色欧美综合狠狠| 亚洲国产毛片aaaaa无费看| 成人av免费在线观看| 精品国产91乱码一区二区三区 | 成人激情动漫在线观看| 欧美成人福利视频| 天天影视涩香欲综合网| 99re6这里只有精品视频在线观看| 欧美mv日韩mv国产网站| 亚洲成人黄色小说| 欧美性xxxxxx少妇| 一区二区三区在线视频免费观看| 国产成人免费视频网站| 久久无码av三级| 激情国产一区二区 | 亚洲国产精品av| 韩国av一区二区三区四区| 日韩网站在线看片你懂的| 亚洲福利视频导航| 欧美三级电影一区| 性欧美大战久久久久久久久| 在线观看一区不卡| 亚洲午夜精品一区二区三区他趣| 色综合激情五月| 一区二区三区在线观看网站| 欧洲精品一区二区三区在线观看| 亚洲精品日韩一| 91国在线观看| 午夜久久久久久|