2017-09-20 02:35:05 +00:00
<!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" / >
2018-02-10 23:37:42 +00:00
< meta name = "generator" content = "Doxygen 1.8.13" / >
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
2017-09-20 02:35:05 +00:00
< title > Shaka Packager SDK: shaka::IoCache 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" / >
2018-02-10 23:37:42 +00:00
< script type = "text/javascript" src = "../../search/searchdata.js" > < / script >
2017-09-20 02:35:05 +00:00
< 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;" >
2018-02-10 23:37:42 +00:00
< td id = "projectalign" style = "padding-left: 0.5em;" >
2017-09-20 02:35:05 +00:00
< div id = "projectname" > Shaka Packager SDK
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
2018-02-10 23:37:42 +00:00
<!-- Generated by Doxygen 1.8.13 -->
2017-09-20 02:35:05 +00:00
< script type = "text/javascript" >
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
< / script >
2018-02-10 23:37:42 +00:00
< 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 >
2017-09-20 02:35:05 +00:00
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
2018-02-10 23:37:42 +00:00
< / div >
2017-09-20 02:35:05 +00:00
<!-- 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 = "../../d8/daf/namespaceshaka.html" > shaka< / a > < / li > < li class = "navelem" > < a class = "el" href = "../../df/d4e/classshaka_1_1IoCache.html" > IoCache< / a > < / li > < / ul >
< / div >
< / div > <!-- top -->
< div class = "header" >
< div class = "summary" >
< a href = "#pub-methods" > Public Member Functions< / a > |
< a href = "../../d2/d2a/classshaka_1_1IoCache-members.html" > List of all members< / a > < / div >
< div class = "headertitle" >
< div class = "title" > shaka::IoCache Class Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< p > Declaration of class which implements a thread-safe circular buffer.
< a href = "../../df/d4e/classshaka_1_1IoCache.html#details" > More...< / a > < / p >
< p > < code > #include < < a class = "el" href = "../../d3/d19/io__cache_8h_source.html" > io_cache.h< / a > > < / code > < / p >
< table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "pub-methods" > < / a >
Public Member Functions< / h2 > < / td > < / tr >
2018-02-10 23:37:42 +00:00
< tr class = "memitem:acd0983786dc742e5bd0c0bae9d49d052" > < td class = "memItemLeft" align = "right" valign = "top" > < a id = "acd0983786dc742e5bd0c0bae9d49d052" > < / a >
2017-09-20 02:35:05 +00:00
  < / td > < td class = "memItemRight" valign = "bottom" > < b > IoCache< / b > (uint64_t cache_size)< / td > < / tr >
< tr class = "separator:acd0983786dc742e5bd0c0bae9d49d052" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a7cc144c2f848725db08b3ca175475fc2" > < td class = "memItemLeft" align = "right" valign = "top" > uint64_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../df/d4e/classshaka_1_1IoCache.html#a7cc144c2f848725db08b3ca175475fc2" > Read< / a > (void *buffer, uint64_t size)< / td > < / tr >
< tr class = "separator:a7cc144c2f848725db08b3ca175475fc2" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a483277a6c68dd58cebb8dafb5c1dcd21" > < td class = "memItemLeft" align = "right" valign = "top" > uint64_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../df/d4e/classshaka_1_1IoCache.html#a483277a6c68dd58cebb8dafb5c1dcd21" > Write< / a > (const void *buffer, uint64_t size)< / td > < / tr >
< tr class = "separator:a483277a6c68dd58cebb8dafb5c1dcd21" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2018-02-10 23:37:42 +00:00
< tr class = "memitem:a10c8e56478fe7bc4c30ea0087eb22804" > < td class = "memItemLeft" align = "right" valign = "top" > < a id = "a10c8e56478fe7bc4c30ea0087eb22804" > < / a >
2017-09-20 02:35:05 +00:00
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../df/d4e/classshaka_1_1IoCache.html#a10c8e56478fe7bc4c30ea0087eb22804" > Clear< / a > ()< / td > < / tr >
2018-02-10 23:37:42 +00:00
< tr class = "memdesc:a10c8e56478fe7bc4c30ea0087eb22804" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Empties the cache. < br / > < / td > < / tr >
2017-09-20 02:35:05 +00:00
< tr class = "separator:a10c8e56478fe7bc4c30ea0087eb22804" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a1c54ca1d747cf0b0b9ab681babff73e6" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../df/d4e/classshaka_1_1IoCache.html#a1c54ca1d747cf0b0b9ab681babff73e6" > Close< / a > ()< / td > < / tr >
< tr class = "separator:a1c54ca1d747cf0b0b9ab681babff73e6" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a69c0074123339c9c60dec6a27a5c085c" > < td class = "memItemLeft" align = "right" valign = "top" > bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../df/d4e/classshaka_1_1IoCache.html#a69c0074123339c9c60dec6a27a5c085c" > closed< / a > ()< / td > < / tr >
< tr class = "separator:a69c0074123339c9c60dec6a27a5c085c" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2018-02-10 23:37:42 +00:00
< tr class = "memitem:ac2c7cbec6d771de00fe0cfe0b7d0e454" > < td class = "memItemLeft" align = "right" valign = "top" > < a id = "ac2c7cbec6d771de00fe0cfe0b7d0e454" > < / a >
2017-09-20 02:35:05 +00:00
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../df/d4e/classshaka_1_1IoCache.html#ac2c7cbec6d771de00fe0cfe0b7d0e454" > Reopen< / a > ()< / td > < / tr >
2018-02-10 23:37:42 +00:00
< tr class = "memdesc:ac2c7cbec6d771de00fe0cfe0b7d0e454" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Reopens the cache. Any data still in the cache will be lost. < br / > < / td > < / tr >
2017-09-20 02:35:05 +00:00
< tr class = "separator:ac2c7cbec6d771de00fe0cfe0b7d0e454" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a8033da711e62112877be7a6ac2186622" > < td class = "memItemLeft" align = "right" valign = "top" > uint64_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../df/d4e/classshaka_1_1IoCache.html#a8033da711e62112877be7a6ac2186622" > BytesCached< / a > ()< / td > < / tr >
< tr class = "separator:a8033da711e62112877be7a6ac2186622" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a744559cbb0a3878027ca6fc2a12555c1" > < td class = "memItemLeft" align = "right" valign = "top" > uint64_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../df/d4e/classshaka_1_1IoCache.html#a744559cbb0a3878027ca6fc2a12555c1" > BytesFree< / a > ()< / td > < / tr >
< tr class = "separator:a744559cbb0a3878027ca6fc2a12555c1" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2018-02-10 23:37:42 +00:00
< tr class = "memitem:abafe56067c5961d56611271b6fc5a760" > < td class = "memItemLeft" align = "right" valign = "top" > < a id = "abafe56067c5961d56611271b6fc5a760" > < / a >
2017-09-20 02:35:05 +00:00
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../df/d4e/classshaka_1_1IoCache.html#abafe56067c5961d56611271b6fc5a760" > WaitUntilEmptyOrClosed< / a > ()< / td > < / tr >
2018-02-10 23:37:42 +00:00
< tr class = "memdesc:abafe56067c5961d56611271b6fc5a760" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Waits until the cache is empty or has been closed. < br / > < / td > < / tr >
2017-09-20 02:35:05 +00:00
< tr class = "separator:abafe56067c5961d56611271b6fc5a760" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
< div class = "textblock" > < p > Declaration of class which implements a thread-safe circular buffer. < / p >
2018-02-10 23:37:42 +00:00
< p class = "definition" > Definition at line < a class = "el" href = "../../d3/d19/io__cache_8h_source.html#l00019" > 19< / a > of file < a class = "el" href = "../../d3/d19/io__cache_8h_source.html" > io_cache.h< / a > .< / p >
2017-09-20 02:35:05 +00:00
< / div > < h2 class = "groupheader" > Member Function Documentation< / h2 >
2018-02-10 23:37:42 +00:00
< a id = "a8033da711e62112877be7a6ac2186622" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a8033da711e62112877be7a6ac2186622" > ◆ < / a > < / span > BytesCached()< / h2 >
2017-09-20 02:35:05 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > uint64_t shaka::IoCache::BytesCached < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2018-02-10 23:37:42 +00:00
< p > Returns the number of bytes in the cache. < / p > < dl class = "section return" > < dt > Returns< / dt > < dd > the number of bytes in the cache. < / dd > < / dl >
2017-09-20 02:35:05 +00:00
2018-02-10 23:37:42 +00:00
< p class = "definition" > Definition at line < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html#l00125" > 125< / a > of file < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html" > io_cache.cc< / a > .< / p >
2017-09-20 02:35:05 +00:00
< / div >
< / div >
2018-02-10 23:37:42 +00:00
< a id = "a744559cbb0a3878027ca6fc2a12555c1" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a744559cbb0a3878027ca6fc2a12555c1" > ◆ < / a > < / span > BytesFree()< / h2 >
2017-09-20 02:35:05 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > uint64_t shaka::IoCache::BytesFree < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2018-02-10 23:37:42 +00:00
< p > Returns the number of free bytes in the cache. < / p > < dl class = "section return" > < dt > Returns< / dt > < dd > the number of free bytes in the cache. < / dd > < / dl >
2017-09-20 02:35:05 +00:00
2018-02-10 23:37:42 +00:00
< p class = "definition" > Definition at line < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html#l00130" > 130< / a > of file < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html" > io_cache.cc< / a > .< / p >
2017-09-20 02:35:05 +00:00
< / div >
< / div >
2018-02-10 23:37:42 +00:00
< a id = "a1c54ca1d747cf0b0b9ab681babff73e6" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a1c54ca1d747cf0b0b9ab681babff73e6" > ◆ < / a > < / span > Close()< / h2 >
2017-09-20 02:35:05 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void shaka::IoCache::Close < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Close the cache. This will call any blocking calls to unblock, and the cache won't be usable until Reopened. < / p >
2018-02-10 23:37:42 +00:00
< p class = "definition" > Definition at line < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html#l00109" > 109< / a > of file < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html" > io_cache.cc< / a > .< / p >
2017-09-20 02:35:05 +00:00
< / div >
< / div >
2018-02-10 23:37:42 +00:00
< a id = "a69c0074123339c9c60dec6a27a5c085c" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a69c0074123339c9c60dec6a27a5c085c" > ◆ < / a > < / span > closed()< / h2 >
2017-09-20 02:35:05 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > bool shaka::IoCache::closed < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > inline< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< dl class = "section return" > < dt > Returns< / dt > < dd > true if the cache is closed, false otherwise. < / dd > < / dl >
2018-02-10 23:37:42 +00:00
< p class = "definition" > Definition at line < a class = "el" href = "../../d3/d19/io__cache_8h_source.html#l00049" > 49< / a > of file < a class = "el" href = "../../d3/d19/io__cache_8h_source.html" > io_cache.h< / a > .< / p >
2017-09-20 02:35:05 +00:00
< / div >
< / div >
2018-02-10 23:37:42 +00:00
< a id = "a7cc144c2f848725db08b3ca175475fc2" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a7cc144c2f848725db08b3ca175475fc2" > ◆ < / a > < / span > Read()< / h2 >
2017-09-20 02:35:05 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > uint64_t shaka::IoCache::Read < / td >
< td > (< / td >
< td class = "paramtype" > void *  < / td >
< td class = "paramname" > < em > buffer< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint64_t  < / td >
< td class = "paramname" > < em > size< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2018-02-10 23:37:42 +00:00
< p > Read data from the cache. This function may block until there is data in the cache. < / p > < dl class = "params" > < dt > Parameters< / dt > < dd >
2017-09-20 02:35:05 +00:00
< table class = "params" >
< tr > < td class = "paramname" > buffer< / td > < td > is a buffer into which to read the data from the cache. < / td > < / tr >
< tr > < td class = "paramname" > size< / td > < td > is the size of < em > buffer< / em > . < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > the number of bytes read into < em > buffer< / em > , or 0 if the call unblocked because the cache has been closed and is empty. < / dd > < / dl >
2018-02-10 23:37:42 +00:00
< p class = "definition" > Definition at line < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html#l00038" > 38< / a > of file < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html" > io_cache.cc< / a > .< / p >
2017-09-20 02:35:05 +00:00
< / div >
< / div >
2018-02-10 23:37:42 +00:00
< a id = "a483277a6c68dd58cebb8dafb5c1dcd21" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a483277a6c68dd58cebb8dafb5c1dcd21" > ◆ < / a > < / span > Write()< / h2 >
2017-09-20 02:35:05 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > uint64_t shaka::IoCache::Write < / td >
< td > (< / td >
< td class = "paramtype" > const void *  < / td >
< td class = "paramname" > < em > buffer< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint64_t  < / td >
< td class = "paramname" > < em > size< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2018-02-10 23:37:42 +00:00
< p > Write data to the cache. This function may block until there is enough room in the cache. < / p > < dl class = "params" > < dt > Parameters< / dt > < dd >
2017-09-20 02:35:05 +00:00
< table class = "params" >
< tr > < td class = "paramname" > buffer< / td > < td > is a buffer containing the data to be written to the cache. < / td > < / tr >
< tr > < td class = "paramname" > size< / td > < td > is the size of the data to be written to the cache. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > the amount of data written to the buffer (which will equal < em > data< / em > ), or 0 if the call unblocked because the cache has been closed. < / dd > < / dl >
2018-02-10 23:37:42 +00:00
< p class = "definition" > Definition at line < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html#l00066" > 66< / a > of file < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html" > io_cache.cc< / a > .< / p >
2017-09-20 02:35:05 +00:00
< / div >
< / div >
< hr / > The documentation for this class was generated from the following files:< ul >
< li > packager/file/< a class = "el" href = "../../d3/d19/io__cache_8h_source.html" > io_cache.h< / a > < / li >
< li > packager/file/< a class = "el" href = "../../d4/d37/io__cache_8cc_source.html" > io_cache.cc< / a > < / li >
< / ul >
< / div > <!-- contents -->
<!-- start footer part -->
< hr class = "footer" / > < address class = "footer" > < small >
2018-06-07 23:05:00 +00:00
Generated on Thu Jun 7 2018 16:03:50 for Shaka Packager SDK by   < a href = "http://www.doxygen.org/index.html" >
2017-09-20 02:35:05 +00:00
< img class = "footer" src = "../../doxygen.png" alt = "doxygen" / >
2018-02-10 23:37:42 +00:00
< / a > 1.8.13
2017-09-20 02:35:05 +00:00
< / small > < / address >
< / body >
< / html >