⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classdbtimeseriesblock.html

📁 俄罗斯牛人KK的作品,著名的ORDBMS,这里上传最新的3.39版本源代码.希望了解对象关系数据库的同好,请不要错过.
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title> TemplatedbTimeSeriesBlock&lt; T &gt; class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </center><hr><h1>dbTimeSeriesBlock&lt; T &gt; Class Template Reference</h1><code>#include &lt;<a class="el" href="timeseries_8h-source.html">timeseries.h</a>&gt;</code><p><a href="classdbTimeSeriesBlock-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2><h3>template&lt;class T&gt;<br> class dbTimeSeriesBlock&lt; T &gt;</h3>Time series block contaning array of elements. Grouping several elements in one block (record) reduce space overhead and increase processing speed.<br> <b>Attention!</b> This class is not serialized, so it is can be accessed only by one thread<p> <em>You are defining your own time series class, for example:</em> <pre> class Stock {   public:     char const* name;     TYPE_DESCRIPTOR((KEY(name, INDEXED))); };   class Quote {   public:     int4        tickerDate;     real4       bid;     int4        bidSize;     real4       ask;     int4        askSize;      time_t time() const { return tickerDate; } // this method should be defined       TYPE_DESCRIPTOR((FIELD(tickerDate), FIELD(bid), FIELD(bidSize), FIELD(ask), FIELD(askSize))); }; typedef dbTimeSeriesBlock&lt;Daily&gt;  DailyBlock; REGISTER(DailyBlock); </pre>  <em>Now you can work with time series objects in the followin way:</em> <pre> <a class="el" href="classdbDatabase.html">dbDatabase</a> db; if (db.open("mydatabase.dbs")) {     <a class="el" href="classdbTimeSeriesProcessor.html">dbTimeSeriesProcessor</a>&lt;Quote&gt; proc(db, MIN_ELEMENTS_IN_BLOCK,MAX_ELEMENTS_IN_BLOCK);     Quote quote;     // initialize quote     Stock stock;     stock.name = "AAD";     oid_t stockId = insert(oid).getOid();     proc.add(stockId, quote); // add new element in time series      Quote quoteBuf[MAX_QUOTES];     // select quotes for the specified interval     int n = proc.getInterval(stockId, fromDate, tillDate, quoteBuf, MAX_QUOTES);     for (int i = 0; i &lt; n; i++) {         printf("bid=d ask=d<br>", quoteBuf[i].bid, quoteBuf[i].ask);     } }  </pre> <p><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="timeseries_8h-source.html">timeseries.h</a></ul><hr><address style="align: right;"><small>Generated on Mon Oct 23 13:23:59 2006 for FastDB by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -