new CFPropertyList and fixed problem with nil
This commit is contained in:
parent
14ae6ff27f
commit
ef9275886e
107 changed files with 2 additions and 6761 deletions
|
@ -1,117 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: CFFormatError</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">CFFormatError</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/rbCFFormatError_rb.html">
|
||||
rbCFFormatError.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Exception
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Exception thrown when format errors occur
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,210 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: CFPropertyList</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">CFPropertyList</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/rbBinaryCFPropertyList_rb.html">
|
||||
rbBinaryCFPropertyList.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/rbCFPropertyList_rb.html">
|
||||
rbCFPropertyList.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/rbCFTypes_rb.html">
|
||||
rbCFTypes.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/rbXMLCFPropertyList_rb.html">
|
||||
rbXMLCFPropertyList.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
<a href="CFPropertyList.html">CFPropertyList</a> implementation parser
|
||||
class to read, manipulate and write <a
|
||||
href="CFPropertyList/XML.html">XML</a> property list files (plist(5)) as
|
||||
defined by Apple
|
||||
</p>
|
||||
<table>
|
||||
<tr><td valign="top">Author:</td><td>Christian Kruse (<a href="mailto:cjk@wwwtech.de">cjk@wwwtech.de</a>)
|
||||
|
||||
</td></tr>
|
||||
<tr><td valign="top">Copyright:</td><td>Copyright (c) 2010
|
||||
|
||||
</td></tr>
|
||||
<tr><td valign="top">License:</td><td>Distributes under the same terms as Ruby
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000001">guess</a>
|
||||
<a href="#M000002">native_types</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
<div id="class-list">
|
||||
<h3 class="section-bar">Classes and Modules</h3>
|
||||
|
||||
Class <a href="CFPropertyList/Binary.html" class="link">CFPropertyList::Binary</a><br />
|
||||
Class <a href="CFPropertyList/CFArray.html" class="link">CFPropertyList::CFArray</a><br />
|
||||
Class <a href="CFPropertyList/CFBoolean.html" class="link">CFPropertyList::CFBoolean</a><br />
|
||||
Class <a href="CFPropertyList/CFData.html" class="link">CFPropertyList::CFData</a><br />
|
||||
Class <a href="CFPropertyList/CFDate.html" class="link">CFPropertyList::CFDate</a><br />
|
||||
Class <a href="CFPropertyList/CFDictionary.html" class="link">CFPropertyList::CFDictionary</a><br />
|
||||
Class <a href="CFPropertyList/CFInteger.html" class="link">CFPropertyList::CFInteger</a><br />
|
||||
Class <a href="CFPropertyList/CFReal.html" class="link">CFPropertyList::CFReal</a><br />
|
||||
Class <a href="CFPropertyList/CFString.html" class="link">CFPropertyList::CFString</a><br />
|
||||
Class <a href="CFPropertyList/CFType.html" class="link">CFPropertyList::CFType</a><br />
|
||||
Class <a href="CFPropertyList/List.html" class="link">CFPropertyList::List</a><br />
|
||||
Class <a href="CFPropertyList/ParserInterface.html" class="link">CFPropertyList::ParserInterface</a><br />
|
||||
Class <a href="CFPropertyList/XML.html" class="link">CFPropertyList::XML</a><br />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000001" class="method-detail">
|
||||
<a name="M000001"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFPropertyList.src/M000001.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFPropertyList.src/M000001.html');return false;">
|
||||
<span class="method-name">guess</span><span class="method-args">(object, options = {})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Create <a href="CFPropertyList/CFType.html">CFType</a> hierarchy by
|
||||
guessing the correct <a href="CFPropertyList/CFType.html">CFType</a>, e.g.
|
||||
</p>
|
||||
<pre>
|
||||
x = {
|
||||
'a' => ['b','c','d']
|
||||
}
|
||||
cftypes = CFPropertyList.guess(x)
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000002" class="method-detail">
|
||||
<a name="M000002"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFPropertyList.src/M000002.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFPropertyList.src/M000002.html');return false;">
|
||||
<span class="method-name">native_types</span><span class="method-args">(object,keys_as_symbols=false)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Converts a <a href="CFPropertyList/CFType.html">CFType</a> hiercharchy to
|
||||
native Ruby types
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,51 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>guess (CFPropertyList)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFPropertyList.rb, line 72</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">guess</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">options</span> = {})
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">object</span>.<span class="ruby-identifier">nil?</span>
|
||||
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Integer</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFInteger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">object</span>)
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Float</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFReal</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">object</span>)
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">TrueClass</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">FalseClass</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFBoolean</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">object</span>)
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFString</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">object</span>)
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Time</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">DateTime</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFDate</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">object</span>)
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">IO</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFData</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">object</span>.<span class="ruby-identifier">read</span>, <span class="ruby-constant">CFData</span><span class="ruby-operator">::</span><span class="ruby-constant">DATA_RAW</span>)
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">ary</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
||||
<span class="ruby-identifier">object</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span>
|
||||
<span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">ary</span>.<span class="ruby-identifier">push</span> <span class="ruby-constant">CFPropertyList</span>.<span class="ruby-identifier">guess</span>(<span class="ruby-identifier">o</span>, <span class="ruby-identifier">options</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFArray</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ary</span>)
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">hsh</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
||||
<span class="ruby-identifier">object</span>.<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword kw">do</span>
|
||||
<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">k</span> = <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>)
|
||||
<span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-constant">CFPropertyList</span>.<span class="ruby-identifier">guess</span>(<span class="ruby-identifier">v</span>, <span class="ruby-identifier">options</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFDictionary</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">hsh</span>)
|
||||
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:convert_unknown_to_string</span>]
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFString</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">object</span>.<span class="ruby-identifier">to_s</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,41 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>native_types (CFPropertyList)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFPropertyList.rb, line 110</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">native_types</span>(<span class="ruby-identifier">object</span>,<span class="ruby-identifier">keys_as_symbols</span>=<span class="ruby-keyword kw">false</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">object</span>.<span class="ruby-identifier">nil?</span>
|
||||
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFDate</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFString</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFInteger</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFReal</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFBoolean</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">object</span>.<span class="ruby-identifier">value</span>
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFData</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">object</span>.<span class="ruby-identifier">decoded_value</span>
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFArray</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">ary</span> = []
|
||||
<span class="ruby-identifier">object</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span>
|
||||
<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">ary</span>.<span class="ruby-identifier">push</span> <span class="ruby-constant">CFPropertyList</span>.<span class="ruby-identifier">native_types</span>(<span class="ruby-identifier">v</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">ary</span>
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">object</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFDictionary</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">hsh</span> = {}
|
||||
<span class="ruby-identifier">object</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword kw">do</span>
|
||||
<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">k</span> = <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">keys_as_symbols</span>
|
||||
<span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-constant">CFPropertyList</span>.<span class="ruby-identifier">native_types</span>(<span class="ruby-identifier">v</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">hsh</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,710 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: CFPropertyList::Binary</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">CFPropertyList::Binary</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/rbBinaryCFPropertyList_rb.html">
|
||||
rbBinaryCFPropertyList.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000048">array_to_binary</a>
|
||||
<a href="#M000040">binary_strlen</a>
|
||||
<a href="#M000046">bool_to_binary</a>
|
||||
<a href="#M000034">bytes_int</a>
|
||||
<a href="#M000036">bytes_needed</a>
|
||||
<a href="#M000033">bytes_size_int</a>
|
||||
<a href="#M000026">charset_convert</a>
|
||||
<a href="#M000027">charset_strlen</a>
|
||||
<a href="#M000047">data_to_binary</a>
|
||||
<a href="#M000045">date_to_binary</a>
|
||||
<a href="#M000049">dict_to_binary</a>
|
||||
<a href="#M000037">int_bytes</a>
|
||||
<a href="#M000042">int_to_binary</a>
|
||||
<a href="#M000018">load</a>
|
||||
<a href="#M000044">num_to_binary</a>
|
||||
<a href="#M000035">pack_it_with_size</a>
|
||||
<a href="#M000029">read_binary_array</a>
|
||||
<a href="#M000024">read_binary_data</a>
|
||||
<a href="#M000023">read_binary_date</a>
|
||||
<a href="#M000030">read_binary_dict</a>
|
||||
<a href="#M000021">read_binary_int</a>
|
||||
<a href="#M000020">read_binary_null_type</a>
|
||||
<a href="#M000031">read_binary_object</a>
|
||||
<a href="#M000032">read_binary_object_at</a>
|
||||
<a href="#M000022">read_binary_real</a>
|
||||
<a href="#M000025">read_binary_string</a>
|
||||
<a href="#M000028">read_binary_unicode_string</a>
|
||||
<a href="#M000043">real_to_binary</a>
|
||||
<a href="#M000041">string_to_binary</a>
|
||||
<a href="#M000019">to_str</a>
|
||||
<a href="#M000038">type_bytes</a>
|
||||
<a href="#M000039">unique_and_count_values</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000040" class="method-detail">
|
||||
<a name="M000040"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000040.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000040.html');return false;">
|
||||
<span class="method-name">binary_strlen</span><span class="method-args">(val)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Counts the number of bytes the string will have when coded; utf-16be if
|
||||
non-ascii characters are present.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000034" class="method-detail">
|
||||
<a name="M000034"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000034.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000034.html');return false;">
|
||||
<span class="method-name">bytes_int</span><span class="method-args">(int)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Calculate the byte needed for a „normal” integer value
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000036" class="method-detail">
|
||||
<a name="M000036"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000036.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000036.html');return false;">
|
||||
<span class="method-name">bytes_needed</span><span class="method-args">(count)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
calculate how many bytes are needed to save <tt>count</tt>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000033" class="method-detail">
|
||||
<a name="M000033"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000033.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000033.html');return false;">
|
||||
<span class="method-name">bytes_size_int</span><span class="method-args">(int)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
calculate the bytes needed for a size integer value
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000026" class="method-detail">
|
||||
<a name="M000026"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000026.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000026.html');return false;">
|
||||
<span class="method-name">charset_convert</span><span class="method-args">(str,from,to="UTF-8")</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Convert the given string from one charset to another
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000027" class="method-detail">
|
||||
<a name="M000027"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000027.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000027.html');return false;">
|
||||
<span class="method-name">charset_strlen</span><span class="method-args">(str,charset="UTF-8")</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Count characters considering character set
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000037" class="method-detail">
|
||||
<a name="M000037"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000037.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000037.html');return false;">
|
||||
<span class="method-name">int_bytes</span><span class="method-args">(int)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
create integer bytes of <tt>int</tt>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000035" class="method-detail">
|
||||
<a name="M000035"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000035.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000035.html');return false;">
|
||||
<span class="method-name">pack_it_with_size</span><span class="method-args">(nbytes,int)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
pack an <tt>int</tt> of <tt>nbytes</tt> with size
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000038" class="method-detail">
|
||||
<a name="M000038"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000038.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000038.html');return false;">
|
||||
<span class="method-name">type_bytes</span><span class="method-args">(type,type_len)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Create a type byte for binary format as defined by apple
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000048" class="method-detail">
|
||||
<a name="M000048"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000048.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000048.html');return false;">
|
||||
<span class="method-name">array_to_binary</span><span class="method-args">(val)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Convert array to binary format and add it to the object table
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000046" class="method-detail">
|
||||
<a name="M000046"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000046.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000046.html');return false;">
|
||||
<span class="method-name">bool_to_binary</span><span class="method-args">(val)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Convert a bool value to binary and add it to the object table
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000047" class="method-detail">
|
||||
<a name="M000047"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000047.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000047.html');return false;">
|
||||
<span class="method-name">data_to_binary</span><span class="method-args">(val)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Convert data value to binary format and add it to the object table
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000045" class="method-detail">
|
||||
<a name="M000045"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000045.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000045.html');return false;">
|
||||
<span class="method-name">date_to_binary</span><span class="method-args">(val)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Convert date value (apple format) to binary and adds it to the object table
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000049" class="method-detail">
|
||||
<a name="M000049"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000049.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000049.html');return false;">
|
||||
<span class="method-name">dict_to_binary</span><span class="method-args">(val)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Convert dictionary to binary format and add it to the object table
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000042" class="method-detail">
|
||||
<a name="M000042"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000042.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000042.html');return false;">
|
||||
<span class="method-name">int_to_binary</span><span class="method-args">(value)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Codes an integer to binary format
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000018" class="method-detail">
|
||||
<a name="M000018"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000018.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000018.html');return false;">
|
||||
<span class="method-name">load</span><span class="method-args">(opts)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Read a binary plist file
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000044" class="method-detail">
|
||||
<a name="M000044"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000044.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000044.html');return false;">
|
||||
<span class="method-name">num_to_binary</span><span class="method-args">(value)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Converts a numeric value to binary and adds it to the object table
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000043" class="method-detail">
|
||||
<a name="M000043"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000043.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000043.html');return false;">
|
||||
<span class="method-name">real_to_binary</span><span class="method-args">(val)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Codes a real value to binary format
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000041" class="method-detail">
|
||||
<a name="M000041"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000041.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000041.html');return false;">
|
||||
<span class="method-name">string_to_binary</span><span class="method-args">(val)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Uniques and transforms a string value to binary format and adds it to the
|
||||
object table
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000019" class="method-detail">
|
||||
<a name="M000019"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000019.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000019.html');return false;">
|
||||
<span class="method-name">to_str</span><span class="method-args">(opts={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Convert <a href="../CFPropertyList.html">CFPropertyList</a> to binary
|
||||
format; since we have to count our objects we simply unique <a
|
||||
href="CFDictionary.html">CFDictionary</a> and <a
|
||||
href="CFArray.html">CFArray</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Protected Instance methods</h3>
|
||||
|
||||
<div id="method-M000029" class="method-detail">
|
||||
<a name="M000029"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000029.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000029.html');return false;">
|
||||
<span class="method-name">read_binary_array</span><span class="method-args">(fname,fd,length)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Read an binary array value, including contained objects
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000024" class="method-detail">
|
||||
<a name="M000024"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000024.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000024.html');return false;">
|
||||
<span class="method-name">read_binary_data</span><span class="method-args">(fname,fd,length)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Read a binary data value
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000023" class="method-detail">
|
||||
<a name="M000023"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000023.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000023.html');return false;">
|
||||
<span class="method-name">read_binary_date</span><span class="method-args">(fname,fd,length)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
read a binary date value
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000030" class="method-detail">
|
||||
<a name="M000030"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000030.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000030.html');return false;">
|
||||
<span class="method-name">read_binary_dict</span><span class="method-args">(fname,fd,length)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Read a dictionary value, including contained objects
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000021" class="method-detail">
|
||||
<a name="M000021"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000021.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000021.html');return false;">
|
||||
<span class="method-name">read_binary_int</span><span class="method-args">(fname,fd,length)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
read a binary int value
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000020" class="method-detail">
|
||||
<a name="M000020"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000020.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000020.html');return false;">
|
||||
<span class="method-name">read_binary_null_type</span><span class="method-args">(length)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
read a „null” type (i.e. null byte, marker byte, bool value)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000031" class="method-detail">
|
||||
<a name="M000031"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000031.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000031.html');return false;">
|
||||
<span class="method-name">read_binary_object</span><span class="method-args">(fname,fd)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Read an object type byte, decode it and delegate to the correct reader
|
||||
function
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000032" class="method-detail">
|
||||
<a name="M000032"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000032.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000032.html');return false;">
|
||||
<span class="method-name">read_binary_object_at</span><span class="method-args">(fname,fd,pos)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Read an object type byte at position $pos, decode it and delegate to the
|
||||
correct reader function
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000022" class="method-detail">
|
||||
<a name="M000022"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000022.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000022.html');return false;">
|
||||
<span class="method-name">read_binary_real</span><span class="method-args">(fname,fd,length)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
read a binary real value
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000025" class="method-detail">
|
||||
<a name="M000025"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000025.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000025.html');return false;">
|
||||
<span class="method-name">read_binary_string</span><span class="method-args">(fname,fd,length)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Read a binary string value
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000028" class="method-detail">
|
||||
<a name="M000028"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000028.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000028.html');return false;">
|
||||
<span class="method-name">read_binary_unicode_string</span><span class="method-args">(fname,fd,length)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Read a unicode string value, coded as UTF-16BE
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000039" class="method-detail">
|
||||
<a name="M000039"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Binary.src/M000039.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Binary.src/M000039.html');return false;">
|
||||
<span class="method-name">unique_and_count_values</span><span class="method-args">(value)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
„unique” and count values. „Unique” means, several objects (e.g.
|
||||
strings) will only be saved once and referenced later
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,64 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>load (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 13</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load</span>(<span class="ruby-identifier">opts</span>)
|
||||
<span class="ruby-ivar">@unique_table</span> = {}
|
||||
<span class="ruby-ivar">@count_objects</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-ivar">@string_size</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-ivar">@int_size</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-ivar">@misc_size</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-ivar">@object_refs</span> = <span class="ruby-value">0</span>
|
||||
|
||||
<span class="ruby-ivar">@written_object_count</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-ivar">@object_table</span> = []
|
||||
<span class="ruby-ivar">@object_ref_size</span> = <span class="ruby-value">0</span>
|
||||
|
||||
<span class="ruby-ivar">@offsets</span> = []
|
||||
|
||||
<span class="ruby-identifier">fd</span> = <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">opts</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:file</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">fd</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:file</span>],<span class="ruby-value str">"rb"</span>)
|
||||
<span class="ruby-identifier">file</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:file</span>]
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">fd</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:data</span>],<span class="ruby-value str">"rb"</span>)
|
||||
<span class="ruby-identifier">file</span> = <span class="ruby-value str">"<string>"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-comment cmt"># first, we read the trailer: 32 byte from the end</span>
|
||||
<span class="ruby-identifier">fd</span>.<span class="ruby-identifier">seek</span>(<span class="ruby-value">-32</span>,<span class="ruby-constant">IO</span><span class="ruby-operator">::</span><span class="ruby-constant">SEEK_END</span>)
|
||||
<span class="ruby-identifier">buff</span> = <span class="ruby-identifier">fd</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value">32</span>)
|
||||
|
||||
<span class="ruby-identifier">offset_size</span>, <span class="ruby-identifier">object_ref_size</span>, <span class="ruby-identifier">number_of_objects</span>, <span class="ruby-identifier">top_object</span>, <span class="ruby-identifier">table_offset</span> = <span class="ruby-identifier">buff</span>.<span class="ruby-identifier">unpack</span> <span class="ruby-value str">"x6CCx4Nx4Nx4N"</span>
|
||||
|
||||
<span class="ruby-comment cmt"># after that, get the offset table</span>
|
||||
<span class="ruby-identifier">fd</span>.<span class="ruby-identifier">seek</span>(<span class="ruby-identifier">table_offset</span>, <span class="ruby-constant">IO</span><span class="ruby-operator">::</span><span class="ruby-constant">SEEK_SET</span>)
|
||||
<span class="ruby-identifier">coded_offset_table</span> = <span class="ruby-identifier">fd</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">number_of_objects</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">offset_size</span>)
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">CFFormatError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"#{file}: Format error!"</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">coded_offset_table</span>.<span class="ruby-identifier">bytesize</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">number_of_objects</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">offset_size</span>
|
||||
|
||||
<span class="ruby-ivar">@count_objects</span> = <span class="ruby-identifier">number_of_objects</span>
|
||||
|
||||
<span class="ruby-comment cmt"># decode offset table</span>
|
||||
<span class="ruby-identifier">formats</span> = [<span class="ruby-value str">""</span>,<span class="ruby-value str">"C*"</span>,<span class="ruby-value str">"n*"</span>,<span class="ruby-value str">"(H6)*"</span>,<span class="ruby-value str">"N*"</span>]
|
||||
<span class="ruby-ivar">@offsets</span> = <span class="ruby-identifier">coded_offset_table</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-identifier">formats</span>[<span class="ruby-identifier">offset_size</span>])
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">offset_size</span> <span class="ruby-operator">==</span> <span class="ruby-value">3</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-value">0</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-ivar">@offsets</span>.<span class="ruby-identifier">count</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@offsets</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-ivar">@offsets</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">to_i</span>(<span class="ruby-value">16</span>) }
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-ivar">@object_ref_size</span> = <span class="ruby-identifier">object_ref_size</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">read_binary_object_at</span>(<span class="ruby-identifier">file</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">top_object</span>)
|
||||
|
||||
<span class="ruby-identifier">fd</span>.<span class="ruby-identifier">close</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">val</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,65 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_str (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 65</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_str</span>(<span class="ruby-identifier">opts</span>={})
|
||||
<span class="ruby-ivar">@unique_table</span> = {}
|
||||
<span class="ruby-ivar">@count_objects</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-ivar">@string_size</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-ivar">@int_size</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-ivar">@misc_size</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-ivar">@object_refs</span> = <span class="ruby-value">0</span>
|
||||
|
||||
<span class="ruby-ivar">@written_object_count</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-ivar">@object_table</span> = []
|
||||
<span class="ruby-ivar">@object_ref_size</span> = <span class="ruby-value">0</span>
|
||||
|
||||
<span class="ruby-ivar">@offsets</span> = []
|
||||
|
||||
<span class="ruby-identifier">binary_str</span> = <span class="ruby-value str">"bplist00"</span>
|
||||
<span class="ruby-identifier">unique_and_count_values</span>(<span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:root</span>])
|
||||
|
||||
<span class="ruby-ivar">@count_objects</span> <span class="ruby-operator">+=</span> <span class="ruby-ivar">@unique_table</span>.<span class="ruby-identifier">count</span>
|
||||
<span class="ruby-ivar">@object_ref_size</span> = <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">bytes_needed</span>(<span class="ruby-ivar">@count_objects</span>)
|
||||
|
||||
<span class="ruby-identifier">file_size</span> = <span class="ruby-ivar">@string_size</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@int_size</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@misc_size</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@object_refs</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@object_ref_size</span> <span class="ruby-operator">+</span> <span class="ruby-value">40</span>
|
||||
<span class="ruby-identifier">offset_size</span> = <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">bytes_needed</span>(<span class="ruby-identifier">file_size</span>)
|
||||
<span class="ruby-identifier">table_offset</span> = <span class="ruby-identifier">file_size</span> <span class="ruby-operator">-</span> <span class="ruby-value">32</span>
|
||||
|
||||
<span class="ruby-ivar">@object_table</span> = []
|
||||
<span class="ruby-ivar">@written_object_count</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-ivar">@unique_table</span> = {} <span class="ruby-comment cmt"># we needed it to calculate several values, but now we need an empty table</span>
|
||||
|
||||
<span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:root</span>].<span class="ruby-identifier">to_binary</span>(<span class="ruby-keyword kw">self</span>)
|
||||
|
||||
<span class="ruby-identifier">object_offset</span> = <span class="ruby-value">8</span>
|
||||
<span class="ruby-identifier">offsets</span> = []
|
||||
|
||||
<span class="ruby-value">0</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-ivar">@object_table</span>.<span class="ruby-identifier">count</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">binary_str</span> <span class="ruby-operator">+=</span> <span class="ruby-ivar">@object_table</span>[<span class="ruby-identifier">i</span>]
|
||||
<span class="ruby-identifier">offsets</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">object_offset</span>
|
||||
<span class="ruby-identifier">object_offset</span> <span class="ruby-operator">+=</span> <span class="ruby-ivar">@object_table</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">bytesize</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-identifier">offsets</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">offset</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">binary_str</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">pack_it_with_size</span>(<span class="ruby-identifier">offset_size</span>,<span class="ruby-identifier">offset</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-identifier">binary_str</span> <span class="ruby-operator">+=</span> [<span class="ruby-identifier">offset_size</span>, <span class="ruby-ivar">@object_ref_size</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">"x6CC"</span>)
|
||||
<span class="ruby-identifier">binary_str</span> <span class="ruby-operator">+=</span> [<span class="ruby-ivar">@count_objects</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">"x4N"</span>)
|
||||
<span class="ruby-identifier">binary_str</span> <span class="ruby-operator">+=</span> [<span class="ruby-value">0</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">"x4N"</span>)
|
||||
<span class="ruby-identifier">binary_str</span> <span class="ruby-operator">+=</span> [<span class="ruby-identifier">table_offset</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">"x4N"</span>)
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">binary_str</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>read_binary_null_type (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 117</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_binary_null_type</span>(<span class="ruby-identifier">length</span>)
|
||||
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">length</span>
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">return</span> <span class="ruby-value">0</span> <span class="ruby-comment cmt"># null byte</span>
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value">8</span> <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFBoolean</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">false</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value">9</span> <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFBoolean</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">true</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value">15</span> <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">return</span> <span class="ruby-value">15</span> <span class="ruby-comment cmt"># fill type</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">CFFormatError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"unknown null type: #{length}"</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,40 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>read_binary_int (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 130</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_binary_int</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">length</span>)
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">CFFormatError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"Integer greater than 8 bytes: #{length}"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">3</span>
|
||||
|
||||
<span class="ruby-identifier">nbytes</span> = <span class="ruby-value">1</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">length</span>
|
||||
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-identifier">buff</span> = <span class="ruby-identifier">fd</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">nbytes</span>)
|
||||
|
||||
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">length</span>
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">buff</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">"C"</span>)
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">val</span>[<span class="ruby-value">0</span>]
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">buff</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">"n"</span>)
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">val</span>[<span class="ruby-value">0</span>]
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value">2</span> <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">buff</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">"N"</span>)
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">val</span>[<span class="ruby-value">0</span>]
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value">3</span>
|
||||
<span class="ruby-identifier">hiword</span>,<span class="ruby-identifier">loword</span> = <span class="ruby-identifier">buff</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">"NN"</span>)
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">hiword</span> <span class="ruby-operator"><<</span> <span class="ruby-value">32</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">loword</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFInteger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">val</span>);
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,37 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>read_binary_real (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 158</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_binary_real</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">length</span>)
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">CFFormatError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"Real greater than 8 bytes: #{length}"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">3</span>
|
||||
|
||||
<span class="ruby-identifier">nbytes</span> = <span class="ruby-value">1</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">length</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-identifier">buff</span> = <span class="ruby-identifier">fd</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">nbytes</span>)
|
||||
|
||||
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">length</span>
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">then</span> <span class="ruby-comment cmt"># 1 byte float? must be an error</span>
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">CFFormatError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"got #{length+1} byte float, must be an error!"</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">then</span> <span class="ruby-comment cmt"># 2 byte float? must be an error</span>
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">CFFormatError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"got #{length+1} byte float, must be an error!"</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value">2</span> <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">buff</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">"f"</span>)
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">val</span>[<span class="ruby-value">0</span>]
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value">3</span> <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">buff</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">"d"</span>)
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">val</span>[<span class="ruby-value">0</span>]
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFReal</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">val</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,37 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>read_binary_date (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 183</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_binary_date</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">length</span>)
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">CFFormatError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"Date greater than 8 bytes: #{length}"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">3</span>
|
||||
|
||||
<span class="ruby-identifier">nbytes</span> = <span class="ruby-value">1</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">length</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-identifier">buff</span> = <span class="ruby-identifier">fd</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">nbytes</span>)
|
||||
|
||||
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">length</span>
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">then</span> <span class="ruby-comment cmt"># 1 byte CFDate is an error</span>
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">CFFormatError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"#{length+1} byte CFDate, error"</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">then</span> <span class="ruby-comment cmt"># 2 byte CFDate is an error</span>
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">CFFormatError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"#{length+1} byte CFDate, error"</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value">2</span> <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">buff</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">"f"</span>)
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">val</span>[<span class="ruby-value">0</span>]
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value">3</span> <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">buff</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">"d"</span>)
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">val</span>[<span class="ruby-value">0</span>]
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFDate</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">val</span>,<span class="ruby-constant">CFDate</span><span class="ruby-operator">::</span><span class="ruby-constant">TIMESTAMP_APPLE</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>read_binary_data (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 208</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_binary_data</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">length</span>)
|
||||
<span class="ruby-identifier">buff</span> = <span class="ruby-value str">""</span>;
|
||||
<span class="ruby-identifier">buff</span> = <span class="ruby-identifier">fd</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">length</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFData</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buff</span>,<span class="ruby-constant">CFData</span><span class="ruby-operator">::</span><span class="ruby-constant">DATA_RAW</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>read_binary_string (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 216</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_binary_string</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">length</span>)
|
||||
<span class="ruby-identifier">buff</span> = <span class="ruby-value str">""</span>
|
||||
<span class="ruby-identifier">buff</span> = <span class="ruby-identifier">fd</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">length</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
||||
|
||||
<span class="ruby-ivar">@unique_table</span>[<span class="ruby-identifier">buff</span>] = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@unique_table</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">buff</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFString</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buff</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>charset_convert (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 226</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">charset_convert</span>(<span class="ruby-identifier">str</span>,<span class="ruby-identifier">from</span>,<span class="ruby-identifier">to</span>=<span class="ruby-value str">"UTF-8"</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">clone</span>.<span class="ruby-identifier">force_encoding</span>(<span class="ruby-identifier">from</span>).<span class="ruby-identifier">encode</span>(<span class="ruby-identifier">to</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value str">"encode"</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">Iconv</span>.<span class="ruby-identifier">conv</span>(<span class="ruby-identifier">to</span>,<span class="ruby-identifier">from</span>,<span class="ruby-identifier">str</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>charset_strlen (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 232</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">charset_strlen</span>(<span class="ruby-identifier">str</span>,<span class="ruby-identifier">charset</span>=<span class="ruby-value str">"UTF-8"</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">length</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value str">"encode"</span>)
|
||||
|
||||
<span class="ruby-identifier">str</span> = <span class="ruby-constant">Iconv</span>.<span class="ruby-identifier">conv</span>(<span class="ruby-value str">"UTF-8"</span>,<span class="ruby-identifier">charset</span>,<span class="ruby-identifier">str</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">charset</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"UTF-8"</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">/./</span><span class="ruby-identifier">mu</span>).<span class="ruby-identifier">size</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>read_binary_unicode_string (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 240</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_binary_unicode_string</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">length</span>)
|
||||
<span class="ruby-comment cmt"># The problem is: we get the length of the string IN CHARACTERS;</span>
|
||||
<span class="ruby-comment cmt"># since a char in UTF-16 can be 16 or 32 bit long, we don't really know</span>
|
||||
<span class="ruby-comment cmt"># how long the string is in bytes</span>
|
||||
<span class="ruby-identifier">buff</span> = <span class="ruby-identifier">fd</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value">2</span><span class="ruby-operator">*</span><span class="ruby-identifier">length</span>)
|
||||
|
||||
<span class="ruby-ivar">@unique_table</span>[<span class="ruby-identifier">buff</span>] = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@unique_table</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">buff</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFString</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Binary</span>.<span class="ruby-identifier">charset_convert</span>(<span class="ruby-identifier">buff</span>,<span class="ruby-value str">"UTF-16BE"</span>,<span class="ruby-value str">"UTF-8"</span>))
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,32 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>read_binary_array (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 252</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_binary_array</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">length</span>)
|
||||
<span class="ruby-identifier">ary</span> = []
|
||||
|
||||
<span class="ruby-comment cmt"># first: read object refs</span>
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">length</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">buff</span> = <span class="ruby-identifier">fd</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">length</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@object_ref_size</span>)
|
||||
<span class="ruby-identifier">objects</span> = <span class="ruby-identifier">buff</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-ivar">@object_ref_size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-value str">"C*"</span> <span class="ruby-operator">:</span> <span class="ruby-value str">"n*"</span>)
|
||||
|
||||
<span class="ruby-comment cmt"># now: read objects</span>
|
||||
<span class="ruby-value">0</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">length</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">object</span> = <span class="ruby-identifier">read_binary_object_at</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">objects</span>[<span class="ruby-identifier">i</span>])
|
||||
<span class="ruby-identifier">ary</span>.<span class="ruby-identifier">push</span> <span class="ruby-identifier">object</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFArray</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ary</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,37 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>read_binary_dict (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 272</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_binary_dict</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">length</span>)
|
||||
<span class="ruby-identifier">dict</span> = {}
|
||||
|
||||
<span class="ruby-comment cmt"># first: read keys</span>
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">length</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">buff</span> = <span class="ruby-identifier">fd</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">length</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@object_ref_size</span>)
|
||||
<span class="ruby-identifier">keys</span> = <span class="ruby-identifier">buff</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-ivar">@object_ref_size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-value str">"C*"</span> <span class="ruby-operator">:</span> <span class="ruby-value str">"n*"</span>)
|
||||
|
||||
<span class="ruby-comment cmt"># second: read object refs</span>
|
||||
<span class="ruby-identifier">buff</span> = <span class="ruby-identifier">fd</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">length</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@object_ref_size</span>)
|
||||
<span class="ruby-identifier">objects</span> = <span class="ruby-identifier">buff</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-ivar">@object_ref_size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-value str">"C*"</span> <span class="ruby-operator">:</span> <span class="ruby-value str">"n*"</span>)
|
||||
|
||||
<span class="ruby-comment cmt"># read real keys and objects</span>
|
||||
<span class="ruby-value">0</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">length</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">key</span> = <span class="ruby-identifier">read_binary_object_at</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">keys</span>[<span class="ruby-identifier">i</span>])
|
||||
<span class="ruby-identifier">object</span> = <span class="ruby-identifier">read_binary_object_at</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">objects</span>[<span class="ruby-identifier">i</span>])
|
||||
<span class="ruby-identifier">dict</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">value</span>] = <span class="ruby-identifier">object</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CFDictionary</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">dict</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,54 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>read_binary_object (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 297</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_binary_object</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>)
|
||||
<span class="ruby-comment cmt"># first: read the marker byte</span>
|
||||
<span class="ruby-identifier">buff</span> = <span class="ruby-identifier">fd</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value">1</span>)
|
||||
|
||||
<span class="ruby-identifier">object_length</span> = <span class="ruby-identifier">buff</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">"C*"</span>)
|
||||
<span class="ruby-identifier">object_length</span> = <span class="ruby-identifier">object_length</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">&</span> <span class="ruby-value">0x</span><span class="ruby-constant">F</span>
|
||||
|
||||
<span class="ruby-identifier">buff</span> = <span class="ruby-identifier">buff</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">"H*"</span>)
|
||||
<span class="ruby-identifier">object_type</span> = <span class="ruby-identifier">buff</span>[<span class="ruby-value">0</span>][<span class="ruby-value">0</span>].<span class="ruby-identifier">chr</span>
|
||||
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">object_type</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"0"</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">object_length</span> <span class="ruby-operator">==</span> <span class="ruby-value">15</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">object_length</span> = <span class="ruby-identifier">read_binary_object</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>)
|
||||
<span class="ruby-identifier">object_length</span> = <span class="ruby-identifier">object_length</span>.<span class="ruby-identifier">value</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-identifier">retval</span> = <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">object_type</span>
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'0'</span> <span class="ruby-keyword kw">then</span> <span class="ruby-comment cmt"># null, false, true, fillbyte</span>
|
||||
<span class="ruby-identifier">retval</span> = <span class="ruby-identifier">read_binary_null_type</span>(<span class="ruby-identifier">object_length</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'1'</span> <span class="ruby-keyword kw">then</span> <span class="ruby-comment cmt"># integer</span>
|
||||
<span class="ruby-identifier">retval</span> = <span class="ruby-identifier">read_binary_int</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">object_length</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'2'</span> <span class="ruby-keyword kw">then</span> <span class="ruby-comment cmt"># real</span>
|
||||
<span class="ruby-identifier">retval</span> = <span class="ruby-identifier">read_binary_real</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">object_length</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'3'</span> <span class="ruby-keyword kw">then</span> <span class="ruby-comment cmt"># date</span>
|
||||
<span class="ruby-identifier">retval</span> = <span class="ruby-identifier">read_binary_date</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">object_length</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'4'</span> <span class="ruby-keyword kw">then</span> <span class="ruby-comment cmt"># data</span>
|
||||
<span class="ruby-identifier">retval</span> = <span class="ruby-identifier">read_binary_data</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">object_length</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'5'</span> <span class="ruby-keyword kw">then</span> <span class="ruby-comment cmt"># byte string, usually utf8 encoded</span>
|
||||
<span class="ruby-identifier">retval</span> = <span class="ruby-identifier">read_binary_string</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">object_length</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'6'</span> <span class="ruby-keyword kw">then</span> <span class="ruby-comment cmt"># unicode string (utf16be)</span>
|
||||
<span class="ruby-identifier">retval</span> = <span class="ruby-identifier">read_binary_unicode_string</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">object_length</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'a'</span> <span class="ruby-keyword kw">then</span> <span class="ruby-comment cmt"># array</span>
|
||||
<span class="ruby-identifier">retval</span> = <span class="ruby-identifier">read_binary_array</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">object_length</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'d'</span> <span class="ruby-keyword kw">then</span> <span class="ruby-comment cmt"># dictionary</span>
|
||||
<span class="ruby-identifier">retval</span> = <span class="ruby-identifier">read_binary_dict</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">object_length</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">retval</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>read_binary_object_at (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 339</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_binary_object_at</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>,<span class="ruby-identifier">pos</span>)
|
||||
<span class="ruby-identifier">position</span> = <span class="ruby-ivar">@offsets</span>[<span class="ruby-identifier">pos</span>]
|
||||
<span class="ruby-identifier">fd</span>.<span class="ruby-identifier">seek</span>(<span class="ruby-identifier">position</span>,<span class="ruby-constant">IO</span><span class="ruby-operator">::</span><span class="ruby-constant">SEEK_SET</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">read_binary_object</span>(<span class="ruby-identifier">fname</span>,<span class="ruby-identifier">fd</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>bytes_size_int (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 347</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">bytes_size_int</span>(<span class="ruby-identifier">int</span>)
|
||||
<span class="ruby-identifier">nbytes</span> = <span class="ruby-value">0</span>
|
||||
|
||||
<span class="ruby-identifier">nbytes</span> <span class="ruby-operator">+=</span> <span class="ruby-value">2</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">int</span> <span class="ruby-operator">></span> <span class="ruby-value">0x</span><span class="ruby-constant">E</span> <span class="ruby-comment cmt"># 2 bytes int</span>
|
||||
<span class="ruby-identifier">nbytes</span> <span class="ruby-operator">+=</span> <span class="ruby-value">2</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">int</span> <span class="ruby-operator">></span> <span class="ruby-value">0x</span><span class="ruby-constant">FF</span> <span class="ruby-comment cmt"># 3 bytes int</span>
|
||||
<span class="ruby-identifier">nbytes</span> <span class="ruby-operator">+=</span> <span class="ruby-value">2</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">int</span> <span class="ruby-operator">></span> <span class="ruby-value">0x</span><span class="ruby-constant">FFFF</span> <span class="ruby-comment cmt"># 5 bytes int</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">nbytes</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>bytes_int (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 358</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">bytes_int</span>(<span class="ruby-identifier">int</span>)
|
||||
<span class="ruby-identifier">nbytes</span> = <span class="ruby-value">1</span>
|
||||
|
||||
<span class="ruby-identifier">nbytes</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">int</span> <span class="ruby-operator">></span> <span class="ruby-value">0x</span><span class="ruby-constant">FF</span> <span class="ruby-comment cmt"># 2 byte int</span>
|
||||
<span class="ruby-identifier">nbytes</span> <span class="ruby-operator">+=</span> <span class="ruby-value">2</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">int</span> <span class="ruby-operator">></span> <span class="ruby-value">0x</span><span class="ruby-constant">FFFF</span> <span class="ruby-comment cmt"># 4 byte int</span>
|
||||
<span class="ruby-identifier">nbytes</span> <span class="ruby-operator">+=</span> <span class="ruby-value">4</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">int</span> <span class="ruby-operator">></span> <span class="ruby-value">0x</span><span class="ruby-constant">FFFFFFFF</span> <span class="ruby-comment cmt"># 8 byte int</span>
|
||||
<span class="ruby-identifier">nbytes</span> <span class="ruby-operator">+=</span> <span class="ruby-value">7</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">int</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span> <span class="ruby-comment cmt"># 8 byte int (since it is signed)</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">nbytes</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span> <span class="ruby-comment cmt"># one „marker” byte</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>pack_it_with_size (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 370</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">pack_it_with_size</span>(<span class="ruby-identifier">nbytes</span>,<span class="ruby-identifier">int</span>)
|
||||
<span class="ruby-identifier">format</span> = [<span class="ruby-value str">"C"</span>, <span class="ruby-value str">"n"</span>, <span class="ruby-value str">"N"</span>, <span class="ruby-value str">"N"</span>][<span class="ruby-identifier">nbytes</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>]
|
||||
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">nbytes</span> <span class="ruby-operator">==</span> <span class="ruby-value">3</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">val</span> = [<span class="ruby-identifier">int</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-identifier">format</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">slice</span>(<span class="ruby-value">-3</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">int</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-identifier">format</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>bytes_needed (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 382</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">bytes_needed</span>(<span class="ruby-identifier">count</span>)
|
||||
<span class="ruby-identifier">nbytes</span> = <span class="ruby-value">0</span>
|
||||
|
||||
<span class="ruby-keyword kw">while</span> <span class="ruby-identifier">count</span> <span class="ruby-operator">>=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">do</span>
|
||||
<span class="ruby-identifier">nbytes</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
<span class="ruby-identifier">count</span> <span class="ruby-operator">/=</span> <span class="ruby-value">256</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">nbytes</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>int_bytes (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 394</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">int_bytes</span>(<span class="ruby-identifier">int</span>)
|
||||
<span class="ruby-identifier">intbytes</span> = <span class="ruby-value str">""</span>
|
||||
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">int</span> <span class="ruby-operator">></span> <span class="ruby-value">0x</span><span class="ruby-constant">FFFF</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">intbytes</span> = <span class="ruby-value str">"\x12"</span><span class="ruby-operator">+</span>[<span class="ruby-identifier">int</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">"N"</span>) <span class="ruby-comment cmt"># 4 byte integer</span>
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">int</span> <span class="ruby-operator">></span> <span class="ruby-value">0x</span><span class="ruby-constant">FF</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">intbytes</span> = <span class="ruby-value str">"\x11"</span><span class="ruby-operator">+</span>[<span class="ruby-identifier">int</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">"n"</span>) <span class="ruby-comment cmt"># 2 byte integer</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">intbytes</span> = <span class="ruby-value str">"\x10"</span><span class="ruby-operator">+</span>[<span class="ruby-identifier">int</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">"C"</span>) <span class="ruby-comment cmt"># 8 byte integer</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">intbytes</span>;
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>type_bytes (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 409</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">type_bytes</span>(<span class="ruby-identifier">type</span>,<span class="ruby-identifier">type_len</span>)
|
||||
<span class="ruby-identifier">optional_int</span> = <span class="ruby-value str">""</span>
|
||||
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">type_len</span> <span class="ruby-operator"><</span> <span class="ruby-value">15</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">type</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">sprintf</span>(<span class="ruby-value str">"%x"</span>,<span class="ruby-identifier">type_len</span>)
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">type</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"f"</span>
|
||||
<span class="ruby-identifier">optional_int</span> = <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">int_bytes</span>(<span class="ruby-identifier">type_len</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">type</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">"H*"</span>) <span class="ruby-operator">+</span> <span class="ruby-identifier">optional_int</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,86 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>unique_and_count_values (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 424</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unique_and_count_values</span>(<span class="ruby-identifier">value</span>)
|
||||
<span class="ruby-comment cmt"># no uniquing for other types than CFString and CFData</span>
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFInteger</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFReal</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">value</span>.<span class="ruby-identifier">value</span>
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFInteger</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-ivar">@int_size</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">bytes_int</span>(<span class="ruby-identifier">val</span>)
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-ivar">@misc_size</span> <span class="ruby-operator">+=</span> <span class="ruby-value">9</span> <span class="ruby-comment cmt"># 9 bytes (8 + marker byte) for real</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-ivar">@count_objects</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
<span class="ruby-keyword kw">return</span>
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFDate</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-ivar">@misc_size</span> <span class="ruby-operator">+=</span> <span class="ruby-value">9</span>
|
||||
<span class="ruby-ivar">@count_objects</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
<span class="ruby-keyword kw">return</span>
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFBoolean</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-ivar">@count_objects</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
<span class="ruby-ivar">@misc_size</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
<span class="ruby-keyword kw">return</span>
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFArray</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">cnt</span> = <span class="ruby-value">0</span>
|
||||
|
||||
<span class="ruby-identifier">value</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">cnt</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
<span class="ruby-identifier">unique_and_count_values</span>(<span class="ruby-identifier">v</span>)
|
||||
<span class="ruby-ivar">@object_refs</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-comment cmt"># each array member is a ref</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-ivar">@count_objects</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
<span class="ruby-ivar">@int_size</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">bytes_size_int</span>(<span class="ruby-identifier">cnt</span>)
|
||||
<span class="ruby-ivar">@misc_size</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-comment cmt"># marker byte for array</span>
|
||||
<span class="ruby-keyword kw">return</span>
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFDictionary</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">cnt</span> = <span class="ruby-value">0</span>
|
||||
|
||||
<span class="ruby-identifier">value</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">cnt</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-operator">!</span><span class="ruby-ivar">@unique_table</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">k</span>))
|
||||
<span class="ruby-ivar">@unique_table</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-value">0</span>
|
||||
<span class="ruby-ivar">@string_size</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">binary_strlen</span>(<span class="ruby-identifier">k</span>) <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
|
||||
<span class="ruby-ivar">@int_size</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">bytes_size_int</span>(<span class="ruby-constant">Binary</span>.<span class="ruby-identifier">charset_strlen</span>(<span class="ruby-identifier">k</span>,<span class="ruby-value str">'UTF-8'</span>))
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-ivar">@object_refs</span> <span class="ruby-operator">+=</span> <span class="ruby-value">2</span> <span class="ruby-comment cmt"># both, key and value, are refs</span>
|
||||
<span class="ruby-ivar">@unique_table</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
<span class="ruby-identifier">unique_and_count_values</span>(<span class="ruby-identifier">v</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-ivar">@count_objects</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
<span class="ruby-ivar">@misc_size</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-comment cmt"># marker byte for dict</span>
|
||||
<span class="ruby-ivar">@int_size</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">bytes_size_int</span>(<span class="ruby-identifier">cnt</span>)
|
||||
<span class="ruby-keyword kw">return</span>
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFData</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">value</span>.<span class="ruby-identifier">decoded_value</span>
|
||||
<span class="ruby-ivar">@int_size</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">bytes_size_int</span>(<span class="ruby-identifier">val</span>.<span class="ruby-identifier">length</span>)
|
||||
<span class="ruby-ivar">@misc_size</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">length</span>
|
||||
<span class="ruby-ivar">@count_objects</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
<span class="ruby-keyword kw">return</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">value</span>.<span class="ruby-identifier">value</span>
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-operator">!</span><span class="ruby-ivar">@unique_table</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">val</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-ivar">@unique_table</span>[<span class="ruby-identifier">val</span>] = <span class="ruby-value">0</span>
|
||||
<span class="ruby-ivar">@string_size</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">binary_strlen</span>(<span class="ruby-identifier">val</span>) <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
|
||||
<span class="ruby-ivar">@int_size</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">bytes_size_int</span>(<span class="ruby-constant">Binary</span>.<span class="ruby-identifier">charset_strlen</span>(<span class="ruby-identifier">val</span>,<span class="ruby-value str">'UTF-8'</span>))
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-ivar">@unique_table</span>[<span class="ruby-identifier">val</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>binary_strlen (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 498</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">binary_strlen</span>(<span class="ruby-identifier">val</span>)
|
||||
<span class="ruby-identifier">val</span>.<span class="ruby-identifier">each_byte</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">b</span> <span class="ruby-operator">></span> <span class="ruby-value">127</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">charset_convert</span>(<span class="ruby-identifier">val</span>, <span class="ruby-value str">'UTF-8'</span>, <span class="ruby-value str">'UTF-16BE'</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">bytesize</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">bytesize</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,48 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>string_to_binary (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 510</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">string_to_binary</span>(<span class="ruby-identifier">val</span>)
|
||||
<span class="ruby-identifier">saved_object_count</span> = <span class="ruby-value">-1</span>
|
||||
|
||||
<span class="ruby-keyword kw">unless</span>(<span class="ruby-ivar">@unique_table</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">val</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">saved_object_count</span> = <span class="ruby-ivar">@written_object_count</span>
|
||||
<span class="ruby-ivar">@written_object_count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
|
||||
<span class="ruby-ivar">@unique_table</span>[<span class="ruby-identifier">val</span>] = <span class="ruby-identifier">saved_object_count</span>
|
||||
<span class="ruby-identifier">utf16</span> = <span class="ruby-keyword kw">false</span>
|
||||
|
||||
<span class="ruby-identifier">val</span>.<span class="ruby-identifier">each_byte</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">b</span> <span class="ruby-operator">></span> <span class="ruby-value">127</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">utf16</span> = <span class="ruby-keyword kw">true</span>
|
||||
<span class="ruby-keyword kw">break</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">utf16</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">bdata</span> = <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">type_bytes</span>(<span class="ruby-value str">"6"</span>,<span class="ruby-constant">Binary</span>.<span class="ruby-identifier">charset_strlen</span>(<span class="ruby-identifier">val</span>,<span class="ruby-value str">"UTF-8"</span>)) <span class="ruby-comment cmt"># 6 is 0110, unicode string (utf16be)</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">charset_convert</span>(<span class="ruby-identifier">val</span>,<span class="ruby-value str">"UTF-8"</span>,<span class="ruby-value str">"UTF-16BE"</span>)
|
||||
|
||||
<span class="ruby-identifier">val</span>.<span class="ruby-identifier">force_encoding</span>(<span class="ruby-value str">"ASCII-8BIT"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value str">"encode"</span>)
|
||||
<span class="ruby-ivar">@object_table</span>[<span class="ruby-identifier">saved_object_count</span>] = <span class="ruby-identifier">bdata</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">val</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">bdata</span> = <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">type_bytes</span>(<span class="ruby-value str">"5"</span>,<span class="ruby-identifier">val</span>.<span class="ruby-identifier">bytesize</span>) <span class="ruby-comment cmt"># 5 is 0101 which is an ASCII string (seems to be ASCII encoded)</span>
|
||||
<span class="ruby-ivar">@object_table</span>[<span class="ruby-identifier">saved_object_count</span>] = <span class="ruby-identifier">bdata</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">val</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">saved_object_count</span> = <span class="ruby-ivar">@unique_table</span>[<span class="ruby-identifier">val</span>]
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">saved_object_count</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,44 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>int_to_binary (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 545</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">int_to_binary</span>(<span class="ruby-identifier">value</span>)
|
||||
<span class="ruby-identifier">nbytes</span> = <span class="ruby-value">0</span>
|
||||
<span class="ruby-identifier">nbytes</span> = <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span> <span class="ruby-operator">></span> <span class="ruby-value">0x</span><span class="ruby-constant">FF</span> <span class="ruby-comment cmt"># 1 byte integer</span>
|
||||
<span class="ruby-identifier">nbytes</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span> <span class="ruby-operator">></span> <span class="ruby-value">0x</span><span class="ruby-constant">FFFF</span> <span class="ruby-comment cmt"># 4 byte integer</span>
|
||||
<span class="ruby-identifier">nbytes</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span> <span class="ruby-operator">></span> <span class="ruby-value">0x</span><span class="ruby-constant">FFFFFFFF</span> <span class="ruby-comment cmt"># 8 byte integer</span>
|
||||
<span class="ruby-identifier">nbytes</span> = <span class="ruby-value">3</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span> <span class="ruby-comment cmt"># 8 byte integer, since signed</span>
|
||||
|
||||
<span class="ruby-identifier">bdata</span> = <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">type_bytes</span>(<span class="ruby-value str">"1"</span>, <span class="ruby-identifier">nbytes</span>) <span class="ruby-comment cmt"># 1 is 0001, type indicator for integer</span>
|
||||
<span class="ruby-identifier">buff</span> = <span class="ruby-value str">""</span>
|
||||
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">nbytes</span> <span class="ruby-operator"><</span> <span class="ruby-value">3</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">fmt</span> = <span class="ruby-value str">"N"</span>
|
||||
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">nbytes</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">fmt</span> = <span class="ruby-value str">"C"</span>
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">nbytes</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>)
|
||||
<span class="ruby-identifier">fmt</span> = <span class="ruby-value str">"n"</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-identifier">buff</span> = [<span class="ruby-identifier">value</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-identifier">fmt</span>)
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-comment cmt"># 64 bit signed integer; we need the higher and the lower 32 bit of the value</span>
|
||||
<span class="ruby-identifier">high_word</span> = <span class="ruby-identifier">value</span> <span class="ruby-operator">>></span> <span class="ruby-value">32</span>
|
||||
<span class="ruby-identifier">low_word</span> = <span class="ruby-identifier">value</span> <span class="ruby-operator">&</span> <span class="ruby-value">0x</span><span class="ruby-constant">FFFFFFFF</span>
|
||||
<span class="ruby-identifier">buff</span> = [<span class="ruby-identifier">high_word</span>,<span class="ruby-identifier">low_word</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">"NN"</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">bdata</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">buff</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>real_to_binary (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 576</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">real_to_binary</span>(<span class="ruby-identifier">val</span>)
|
||||
<span class="ruby-identifier">bdata</span> = <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">type_bytes</span>(<span class="ruby-value str">"2"</span>,<span class="ruby-value">3</span>) <span class="ruby-comment cmt"># 2 is 0010, type indicator for reals</span>
|
||||
<span class="ruby-identifier">buff</span> = [<span class="ruby-identifier">val</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">"d"</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">bdata</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">buff</span>.<span class="ruby-identifier">reverse</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,29 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>num_to_binary (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 583</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">num_to_binary</span>(<span class="ruby-identifier">value</span>)
|
||||
<span class="ruby-identifier">saved_object_count</span> = <span class="ruby-ivar">@written_object_count</span>
|
||||
<span class="ruby-ivar">@written_object_count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-value str">""</span>
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">CFInteger</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">int_to_binary</span>(<span class="ruby-identifier">value</span>.<span class="ruby-identifier">value</span>)
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">real_to_binary</span>(<span class="ruby-identifier">value</span>.<span class="ruby-identifier">value</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-ivar">@object_table</span>[<span class="ruby-identifier">saved_object_count</span>] = <span class="ruby-identifier">val</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">saved_object_count</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>date_to_binary (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 599</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">date_to_binary</span>(<span class="ruby-identifier">val</span>)
|
||||
<span class="ruby-identifier">saved_object_count</span> = <span class="ruby-ivar">@written_object_count</span>
|
||||
<span class="ruby-ivar">@written_object_count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
|
||||
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">val</span>.<span class="ruby-identifier">getutc</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">-</span> <span class="ruby-constant">CFDate</span><span class="ruby-operator">::</span><span class="ruby-constant">DATE_DIFF_APPLE_UNIX</span> <span class="ruby-comment cmt"># CFDate is a real, number of seconds since 01/01/2001 00:00:00 GMT</span>
|
||||
|
||||
<span class="ruby-identifier">bdata</span> = <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">type_bytes</span>(<span class="ruby-value str">"3"</span>, <span class="ruby-value">3</span>) <span class="ruby-comment cmt"># 3 is 0011, type indicator for date</span>
|
||||
<span class="ruby-ivar">@object_table</span>[<span class="ruby-identifier">saved_object_count</span>] = <span class="ruby-identifier">bdata</span> <span class="ruby-operator">+</span> [<span class="ruby-identifier">val</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">"d"</span>).<span class="ruby-identifier">reverse</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">saved_object_count</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>bool_to_binary (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 612</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bool_to_binary</span>(<span class="ruby-identifier">val</span>)
|
||||
<span class="ruby-identifier">saved_object_count</span> = <span class="ruby-ivar">@written_object_count</span>
|
||||
<span class="ruby-ivar">@written_object_count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
|
||||
<span class="ruby-ivar">@object_table</span>[<span class="ruby-identifier">saved_object_count</span>] = <span class="ruby-identifier">val</span> <span class="ruby-value">? </span><span class="ruby-value str">"\x9"</span> <span class="ruby-operator">:</span> <span class="ruby-value str">"\x8"</span> <span class="ruby-comment cmt"># 0x9 is 1001, type indicator for true; 0x8 is 1000, type indicator for false</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">saved_object_count</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>data_to_binary (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 621</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">data_to_binary</span>(<span class="ruby-identifier">val</span>)
|
||||
<span class="ruby-identifier">saved_object_count</span> = <span class="ruby-ivar">@written_object_count</span>
|
||||
<span class="ruby-ivar">@written_object_count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
|
||||
<span class="ruby-identifier">bdata</span> = <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">type_bytes</span>(<span class="ruby-value str">"4"</span>, <span class="ruby-identifier">val</span>.<span class="ruby-identifier">bytesize</span>) <span class="ruby-comment cmt"># a is 1000, type indicator for data</span>
|
||||
<span class="ruby-ivar">@object_table</span>[<span class="ruby-identifier">saved_object_count</span>] = <span class="ruby-identifier">bdata</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">val</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">saved_object_count</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>array_to_binary (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 632</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">array_to_binary</span>(<span class="ruby-identifier">val</span>)
|
||||
<span class="ruby-identifier">saved_object_count</span> = <span class="ruby-ivar">@written_object_count</span>
|
||||
<span class="ruby-ivar">@written_object_count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
|
||||
<span class="ruby-identifier">bdata</span> = <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">type_bytes</span>(<span class="ruby-value str">"a"</span>, <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">count</span>) <span class="ruby-comment cmt"># a is 1010, type indicator for arrays</span>
|
||||
|
||||
<span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">bdata</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">pack_it_with_size</span>(<span class="ruby-ivar">@object_ref_size</span>, <span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_binary</span>(<span class="ruby-keyword kw">self</span>));
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-ivar">@object_table</span>[<span class="ruby-identifier">saved_object_count</span>] = <span class="ruby-identifier">bdata</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">saved_object_count</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,34 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>dict_to_binary (CFPropertyList::Binary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbBinaryCFPropertyList.rb, line 647</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dict_to_binary</span>(<span class="ruby-identifier">val</span>)
|
||||
<span class="ruby-identifier">saved_object_count</span> = <span class="ruby-ivar">@written_object_count</span>
|
||||
<span class="ruby-ivar">@written_object_count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
||||
|
||||
<span class="ruby-identifier">bdata</span> = <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">type_bytes</span>(<span class="ruby-value str">"d"</span>,<span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">count</span>) <span class="ruby-comment cmt"># d=1101, type indicator for dictionary</span>
|
||||
|
||||
<span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">each_key</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">str</span> = <span class="ruby-constant">CFString</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">k</span>)
|
||||
<span class="ruby-identifier">key</span> = <span class="ruby-identifier">str</span>.<span class="ruby-identifier">to_binary</span>(<span class="ruby-keyword kw">self</span>)
|
||||
<span class="ruby-identifier">bdata</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">pack_it_with_size</span>(<span class="ruby-ivar">@object_ref_size</span>,<span class="ruby-identifier">key</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">each_value</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">bdata</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">pack_it_with_size</span>(<span class="ruby-ivar">@object_ref_size</span>,<span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_binary</span>(<span class="ruby-keyword kw">self</span>))
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-ivar">@object_table</span>[<span class="ruby-identifier">saved_object_count</span>] = <span class="ruby-identifier">bdata</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">saved_object_count</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,187 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: CFPropertyList::CFArray</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">CFPropertyList::CFArray</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/rbCFTypes_rb.html">
|
||||
rbCFTypes.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="CFType.html">
|
||||
CFType
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
This class contains an array of values
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000010">new</a>
|
||||
<a href="#M000012">to_binary</a>
|
||||
<a href="#M000011">to_xml</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000010" class="method-detail">
|
||||
<a name="M000010"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFArray.src/M000010.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFArray.src/M000010.html');return false;">
|
||||
<span class="method-name">new</span><span class="method-args">(val=[])</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
create a <a href="CFArray.html#M000010">new</a> array <a
|
||||
href="CFType.html">CFType</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000012" class="method-detail">
|
||||
<a name="M000012"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFArray.src/M000012.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFArray.src/M000012.html');return false;">
|
||||
<span class="method-name">to_binary</span><span class="method-args">(bplist)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert to binary
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000011" class="method-detail">
|
||||
<a name="M000011"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFArray.src/M000011.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFArray.src/M000011.html');return false;">
|
||||
<span class="method-name">to_xml</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert to <a href="XML.html">XML</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>new (CFPropertyList::CFArray)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 185</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">val</span>=[])
|
||||
<span class="ruby-ivar">@value</span> = <span class="ruby-identifier">val</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_xml (CFPropertyList::CFArray)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 190</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xml</span>
|
||||
<span class="ruby-identifier">n</span> = <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'array'</span>)
|
||||
<span class="ruby-ivar">@value</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span>
|
||||
<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">n</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_xml</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">n</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_binary (CFPropertyList::CFArray)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 201</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_binary</span>(<span class="ruby-identifier">bplist</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">bplist</span>.<span class="ruby-identifier">array_to_binary</span>(<span class="ruby-keyword kw">self</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,166 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: CFPropertyList::CFBoolean</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">CFPropertyList::CFBoolean</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/rbCFTypes_rb.html">
|
||||
rbCFTypes.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="CFType.html">
|
||||
CFType
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
This class contains a boolean value
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000066">to_binary</a>
|
||||
<a href="#M000065">to_xml</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000066" class="method-detail">
|
||||
<a name="M000066"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFBoolean.src/M000066.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFBoolean.src/M000066.html');return false;">
|
||||
<span class="method-name">to_binary</span><span class="method-args">(bplist)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert to binary
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000065" class="method-detail">
|
||||
<a name="M000065"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFBoolean.src/M000065.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFBoolean.src/M000065.html');return false;">
|
||||
<span class="method-name">to_xml</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert to <a href="XML.html">XML</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_xml (CFPropertyList::CFBoolean)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 140</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xml</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@value</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'true'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'false'</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_binary (CFPropertyList::CFBoolean)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 145</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_binary</span>(<span class="ruby-identifier">bplist</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">bplist</span>.<span class="ruby-identifier">bool_to_binary</span>(<span class="ruby-ivar">@value</span>);
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,232 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: CFPropertyList::CFData</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">CFPropertyList::CFData</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/rbCFTypes_rb.html">
|
||||
rbCFTypes.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="CFType.html">
|
||||
CFType
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
This class contains binary data values
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000053">decoded_value</a>
|
||||
<a href="#M000052">new</a>
|
||||
<a href="#M000055">to_binary</a>
|
||||
<a href="#M000054">to_xml</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
<div id="constants-list">
|
||||
<h3 class="section-bar">Constants</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="Constants">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DATA_BASE64</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">0</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Base64 encoded data
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DATA_RAW</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">1</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Raw data
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000052" class="method-detail">
|
||||
<a name="M000052"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFData.src/M000052.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFData.src/M000052.html');return false;">
|
||||
<span class="method-name">new</span><span class="method-args">(value=nil,format=DATA_BASE64)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
set value to defined state, either base64 encoded or raw
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000053" class="method-detail">
|
||||
<a name="M000053"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFData.src/M000053.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFData.src/M000053.html');return false;">
|
||||
<span class="method-name">decoded_value</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
get base64 decoded value
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000055" class="method-detail">
|
||||
<a name="M000055"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFData.src/M000055.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFData.src/M000055.html');return false;">
|
||||
<span class="method-name">to_binary</span><span class="method-args">(bplist)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert to binary
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000054" class="method-detail">
|
||||
<a name="M000054"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFData.src/M000054.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFData.src/M000054.html');return false;">
|
||||
<span class="method-name">to_xml</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert to <a href="XML.html">XML</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>new (CFPropertyList::CFData)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 158</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">value</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-identifier">format</span>=<span class="ruby-constant">DATA_BASE64</span>)
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">format</span> <span class="ruby-operator">==</span> <span class="ruby-constant">DATA_RAW</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-ivar">@value</span> = <span class="ruby-constant">Base64</span>.<span class="ruby-identifier">encode64</span>(<span class="ruby-identifier">value</span>)
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-ivar">@value</span> = <span class="ruby-identifier">value</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>decoded_value (CFPropertyList::CFData)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 167</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">decoded_value</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">Base64</span>.<span class="ruby-identifier">decode64</span>(<span class="ruby-ivar">@value</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_xml (CFPropertyList::CFData)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 172</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xml</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'data'</span>) <span class="ruby-operator"><<</span> <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new_text</span>(<span class="ruby-ivar">@value</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_binary (CFPropertyList::CFData)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 177</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_binary</span>(<span class="ruby-identifier">bplist</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">bplist</span>.<span class="ruby-identifier">data_to_binary</span>(<span class="ruby-identifier">decoded_value</span>())
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,285 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: CFPropertyList::CFDate</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">CFPropertyList::CFDate</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/rbCFTypes_rb.html">
|
||||
rbCFTypes.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="CFType.html">
|
||||
CFType
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
This class holds Time values. While Apple uses seconds since 2001, the rest
|
||||
of the world uses seconds since 1970. So if you access value directly, you
|
||||
get the Time class. If you access via <a
|
||||
href="CFDate.html#M000075">get_value</a> you either geht the timestamp or
|
||||
the Apple timestamp
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000071">date_string</a>
|
||||
<a href="#M000075">get_value</a>
|
||||
<a href="#M000073">new</a>
|
||||
<a href="#M000072">parse_date</a>
|
||||
<a href="#M000074">set_value</a>
|
||||
<a href="#M000077">to_binary</a>
|
||||
<a href="#M000076">to_xml</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
<div id="constants-list">
|
||||
<h3 class="section-bar">Constants</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="Constants">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">TIMESTAMP_APPLE</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">0</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">TIMESTAMP_UNIX</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">1;</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DATE_DIFF_APPLE_UNIX</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">978307200</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000071" class="method-detail">
|
||||
<a name="M000071"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFDate.src/M000071.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFDate.src/M000071.html');return false;">
|
||||
<span class="method-name">date_string</span><span class="method-args">(val)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
create a <a href="XML.html">XML</a> date strimg from a time object
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000073" class="method-detail">
|
||||
<a name="M000073"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFDate.src/M000073.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFDate.src/M000073.html');return false;">
|
||||
<span class="method-name">new</span><span class="method-args">(value = nil,format=CFDate::TIMESTAMP_UNIX)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
set value to defined state
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000072" class="method-detail">
|
||||
<a name="M000072"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFDate.src/M000072.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFDate.src/M000072.html');return false;">
|
||||
<span class="method-name">parse_date</span><span class="method-args">(val)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
parse a <a href="XML.html">XML</a> date string
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000075" class="method-detail">
|
||||
<a name="M000075"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFDate.src/M000075.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFDate.src/M000075.html');return false;">
|
||||
<span class="method-name">get_value</span><span class="method-args">(format=CFDate::TIMESTAMP_UNIX)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
get timestamp, either UNIX or Apple timestamp
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000074" class="method-detail">
|
||||
<a name="M000074"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFDate.src/M000074.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFDate.src/M000074.html');return false;">
|
||||
<span class="method-name">set_value</span><span class="method-args">(value,format=CFDate::TIMESTAMP_UNIX)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
set value with timestamp, either Apple or UNIX
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000077" class="method-detail">
|
||||
<a name="M000077"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFDate.src/M000077.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFDate.src/M000077.html');return false;">
|
||||
<span class="method-name">to_binary</span><span class="method-args">(bplist)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert to binary
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000076" class="method-detail">
|
||||
<a name="M000076"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFDate.src/M000076.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFDate.src/M000076.html');return false;">
|
||||
<span class="method-name">to_xml</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert to <a href="XML.html">XML</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>date_string (CFPropertyList::CFDate)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 86</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">CFDate</span>.<span class="ruby-identifier">date_string</span>(<span class="ruby-identifier">val</span>)
|
||||
<span class="ruby-comment cmt"># 2009-05-13T20:23:43Z</span>
|
||||
<span class="ruby-identifier">val</span>.<span class="ruby-identifier">getutc</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">"%Y-%m-%dT%H:%M:%SZ"</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>parse_date (CFPropertyList::CFDate)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 92</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">CFDate</span>.<span class="ruby-identifier">parse_date</span>(<span class="ruby-identifier">val</span>)
|
||||
<span class="ruby-comment cmt"># 2009-05-13T20:23:43Z</span>
|
||||
<span class="ruby-identifier">val</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">%r{^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$}</span>
|
||||
<span class="ruby-identifier">year</span>,<span class="ruby-identifier">month</span>,<span class="ruby-identifier">day</span>,<span class="ruby-identifier">hour</span>,<span class="ruby-identifier">min</span>,<span class="ruby-identifier">sec</span> = <span class="ruby-identifier">$1</span>, <span class="ruby-identifier">$2</span>, <span class="ruby-identifier">$3</span>, <span class="ruby-identifier">$4</span>, <span class="ruby-identifier">$5</span>, <span class="ruby-identifier">$6</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">utc</span>(<span class="ruby-identifier">year</span>,<span class="ruby-identifier">month</span>,<span class="ruby-identifier">day</span>,<span class="ruby-identifier">hour</span>,<span class="ruby-identifier">min</span>,<span class="ruby-identifier">sec</span>).<span class="ruby-identifier">getlocal</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>new (CFPropertyList::CFDate)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 100</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">value</span> = <span class="ruby-keyword kw">nil</span>,<span class="ruby-identifier">format</span>=<span class="ruby-constant">CFDate</span><span class="ruby-operator">::</span><span class="ruby-constant">TIMESTAMP_UNIX</span>)
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Time</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-ivar">@value</span> = <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">value</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">set_value</span>(<span class="ruby-identifier">value</span>,<span class="ruby-identifier">format</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>set_value (CFPropertyList::CFDate)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 109</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_value</span>(<span class="ruby-identifier">value</span>,<span class="ruby-identifier">format</span>=<span class="ruby-constant">CFDate</span><span class="ruby-operator">::</span><span class="ruby-constant">TIMESTAMP_UNIX</span>)
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">format</span> <span class="ruby-operator">==</span> <span class="ruby-constant">CFDate</span><span class="ruby-operator">::</span><span class="ruby-constant">TIMESTAMP_UNIX</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-ivar">@value</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">at</span>(<span class="ruby-identifier">value</span>)
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-ivar">@value</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">at</span>(<span class="ruby-identifier">value</span> <span class="ruby-operator">+</span> <span class="ruby-constant">CFDate</span><span class="ruby-operator">::</span><span class="ruby-constant">DATE_DIFF_APPLE_UNIX</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>get_value (CFPropertyList::CFDate)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 118</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">format</span>=<span class="ruby-constant">CFDate</span><span class="ruby-operator">::</span><span class="ruby-constant">TIMESTAMP_UNIX</span>)
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">format</span> <span class="ruby-operator">==</span> <span class="ruby-constant">CFDate</span><span class="ruby-operator">::</span><span class="ruby-constant">TIMESTAMP_UNIX</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@value</span>.<span class="ruby-identifier">to_i</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@value</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">-</span> <span class="ruby-constant">CFDate</span><span class="ruby-operator">::</span><span class="ruby-constant">DATE_DIFF_APPLE_UNIX</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_xml (CFPropertyList::CFDate)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 127</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xml</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'date'</span>) <span class="ruby-operator"><<</span> <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new_text</span>(<span class="ruby-constant">CFDate</span><span class="ruby-operator">::</span><span class="ruby-identifier">date_string</span>(<span class="ruby-ivar">@value</span>))
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_binary (CFPropertyList::CFDate)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 132</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_binary</span>(<span class="ruby-identifier">bplist</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">bplist</span>.<span class="ruby-identifier">date_to_binary</span>(<span class="ruby-ivar">@value</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,186 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: CFPropertyList::CFDictionary</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">CFPropertyList::CFDictionary</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/rbCFTypes_rb.html">
|
||||
rbCFTypes.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="CFType.html">
|
||||
CFType
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
this class contains a hash of values
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000013">new</a>
|
||||
<a href="#M000015">to_binary</a>
|
||||
<a href="#M000014">to_xml</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000013" class="method-detail">
|
||||
<a name="M000013"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFDictionary.src/M000013.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFDictionary.src/M000013.html');return false;">
|
||||
<span class="method-name">new</span><span class="method-args">(value={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Create <a href="CFDictionary.html#M000013">new</a> CFDictonary type.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000015" class="method-detail">
|
||||
<a name="M000015"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFDictionary.src/M000015.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFDictionary.src/M000015.html');return false;">
|
||||
<span class="method-name">to_binary</span><span class="method-args">(bplist)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert to binary
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000014" class="method-detail">
|
||||
<a name="M000014"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFDictionary.src/M000014.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFDictionary.src/M000014.html');return false;">
|
||||
<span class="method-name">to_xml</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert to <a href="XML.html">XML</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>new (CFPropertyList::CFDictionary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 209</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">value</span>={})
|
||||
<span class="ruby-ivar">@value</span> = <span class="ruby-identifier">value</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_xml (CFPropertyList::CFDictionary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 214</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xml</span>
|
||||
<span class="ruby-identifier">n</span> = <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'dict'</span>)
|
||||
<span class="ruby-ivar">@value</span>.<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword kw">do</span>
|
||||
<span class="ruby-operator">|</span><span class="ruby-identifier">key</span>,<span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">k</span> = <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'key'</span>) <span class="ruby-operator"><<</span> <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new_text</span>(<span class="ruby-identifier">key</span>)
|
||||
<span class="ruby-identifier">n</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">k</span>
|
||||
<span class="ruby-identifier">n</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">to_xml</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">n</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_binary (CFPropertyList::CFDictionary)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 227</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_binary</span>(<span class="ruby-identifier">bplist</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">bplist</span>.<span class="ruby-identifier">dict_to_binary</span>(<span class="ruby-keyword kw">self</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,166 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: CFPropertyList::CFInteger</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">CFPropertyList::CFInteger</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/rbCFTypes_rb.html">
|
||||
rbCFTypes.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="CFType.html">
|
||||
CFType
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
This class holds integer/fixnum values
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000068">to_binary</a>
|
||||
<a href="#M000067">to_xml</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000068" class="method-detail">
|
||||
<a name="M000068"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFInteger.src/M000068.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFInteger.src/M000068.html');return false;">
|
||||
<span class="method-name">to_binary</span><span class="method-args">(bplist)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert to binary
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000067" class="method-detail">
|
||||
<a name="M000067"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFInteger.src/M000067.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFInteger.src/M000067.html');return false;">
|
||||
<span class="method-name">to_xml</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert to <a href="XML.html">XML</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_xml (CFPropertyList::CFInteger)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 53</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xml</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'integer'</span>) <span class="ruby-operator"><<</span> <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new_text</span>(<span class="ruby-ivar">@value</span>.<span class="ruby-identifier">to_s</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_binary (CFPropertyList::CFInteger)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 58</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_binary</span>(<span class="ruby-identifier">bplist</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">bplist</span>.<span class="ruby-identifier">num_to_binary</span>(<span class="ruby-keyword kw">self</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,166 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: CFPropertyList::CFReal</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">CFPropertyList::CFReal</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/rbCFTypes_rb.html">
|
||||
rbCFTypes.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="CFType.html">
|
||||
CFType
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
This class holds float values
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000017">to_binary</a>
|
||||
<a href="#M000016">to_xml</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000017" class="method-detail">
|
||||
<a name="M000017"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFReal.src/M000017.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFReal.src/M000017.html');return false;">
|
||||
<span class="method-name">to_binary</span><span class="method-args">(bplist)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert to binary
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000016" class="method-detail">
|
||||
<a name="M000016"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFReal.src/M000016.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFReal.src/M000016.html');return false;">
|
||||
<span class="method-name">to_xml</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert to <a href="XML.html">XML</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_xml (CFPropertyList::CFReal)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 66</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xml</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'real'</span>) <span class="ruby-operator"><<</span> <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new_text</span>(<span class="ruby-ivar">@value</span>.<span class="ruby-identifier">to_s</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_binary (CFPropertyList::CFReal)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 71</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_binary</span>(<span class="ruby-identifier">bplist</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">bplist</span>.<span class="ruby-identifier">num_to_binary</span>(<span class="ruby-keyword kw">self</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,167 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: CFPropertyList::CFString</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">CFPropertyList::CFString</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/rbCFTypes_rb.html">
|
||||
rbCFTypes.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="CFType.html">
|
||||
CFType
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
This class holds string values, both, UTF-8 and UTF-16BE It will convert
|
||||
the value to UTF-16BE if necessary (i.e. if non-ascii char contained)
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000070">to_binary</a>
|
||||
<a href="#M000069">to_xml</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000070" class="method-detail">
|
||||
<a name="M000070"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFString.src/M000070.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFString.src/M000070.html');return false;">
|
||||
<span class="method-name">to_binary</span><span class="method-args">(bplist)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert to binary
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000069" class="method-detail">
|
||||
<a name="M000069"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFString.src/M000069.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFString.src/M000069.html');return false;">
|
||||
<span class="method-name">to_xml</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert to <a href="XML.html">XML</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_xml (CFPropertyList::CFString)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 38</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xml</span>
|
||||
<span class="ruby-identifier">n</span> = <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'string'</span>)
|
||||
<span class="ruby-identifier">n</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new_text</span>(<span class="ruby-ivar">@value</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@value</span>.<span class="ruby-identifier">nil?</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">n</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_binary (CFPropertyList::CFString)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 45</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_binary</span>(<span class="ruby-identifier">bplist</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">bplist</span>.<span class="ruby-identifier">string_to_binary</span>(<span class="ruby-ivar">@value</span>);
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,201 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: CFPropertyList::CFType</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">CFPropertyList::CFType</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/rbCFTypes_rb.html">
|
||||
rbCFTypes.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
This class defines the base class for all <a href="CFType.html">CFType</a>
|
||||
classes
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000003">new</a>
|
||||
<a href="#M000005">to_binary</a>
|
||||
<a href="#M000004">to_xml</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="attribute-list">
|
||||
<h3 class="section-bar">Attributes</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">value</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc">
|
||||
value of the type
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000003" class="method-detail">
|
||||
<a name="M000003"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFType.src/M000003.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFType.src/M000003.html');return false;">
|
||||
<span class="method-name">new</span><span class="method-args">(value=nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
set internal value to parameter value by default
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000005" class="method-detail">
|
||||
<a name="M000005"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFType.src/M000005.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFType.src/M000005.html');return false;">
|
||||
<span class="method-name">to_binary</span><span class="method-args">(bplist)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert type to binary
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000004" class="method-detail">
|
||||
<a name="M000004"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="CFType.src/M000004.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('CFType.src/M000004.html');return false;">
|
||||
<span class="method-name">to_xml</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert type to <a href="XML.html">XML</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>new (CFPropertyList::CFType)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 21</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">value</span>=<span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-ivar">@value</span> = <span class="ruby-identifier">value</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_xml (CFPropertyList::CFType)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 26</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xml</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_binary (CFPropertyList::CFType)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFTypes.rb, line 30</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_binary</span>(<span class="ruby-identifier">bplist</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,412 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: CFPropertyList::List</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">CFPropertyList::List</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/rbCFPropertyList_rb.html">
|
||||
rbCFPropertyList.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000062">load</a>
|
||||
<a href="#M000058">load_binary</a>
|
||||
<a href="#M000060">load_binary_str</a>
|
||||
<a href="#M000061">load_str</a>
|
||||
<a href="#M000057">load_xml</a>
|
||||
<a href="#M000059">load_xml_str</a>
|
||||
<a href="#M000056">new</a>
|
||||
<a href="#M000063">save</a>
|
||||
<a href="#M000064">to_str</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
<div id="constants-list">
|
||||
<h3 class="section-bar">Constants</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="Constants">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">FORMAT_BINARY</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">1</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Format constant for binary format
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">FORMAT_XML</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">2</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Format constant for <a href="XML.html">XML</a> format
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">FORMAT_AUTO</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">0</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Format constant for automatic format recognizing
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="attribute-list">
|
||||
<h3 class="section-bar">Attributes</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">filename</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc">
|
||||
Path of PropertyList
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">format</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc">
|
||||
Path of PropertyList
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">value</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc">
|
||||
the root value in the plist file
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000056" class="method-detail">
|
||||
<a name="M000056"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="List.src/M000056.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('List.src/M000056.html');return false;">
|
||||
<span class="method-name">new</span><span class="method-args">(opts={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000062" class="method-detail">
|
||||
<a name="M000062"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="List.src/M000062.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('List.src/M000062.html');return false;">
|
||||
<span class="method-name">load</span><span class="method-args">(file=nil,format=nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Read a plist file
|
||||
</p>
|
||||
<table>
|
||||
<tr><td valign="top">file = nil:</td><td>The filename of the file to read. If nil, use <tt>filename</tt> instance
|
||||
variable
|
||||
|
||||
</td></tr>
|
||||
<tr><td valign="top">format = nil:</td><td>The format of the plist file. Auto-detect if nil
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000058" class="method-detail">
|
||||
<a name="M000058"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="List.src/M000058.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('List.src/M000058.html');return false;">
|
||||
<span class="method-name">load_binary</span><span class="method-args">(filename=nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
read a binary plist file
|
||||
</p>
|
||||
<table>
|
||||
<tr><td valign="top">filename = nil:</td><td>The filename to read from; if nil, read from the file defined by instance
|
||||
variable <tt>filename</tt>
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000060" class="method-detail">
|
||||
<a name="M000060"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="List.src/M000060.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('List.src/M000060.html');return false;">
|
||||
<span class="method-name">load_binary_str</span><span class="method-args">(str=nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
<a href="List.html#M000062">load</a> a plist from a binary string
|
||||
</p>
|
||||
<table>
|
||||
<tr><td valign="top">str:</td><td>The string containing the plist
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000061" class="method-detail">
|
||||
<a name="M000061"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="List.src/M000061.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('List.src/M000061.html');return false;">
|
||||
<span class="method-name">load_str</span><span class="method-args">(str=nil,format=nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
<a href="List.html#M000062">load</a> a plist from a string
|
||||
</p>
|
||||
<table>
|
||||
<tr><td valign="top">str = nil:</td><td>The string containing the plist
|
||||
|
||||
</td></tr>
|
||||
<tr><td valign="top">format = nil:</td><td>The format of the plist
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000057" class="method-detail">
|
||||
<a name="M000057"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="List.src/M000057.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('List.src/M000057.html');return false;">
|
||||
<span class="method-name">load_xml</span><span class="method-args">(filename=nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Load an <a href="XML.html">XML</a> PropertyList
|
||||
</p>
|
||||
<table>
|
||||
<tr><td valign="top">filename = nil:</td><td>The filename to read from; if nil, read from the file defined by instance
|
||||
variable <tt>filename</tt>
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000059" class="method-detail">
|
||||
<a name="M000059"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="List.src/M000059.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('List.src/M000059.html');return false;">
|
||||
<span class="method-name">load_xml_str</span><span class="method-args">(str=nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
<a href="List.html#M000062">load</a> a plist from a <a
|
||||
href="XML.html">XML</a> string
|
||||
</p>
|
||||
<table>
|
||||
<tr><td valign="top">str:</td><td>The string containing the plist
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000063" class="method-detail">
|
||||
<a name="M000063"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="List.src/M000063.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('List.src/M000063.html');return false;">
|
||||
<span class="method-name">save</span><span class="method-args">(file=nil,format=nil,opts={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Serialize <a href="../CFPropertyList.html">CFPropertyList</a> object to
|
||||
specified format and write it to file
|
||||
</p>
|
||||
<table>
|
||||
<tr><td valign="top">file = nil:</td><td>The filename of the file to write to. Uses <tt>filename</tt> instance
|
||||
variable if nil
|
||||
|
||||
</td></tr>
|
||||
<tr><td valign="top">format = nil:</td><td>The format to <a href="List.html#M000063">save</a> in. Uses <tt>format</tt>
|
||||
instance variable if nil
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000064" class="method-detail">
|
||||
<a name="M000064"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="List.src/M000064.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('List.src/M000064.html');return false;">
|
||||
<span class="method-name">to_str</span><span class="method-args">(format=List::FORMAT_BINARY,opts={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert plist to string
|
||||
</p>
|
||||
<table>
|
||||
<tr><td valign="top">format = List::FORMAT_BINARY:</td><td>The format to <a href="List.html#M000063">save</a> the plist
|
||||
|
||||
</td></tr>
|
||||
<tr><td valign="top">opts={}:</td><td>Pass parser options
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,23 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>new (CFPropertyList::List)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFPropertyList.rb, line 158</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">opts</span>={})
|
||||
<span class="ruby-ivar">@filename</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:file</span>]
|
||||
<span class="ruby-ivar">@format</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:format</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">FORMAT_AUTO</span>
|
||||
<span class="ruby-ivar">@data</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:data</span>]
|
||||
|
||||
<span class="ruby-identifier">load</span>(<span class="ruby-ivar">@filename</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@filename</span>.<span class="ruby-identifier">nil?</span>
|
||||
<span class="ruby-identifier">load_str</span>(<span class="ruby-ivar">@data</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@data</span>.<span class="ruby-identifier">nil?</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>load_xml (CFPropertyList::List)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFPropertyList.rb, line 169</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_xml</span>(<span class="ruby-identifier">filename</span>=<span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-identifier">load</span>(<span class="ruby-identifier">filename</span>,<span class="ruby-constant">List</span><span class="ruby-operator">::</span><span class="ruby-constant">FORMAT_XML</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>load_binary (CFPropertyList::List)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFPropertyList.rb, line 175</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_binary</span>(<span class="ruby-identifier">filename</span>=<span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-identifier">load</span>(<span class="ruby-identifier">filename</span>,<span class="ruby-constant">List</span><span class="ruby-operator">::</span><span class="ruby-constant">FORMAT_BINARY</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>load_xml_str (CFPropertyList::List)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFPropertyList.rb, line 181</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_xml_str</span>(<span class="ruby-identifier">str</span>=<span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-identifier">load_str</span>(<span class="ruby-identifier">str</span>,<span class="ruby-constant">List</span><span class="ruby-operator">::</span><span class="ruby-constant">FORMAT_XML</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>load_binary_str (CFPropertyList::List)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFPropertyList.rb, line 187</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_binary_str</span>(<span class="ruby-identifier">str</span>=<span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-identifier">load_str</span>(<span class="ruby-identifier">str</span>,<span class="ruby-constant">List</span><span class="ruby-operator">::</span><span class="ruby-constant">FORMAT_BINARY</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,40 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>load_str (CFPropertyList::List)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFPropertyList.rb, line 194</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_str</span>(<span class="ruby-identifier">str</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-identifier">format</span>=<span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-identifier">str</span> = <span class="ruby-ivar">@data</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">nil?</span>
|
||||
<span class="ruby-identifier">format</span> = <span class="ruby-ivar">@format</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">format</span>.<span class="ruby-identifier">nil?</span>
|
||||
|
||||
<span class="ruby-ivar">@value</span> = {}
|
||||
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">format</span>
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">List</span><span class="ruby-operator">::</span><span class="ruby-constant">FORMAT_BINARY</span>, <span class="ruby-constant">List</span><span class="ruby-operator">::</span><span class="ruby-constant">FORMAT_XML</span> <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">prsr</span> = <span class="ruby-ivar">@@parsers</span>[<span class="ruby-identifier">format</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>].<span class="ruby-identifier">new</span>
|
||||
<span class="ruby-ivar">@value</span> = <span class="ruby-identifier">prsr</span>.<span class="ruby-identifier">load</span>({<span class="ruby-identifier">:data</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">str</span>})
|
||||
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">List</span><span class="ruby-operator">::</span><span class="ruby-constant">FORMAT_AUTO</span> <span class="ruby-keyword kw">then</span> <span class="ruby-comment cmt"># what we now do is ugly, but neccessary to recognize the file format</span>
|
||||
<span class="ruby-identifier">filetype</span> = <span class="ruby-identifier">str</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>]
|
||||
<span class="ruby-identifier">version</span> = <span class="ruby-identifier">str</span>[<span class="ruby-value">6</span><span class="ruby-operator">..</span><span class="ruby-value">7</span>]
|
||||
|
||||
<span class="ruby-identifier">prsr</span> = <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filetype</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"bplist"</span> <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">CFFormatError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"Wong file version #{version}"</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">version</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"00"</span>
|
||||
<span class="ruby-identifier">prsr</span> = <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">new</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">prsr</span> = <span class="ruby-constant">XML</span>.<span class="ruby-identifier">new</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-ivar">@value</span> = <span class="ruby-identifier">prsr</span>.<span class="ruby-identifier">load</span>({<span class="ruby-identifier">:data</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">str</span>})
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,43 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>load (CFPropertyList::List)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFPropertyList.rb, line 223</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load</span>(<span class="ruby-identifier">file</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-identifier">format</span>=<span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-identifier">file</span> = <span class="ruby-ivar">@filename</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">nil?</span>
|
||||
<span class="ruby-identifier">format</span> = <span class="ruby-ivar">@format</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">format</span>.<span class="ruby-identifier">nil?</span>
|
||||
<span class="ruby-ivar">@value</span> = {}
|
||||
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">IOError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"File #{file} not readable!"</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">readable?</span> <span class="ruby-identifier">file</span>
|
||||
|
||||
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">format</span>
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">List</span><span class="ruby-operator">::</span><span class="ruby-constant">FORMAT_BINARY</span>, <span class="ruby-constant">List</span><span class="ruby-operator">::</span><span class="ruby-constant">FORMAT_XML</span> <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">prsr</span> = <span class="ruby-ivar">@@parsers</span>[<span class="ruby-identifier">format</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>].<span class="ruby-identifier">new</span>
|
||||
<span class="ruby-ivar">@value</span> = <span class="ruby-identifier">prsr</span>.<span class="ruby-identifier">load</span>({<span class="ruby-identifier">:file</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">file</span>})
|
||||
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">List</span><span class="ruby-operator">::</span><span class="ruby-constant">FORMAT_AUTO</span> <span class="ruby-keyword kw">then</span> <span class="ruby-comment cmt"># what we now do is ugly, but neccessary to recognize the file format</span>
|
||||
<span class="ruby-identifier">magic_number</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">file</span>,<span class="ruby-value">8</span>)
|
||||
<span class="ruby-identifier">filetype</span> = <span class="ruby-identifier">magic_number</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>]
|
||||
<span class="ruby-identifier">version</span> = <span class="ruby-identifier">magic_number</span>[<span class="ruby-value">6</span><span class="ruby-operator">..</span><span class="ruby-value">7</span>]
|
||||
|
||||
<span class="ruby-identifier">prsr</span> = <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filetype</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"bplist"</span> <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">CFFormatError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"Wong file version #{version}"</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">version</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"00"</span>
|
||||
<span class="ruby-identifier">prsr</span> = <span class="ruby-constant">Binary</span>.<span class="ruby-identifier">new</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">prsr</span> = <span class="ruby-constant">XML</span>.<span class="ruby-identifier">new</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-ivar">@value</span> = <span class="ruby-identifier">prsr</span>.<span class="ruby-identifier">load</span>({<span class="ruby-identifier">:file</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">file</span>})
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,36 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>save (CFPropertyList::List)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFPropertyList.rb, line 255</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save</span>(<span class="ruby-identifier">file</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-identifier">format</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-identifier">opts</span>={})
|
||||
<span class="ruby-identifier">format</span> = <span class="ruby-ivar">@format</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">format</span>.<span class="ruby-identifier">nil?</span>
|
||||
<span class="ruby-identifier">file</span> = <span class="ruby-ivar">@filename</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">nil?</span>
|
||||
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">CFFormatError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"Format #{format} not supported, use List::FORMAT_BINARY or List::FORMAT_XML"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">format</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">FORMAT_BINARY</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">format</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">FORMAT_XML</span>
|
||||
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">file</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">IOError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"File #{file} not writable!"</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">writable?</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">file</span>))
|
||||
<span class="ruby-keyword kw">elsif</span>(<span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">writable?</span>(<span class="ruby-identifier">file</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">IOError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"File #{file} not writable!"</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:root</span>] = <span class="ruby-ivar">@value</span>
|
||||
<span class="ruby-identifier">prsr</span> = <span class="ruby-ivar">@@parsers</span>[<span class="ruby-identifier">format</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>].<span class="ruby-identifier">new</span>
|
||||
<span class="ruby-identifier">content</span> = <span class="ruby-identifier">prsr</span>.<span class="ruby-identifier">to_str</span>(<span class="ruby-identifier">opts</span>)
|
||||
|
||||
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file</span>, <span class="ruby-value str">'wb'</span>) {
|
||||
<span class="ruby-operator">|</span><span class="ruby-identifier">fd</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">fd</span>.<span class="ruby-identifier">write</span> <span class="ruby-identifier">content</span>
|
||||
}
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_str (CFPropertyList::List)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFPropertyList.rb, line 280</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_str</span>(<span class="ruby-identifier">format</span>=<span class="ruby-constant">List</span><span class="ruby-operator">::</span><span class="ruby-constant">FORMAT_BINARY</span>,<span class="ruby-identifier">opts</span>={})
|
||||
<span class="ruby-identifier">prsr</span> = <span class="ruby-ivar">@@parsers</span>[<span class="ruby-identifier">format</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>].<span class="ruby-identifier">new</span>
|
||||
<span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:root</span>] = <span class="ruby-ivar">@value</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">prsr</span>.<span class="ruby-identifier">to_str</span>(<span class="ruby-identifier">opts</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,164 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: CFPropertyList::ParserInterface</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">CFPropertyList::ParserInterface</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/rbCFPropertyList_rb.html">
|
||||
rbCFPropertyList.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
interface class for PList parsers
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000050">load</a>
|
||||
<a href="#M000051">to_str</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000050" class="method-detail">
|
||||
<a name="M000050"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="ParserInterface.src/M000050.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('ParserInterface.src/M000050.html');return false;">
|
||||
<span class="method-name">load</span><span class="method-args">(opts={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
<a href="ParserInterface.html#M000050">load</a> a plist
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000051" class="method-detail">
|
||||
<a name="M000051"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="ParserInterface.src/M000051.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('ParserInterface.src/M000051.html');return false;">
|
||||
<span class="method-name">to_str</span><span class="method-args">(opts={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
convert a plist to string
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>load (CFPropertyList::ParserInterface)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFPropertyList.rb, line 46</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load</span>(<span class="ruby-identifier">opts</span>={})
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-value str">""</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_str (CFPropertyList::ParserInterface)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbCFPropertyList.rb, line 51</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_str</span>(<span class="ruby-identifier">opts</span>={})
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,218 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: CFPropertyList::XML</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">CFPropertyList::XML</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/rbXMLCFPropertyList_rb.html">
|
||||
rbXMLCFPropertyList.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="ParserInterface.html">
|
||||
ParserInterface
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
<a href="XML.html">XML</a> parser
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000008">get_value</a>
|
||||
<a href="#M000009">import_xml</a>
|
||||
<a href="#M000006">load</a>
|
||||
<a href="#M000007">to_str</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000006" class="method-detail">
|
||||
<a name="M000006"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="XML.src/M000006.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('XML.src/M000006.html');return false;">
|
||||
<span class="method-name">load</span><span class="method-args">(opts)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
read a <a href="XML.html">XML</a> file opts::
|
||||
</p>
|
||||
<ul>
|
||||
<li>:file - The filename of the file to <a href="XML.html#M000006">load</a>
|
||||
|
||||
</li>
|
||||
<li>:data - The data to parse
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000007" class="method-detail">
|
||||
<a name="M000007"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="XML.src/M000007.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('XML.src/M000007.html');return false;">
|
||||
<span class="method-name">to_str</span><span class="method-args">(opts={})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
serialize <a href="../CFPropertyList.html">CFPropertyList</a> object to <a
|
||||
href="XML.html">XML</a>
|
||||
</p>
|
||||
<table>
|
||||
<tr><td valign="top">opts = {}:</td><td>Specify options: :formatted - Use indention and line breaks
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Protected Instance methods</h3>
|
||||
|
||||
<div id="method-M000008" class="method-detail">
|
||||
<a name="M000008"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="XML.src/M000008.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('XML.src/M000008.html');return false;">
|
||||
<span class="method-name">get_value</span><span class="method-args">(n)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
get the value of a DOM node
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000009" class="method-detail">
|
||||
<a name="M000009"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="XML.src/M000009.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('XML.src/M000009.html');return false;">
|
||||
<span class="method-name">import_xml</span><span class="method-args">(node)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
import the <a href="XML.html">XML</a> values
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>load (CFPropertyList::XML)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbXMLCFPropertyList.rb, line 16</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load</span>(<span class="ruby-identifier">opts</span>)
|
||||
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">opts</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:file</span>)) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">doc</span> = <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">file</span>(<span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:file</span>],<span class="ruby-identifier">:options</span> =<span class="ruby-operator">></span> <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span><span class="ruby-operator">::</span><span class="ruby-constant">Options</span><span class="ruby-operator">::</span><span class="ruby-constant">NOBLANKS</span><span class="ruby-operator">|</span><span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span><span class="ruby-operator">::</span><span class="ruby-constant">Options</span><span class="ruby-operator">::</span><span class="ruby-constant">NOENT</span>)
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">doc</span> = <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">string</span>(<span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:data</span>],<span class="ruby-identifier">:options</span> =<span class="ruby-operator">></span> <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span><span class="ruby-operator">::</span><span class="ruby-constant">Options</span><span class="ruby-operator">::</span><span class="ruby-constant">NOBLANKS</span><span class="ruby-operator">|</span><span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span><span class="ruby-operator">::</span><span class="ruby-constant">Options</span><span class="ruby-operator">::</span><span class="ruby-constant">NOENT</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-identifier">root</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">first</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">import_xml</span>(<span class="ruby-identifier">root</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,40 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>to_str (CFPropertyList::XML)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbXMLCFPropertyList.rb, line 29</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_str</span>(<span class="ruby-identifier">opts</span>={})
|
||||
<span class="ruby-identifier">doc</span> = <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>
|
||||
|
||||
<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">root</span> = <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'plist'</span>)
|
||||
<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">encoding</span> = <span class="ruby-constant">LibXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Encoding</span><span class="ruby-operator">::</span><span class="ruby-constant">UTF_8</span>
|
||||
|
||||
<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">root</span>[<span class="ruby-value str">'version'</span>] = <span class="ruby-value str">'1.0'</span>
|
||||
<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:root</span>].<span class="ruby-identifier">to_xml</span>()
|
||||
|
||||
<span class="ruby-comment cmt"># ugly hack, but there's no other possibility I know</span>
|
||||
<span class="ruby-identifier">str</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">:indent</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:formatted</span>])
|
||||
<span class="ruby-identifier">str1</span> = <span class="ruby-constant">String</span>.<span class="ruby-identifier">new</span>
|
||||
<span class="ruby-identifier">first</span> = <span class="ruby-keyword kw">false</span>
|
||||
<span class="ruby-identifier">str</span>.<span class="ruby-identifier">each_line</span> <span class="ruby-keyword kw">do</span>
|
||||
<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">str1</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">line</span>
|
||||
<span class="ruby-keyword kw">unless</span>(<span class="ruby-identifier">first</span>) <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">str1</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\s*<\?xml/</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-identifier">first</span> = <span class="ruby-keyword kw">true</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">str1</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>get_value (CFPropertyList::XML)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbXMLCFPropertyList.rb, line 58</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">n</span>)
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">content</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">children?</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">content</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,69 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>import_xml (CFPropertyList::XML)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre><span class="ruby-comment cmt"># File rbXMLCFPropertyList.rb, line 64</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">import_xml</span>(<span class="ruby-identifier">node</span>)
|
||||
<span class="ruby-identifier">ret</span> = <span class="ruby-keyword kw">nil</span>
|
||||
|
||||
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">name</span>
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'dict'</span>
|
||||
<span class="ruby-identifier">hsh</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
||||
<span class="ruby-identifier">key</span> = <span class="ruby-keyword kw">nil</span>
|
||||
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">children?</span> <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">node</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span>
|
||||
<span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span>
|
||||
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"key"</span> <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">key</span> = <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">n</span>)
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-identifier">raise</span> <span class="ruby-constant">CFFormatError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"Format error!"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">nil?</span>
|
||||
<span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">import_xml</span>(<span class="ruby-identifier">n</span>)
|
||||
<span class="ruby-identifier">key</span> = <span class="ruby-keyword kw">nil</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-identifier">ret</span> = <span class="ruby-constant">CFDictionary</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">hsh</span>)
|
||||
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'array'</span>
|
||||
<span class="ruby-identifier">ary</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
||||
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">children?</span> <span class="ruby-keyword kw">then</span>
|
||||
<span class="ruby-identifier">node</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span>
|
||||
<span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-identifier">ary</span>.<span class="ruby-identifier">push</span> <span class="ruby-identifier">import_xml</span>(<span class="ruby-identifier">n</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-identifier">ret</span> = <span class="ruby-constant">CFArray</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ary</span>)
|
||||
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'true'</span>
|
||||
<span class="ruby-identifier">ret</span> = <span class="ruby-constant">CFBoolean</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">true</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'false'</span>
|
||||
<span class="ruby-identifier">ret</span> = <span class="ruby-constant">CFBoolean</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">false</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'real'</span>
|
||||
<span class="ruby-identifier">ret</span> = <span class="ruby-constant">CFReal</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">node</span>).<span class="ruby-identifier">to_f</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'integer'</span>
|
||||
<span class="ruby-identifier">ret</span> = <span class="ruby-constant">CFInteger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">node</span>).<span class="ruby-identifier">to_i</span>)
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'string'</span>
|
||||
<span class="ruby-identifier">ret</span> = <span class="ruby-constant">CFString</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">node</span>))
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'data'</span>
|
||||
<span class="ruby-identifier">ret</span> = <span class="ruby-constant">CFData</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">node</span>))
|
||||
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'date'</span>
|
||||
<span class="ruby-identifier">ret</span> = <span class="ruby-constant">CFDate</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">CFDate</span>.<span class="ruby-identifier">parse_date</span>(<span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">node</span>)))
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">ret</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1 +0,0 @@
|
|||
Tue, 02 Mar 2010 18:22:40 +0100
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>File: rbBinaryCFPropertyList.rb</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="fileHeader">
|
||||
<h1>rbBinaryCFPropertyList.rb</h1>
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Path:</strong></td>
|
||||
<td>rbBinaryCFPropertyList.rb
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Last Update:</strong></td>
|
||||
<td>Tue Mar 02 18:22:30 +0100 2010</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
<a href="../classes/CFPropertyList.html">CFPropertyList</a> implementation
|
||||
parser class to read, manipulate and write binary property list files
|
||||
(plist(5)) as defined by Apple
|
||||
</p>
|
||||
<table>
|
||||
<tr><td valign="top">Author:</td><td>Christian Kruse (<a href="mailto:cjk@wwwtech.de">cjk@wwwtech.de</a>)
|
||||
|
||||
</td></tr>
|
||||
<tr><td valign="top">Copyright:</td><td>Copyright (c) 2010
|
||||
|
||||
</td></tr>
|
||||
<tr><td valign="top">License:</td><td>Distributes under the same terms as Ruby
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,118 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>File: rbCFFormatError.rb</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="fileHeader">
|
||||
<h1>rbCFFormatError.rb</h1>
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Path:</strong></td>
|
||||
<td>rbCFFormatError.rb
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Last Update:</strong></td>
|
||||
<td>Tue Mar 02 18:22:30 +0100 2010</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
<a href="../classes/CFFormatError.html">CFFormatError</a> implementation
|
||||
</p>
|
||||
<table>
|
||||
<tr><td valign="top">Author:</td><td>Christian Kruse (<a href="mailto:cjk@wwwtech.de">cjk@wwwtech.de</a>)
|
||||
|
||||
</td></tr>
|
||||
<tr><td valign="top">Copyright:</td><td>Copyright (c) 2010
|
||||
|
||||
</td></tr>
|
||||
<tr><td valign="top">License:</td><td>MIT License
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,157 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>File: rbCFPropertyList.rb</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="fileHeader">
|
||||
<h1>rbCFPropertyList.rb</h1>
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Path:</strong></td>
|
||||
<td>rbCFPropertyList.rb
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Last Update:</strong></td>
|
||||
<td>Tue Mar 02 18:22:30 +0100 2010</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
<a href="../classes/CFPropertyList.html">CFPropertyList</a> implementation
|
||||
class to read, manipulate and write both XML and binary property list files
|
||||
(plist(5)) as defined by Apple
|
||||
</p>
|
||||
<h2>Example</h2>
|
||||
<pre>
|
||||
# create a arbitrary data structure of basic data types
|
||||
data = {
|
||||
'name' => 'John Doe',
|
||||
'missing' => true,
|
||||
'last_seen' => Time.now,
|
||||
'friends' => ['Jane Doe','Julian Doe'],
|
||||
'likes' => {
|
||||
'me' => false
|
||||
}
|
||||
}
|
||||
|
||||
# create CFPropertyList::List object
|
||||
plist = CFPropertyList::List.new
|
||||
|
||||
# call CFPropertyList.guess() to create corresponding CFType values
|
||||
# pass in optional :convert_unknown_to_string => true to convert things like symbols into strings.
|
||||
plist.value = CFPropertyList.guess(data)
|
||||
|
||||
# write plist to file
|
||||
plist.save("example.plist", CFPropertyList::List::FORMAT_BINARY)
|
||||
|
||||
# … later, read it again
|
||||
plist = CFPropertyList::List.new({:file => "example.plist"})
|
||||
data = CFPropertyList.native_types(plist.value)
|
||||
</pre>
|
||||
<table>
|
||||
<tr><td valign="top">Author:</td><td>Christian Kruse (<a href="mailto:cjk@wwwtech.de">cjk@wwwtech.de</a>)
|
||||
|
||||
</td></tr>
|
||||
<tr><td valign="top">Copyright:</td><td>Copyright (c) 2010
|
||||
|
||||
</td></tr>
|
||||
<tr><td valign="top">License:</td><td>Distributes under the same terms as Ruby
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="requires-list">
|
||||
<h3 class="section-bar">Required files</h3>
|
||||
|
||||
<div class="name-list">
|
||||
libxml
|
||||
kconv
|
||||
date
|
||||
iconv
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,125 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>File: rbCFTypes.rb</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="fileHeader">
|
||||
<h1>rbCFTypes.rb</h1>
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Path:</strong></td>
|
||||
<td>rbCFTypes.rb
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Last Update:</strong></td>
|
||||
<td>Tue Mar 02 18:22:30 +0100 2010</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
CFTypes, e.g. CFString, CFInteger needed to create unambiguous plists
|
||||
</p>
|
||||
<table>
|
||||
<tr><td valign="top">Author:</td><td>Christian Kruse (<a href="mailto:cjk@wwwtech.de">cjk@wwwtech.de</a>)
|
||||
|
||||
</td></tr>
|
||||
<tr><td valign="top">Copyright:</td><td>Copyright (c) 2009
|
||||
|
||||
</td></tr>
|
||||
<tr><td valign="top">License:</td><td>Distributes under the same terms as Ruby
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="requires-list">
|
||||
<h3 class="section-bar">Required files</h3>
|
||||
|
||||
<div class="name-list">
|
||||
base64
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>File: rbXMLCFPropertyList.rb</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="fileHeader">
|
||||
<h1>rbXMLCFPropertyList.rb</h1>
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Path:</strong></td>
|
||||
<td>rbXMLCFPropertyList.rb
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Last Update:</strong></td>
|
||||
<td>Tue Mar 02 18:22:30 +0100 2010</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
<a href="../classes/CFPropertyList.html">CFPropertyList</a> implementation
|
||||
parser class to read, manipulate and write XML property list files
|
||||
(plist(5)) as defined by Apple
|
||||
</p>
|
||||
<table>
|
||||
<tr><td valign="top">Author:</td><td>Christian Kruse (<a href="mailto:cjk@wwwtech.de">cjk@wwwtech.de</a>)
|
||||
|
||||
</td></tr>
|
||||
<tr><td valign="top">Copyright:</td><td>Copyright (c) 2010
|
||||
|
||||
</td></tr>
|
||||
<tr><td valign="top">License:</td><td>Distributes under the same terms as Ruby
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,41 +0,0 @@
|
|||
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<!--
|
||||
|
||||
Classes
|
||||
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Classes</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
|
||||
<base target="docwin" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="index">
|
||||
<h1 class="section-bar">Classes</h1>
|
||||
<div id="index-entries">
|
||||
<a href="classes/CFFormatError.html">CFFormatError</a><br />
|
||||
<a href="classes/CFPropertyList.html">CFPropertyList</a><br />
|
||||
<a href="classes/CFPropertyList/Binary.html">CFPropertyList::Binary</a><br />
|
||||
<a href="classes/CFPropertyList/CFArray.html">CFPropertyList::CFArray</a><br />
|
||||
<a href="classes/CFPropertyList/CFBoolean.html">CFPropertyList::CFBoolean</a><br />
|
||||
<a href="classes/CFPropertyList/CFData.html">CFPropertyList::CFData</a><br />
|
||||
<a href="classes/CFPropertyList/CFDate.html">CFPropertyList::CFDate</a><br />
|
||||
<a href="classes/CFPropertyList/CFDictionary.html">CFPropertyList::CFDictionary</a><br />
|
||||
<a href="classes/CFPropertyList/CFInteger.html">CFPropertyList::CFInteger</a><br />
|
||||
<a href="classes/CFPropertyList/CFReal.html">CFPropertyList::CFReal</a><br />
|
||||
<a href="classes/CFPropertyList/CFString.html">CFPropertyList::CFString</a><br />
|
||||
<a href="classes/CFPropertyList/CFType.html">CFPropertyList::CFType</a><br />
|
||||
<a href="classes/CFPropertyList/List.html">CFPropertyList::List</a><br />
|
||||
<a href="classes/CFPropertyList/ParserInterface.html">CFPropertyList::ParserInterface</a><br />
|
||||
<a href="classes/CFPropertyList/XML.html">CFPropertyList::XML</a><br />
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,31 +0,0 @@
|
|||
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<!--
|
||||
|
||||
Files
|
||||
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Files</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
|
||||
<base target="docwin" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="index">
|
||||
<h1 class="section-bar">Files</h1>
|
||||
<div id="index-entries">
|
||||
<a href="files/rbBinaryCFPropertyList_rb.html">rbBinaryCFPropertyList.rb</a><br />
|
||||
<a href="files/rbCFFormatError_rb.html">rbCFFormatError.rb</a><br />
|
||||
<a href="files/rbCFPropertyList_rb.html">rbCFPropertyList.rb</a><br />
|
||||
<a href="files/rbCFTypes_rb.html">rbCFTypes.rb</a><br />
|
||||
<a href="files/rbXMLCFPropertyList_rb.html">rbXMLCFPropertyList.rb</a><br />
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue