From aac61b8387db8c71829ddfbc47db58a89ed715c5 Mon Sep 17 00:00:00 2001 From: kojix2 Date: Tue, 6 Aug 2024 03:27:53 +0000 Subject: [PATCH] deploy: 0cbf18613ebc2c4d2a3ea9015d7a59ae056c3082 --- GR.html | 2 +- GR/Error.html | 2 +- GR/FFI.html | 2 +- GR/FFI/Inspector.html | 2 +- GR/NotFoundError.html | 2 +- GR3.html | 2 +- GR3/CheckError.html | 2 +- GR3/Error.html | 2 +- GR3/FFI.html | 2 +- GR3/FFI/Inspector.html | 2 +- GR3/NotFoundError.html | 2 +- GRCommons.html | 2 +- GRCommons/DefineMethods.html | 2 +- GRCommons/Fiddley.html | 2 +- GRCommons/Fiddley/Function.html | 2 +- GRCommons/Fiddley/MemoryPointer.html | 2 +- GRCommons/Fiddley/Utils.html | 2 +- GRCommons/GRCommonUtils.html | 2 +- GRCommons/GRLib.html | 2 +- GRCommons/GRLogger.html | 2 +- GRCommons/JupyterSupport.html | 2 +- GRCommons/TryExtern.html | 2 +- GRM.html | 283 ++++++++++++- GRM/Args.html | 602 +++++++++++++++++++++++++++ GRM/Error.html | 2 +- GRM/FFI.html | 2 +- GRM/FFI/Inspector.html | 2 +- GRM/NotFoundError.html | 2 +- _index.html | 23 +- class_list.html | 2 +- file.README.html | 2 +- index.html | 2 +- method_list.html | 460 +++++++++++--------- top-level-namespace.html | 2 +- 34 files changed, 1205 insertions(+), 223 deletions(-) create mode 100644 GRM/Args.html diff --git a/GR.html b/GR.html index 257d3378..e7e661bc 100644 --- a/GR.html +++ b/GR.html @@ -20824,7 +20824,7 @@

diff --git a/GR/Error.html b/GR/Error.html index 0b113bb5..6356573d 100644 --- a/GR/Error.html +++ b/GR/Error.html @@ -118,7 +118,7 @@

Direct Known Subclasses

diff --git a/GR/FFI.html b/GR/FFI.html index 930bee1c..98254a76 100644 --- a/GR/FFI.html +++ b/GR/FFI.html @@ -274,7 +274,7 @@

Methods included from - Generated on Sun Jul 21 01:41:23 2024 by + Generated on Tue Aug 6 03:27:52 2024 by yard 0.9.36 (ruby-3.3.4). diff --git a/GR/FFI/Inspector.html b/GR/FFI/Inspector.html index f62c4dc3..d9a83e03 100644 --- a/GR/FFI/Inspector.html +++ b/GR/FFI/Inspector.html @@ -100,7 +100,7 @@ diff --git a/GR/NotFoundError.html b/GR/NotFoundError.html index 669cf50a..a13f9aa3 100644 --- a/GR/NotFoundError.html +++ b/GR/NotFoundError.html @@ -122,7 +122,7 @@ diff --git a/GR3.html b/GR3.html index 2524f8aa..77c3f7f6 100644 --- a/GR3.html +++ b/GR3.html @@ -6873,7 +6873,7 @@

diff --git a/GR3/CheckError.html b/GR3/CheckError.html index 038f5e6f..60e3f4f3 100644 --- a/GR3/CheckError.html +++ b/GR3/CheckError.html @@ -196,7 +196,7 @@

diff --git a/GR3/Error.html b/GR3/Error.html index 59bb63df..af35c549 100644 --- a/GR3/Error.html +++ b/GR3/Error.html @@ -118,7 +118,7 @@

Direct Known Subclasses

diff --git a/GR3/FFI.html b/GR3/FFI.html index 6c11b44f..f66bdb46 100644 --- a/GR3/FFI.html +++ b/GR3/FFI.html @@ -183,7 +183,7 @@

Methods included from - Generated on Sun Jul 21 01:41:23 2024 by + Generated on Tue Aug 6 03:27:52 2024 by yard 0.9.36 (ruby-3.3.4). diff --git a/GR3/FFI/Inspector.html b/GR3/FFI/Inspector.html index cb67a87d..50ea3e54 100644 --- a/GR3/FFI/Inspector.html +++ b/GR3/FFI/Inspector.html @@ -100,7 +100,7 @@ diff --git a/GR3/NotFoundError.html b/GR3/NotFoundError.html index 10a11448..b4aa925b 100644 --- a/GR3/NotFoundError.html +++ b/GR3/NotFoundError.html @@ -122,7 +122,7 @@ diff --git a/GRCommons.html b/GRCommons.html index c15ea062..6226a1bc 100644 --- a/GRCommons.html +++ b/GRCommons.html @@ -335,7 +335,7 @@

diff --git a/GRCommons/DefineMethods.html b/GRCommons/DefineMethods.html index 00c35775..1f83af36 100644 --- a/GRCommons/DefineMethods.html +++ b/GRCommons/DefineMethods.html @@ -106,7 +106,7 @@

Overview

diff --git a/GRCommons/Fiddley.html b/GRCommons/Fiddley.html index 88dd0f4b..8cb41793 100644 --- a/GRCommons/Fiddley.html +++ b/GRCommons/Fiddley.html @@ -124,7 +124,7 @@

Overview

diff --git a/GRCommons/Fiddley/Function.html b/GRCommons/Fiddley/Function.html index f747906e..65b32c4f 100644 --- a/GRCommons/Fiddley/Function.html +++ b/GRCommons/Fiddley/Function.html @@ -218,7 +218,7 @@

diff --git a/GRCommons/Fiddley/MemoryPointer.html b/GRCommons/Fiddley/MemoryPointer.html index c71bb6c7..ecd2e315 100644 --- a/GRCommons/Fiddley/MemoryPointer.html +++ b/GRCommons/Fiddley/MemoryPointer.html @@ -952,7 +952,7 @@

diff --git a/GRCommons/Fiddley/Utils.html b/GRCommons/Fiddley/Utils.html index bb225b66..a7cb72c2 100644 --- a/GRCommons/Fiddley/Utils.html +++ b/GRCommons/Fiddley/Utils.html @@ -667,7 +667,7 @@

diff --git a/GRCommons/GRCommonUtils.html b/GRCommons/GRCommonUtils.html index 658e36ca..c08e8e3f 100644 --- a/GRCommons/GRCommonUtils.html +++ b/GRCommons/GRCommonUtils.html @@ -1093,7 +1093,7 @@

diff --git a/GRCommons/GRLib.html b/GRCommons/GRLib.html index 6003cf5b..e4a2b10e 100644 --- a/GRCommons/GRLib.html +++ b/GRCommons/GRLib.html @@ -669,7 +669,7 @@

diff --git a/GRCommons/GRLogger.html b/GRCommons/GRLogger.html index a134697c..d20f8a8b 100644 --- a/GRCommons/GRLogger.html +++ b/GRCommons/GRLogger.html @@ -310,7 +310,7 @@

diff --git a/GRCommons/JupyterSupport.html b/GRCommons/JupyterSupport.html index 3f3b8581..39961b77 100644 --- a/GRCommons/JupyterSupport.html +++ b/GRCommons/JupyterSupport.html @@ -343,7 +343,7 @@

diff --git a/GRCommons/TryExtern.html b/GRCommons/TryExtern.html index 5cce8c94..5805bcb8 100644 --- a/GRCommons/TryExtern.html +++ b/GRCommons/TryExtern.html @@ -296,7 +296,7 @@

diff --git a/GRM.html b/GRM.html index 5ee7eefb..031bd9a4 100644 --- a/GRM.html +++ b/GRM.html @@ -98,7 +98,7 @@

Defined Under Namespace

- Classes: Error, NotFoundError + Classes: Args, Error, NotFoundError

@@ -163,14 +163,135 @@

Class Attribute Summary collapse + Class Method Summary + collapse +

+ + + + + + + -

Method Summary

Methods included from GRCommons::GRCommonUtils

create_ffi_pointer, double, equal_length, float, inquiry, inquiry_double, inquiry_int, inquiry_uint, int, narray?, read_ffi_pointer, uint, uint16, uint8

@@ -236,10 +357,166 @@

+
+

Class Method Details

+ + +
+

+ + .merge(args = nil) ⇒ Object + + + + + +

+ + + + +
+
+
+
+152
+153
+154
+
+
# File 'lib/grm.rb', line 152
+
+def merge(args=nil)
+  super(Args.try_convert(args) || args)
+end
+
+
+ +
+

+ + .merge_extended(args = nil, hold = 0, identifiator = nil) ⇒ Object + + + + + +

+ + + + +
+
+
+
+156
+157
+158
+
+
# File 'lib/grm.rb', line 156
+
+def merge_extended(args=nil, hold=0, identifiator=nil)
+  super(Args.try_convert(args) || args, hold, identificator)
+end
+
+
+ +
+

+ + .merge_hold(args = nil) ⇒ Object + + + + + +

+ + + + +
+
+
+
+160
+161
+162
+
+
# File 'lib/grm.rb', line 160
+
+def merge_hold(args=nil)
+  super(Args.try_convert(args) || args)
+end
+
+
+ +
+

+ + .merge_named(args = nil, identifiator = nil) ⇒ Object + + + + + +

+ + + + +
+
+
+
+164
+165
+166
+
+
# File 'lib/grm.rb', line 164
+
+def merge_named(args=nil, identifiator=nil)
+  super(Args.try_convert(args) || args, identificator)
+end
+
+
+ +
+

+ + .plot(args = nil) ⇒ Object + + + + + +

+ + + + +
+
+
+
+168
+169
+170
+
+
# File 'lib/grm.rb', line 168
+
+def plot(args=nil)
+  super(Args.try_convert(args) || args)
+end
+
+
+ +
+ diff --git a/GRM/Args.html b/GRM/Args.html new file mode 100644 index 00000000..7ca7c29c --- /dev/null +++ b/GRM/Args.html @@ -0,0 +1,602 @@ + + + + + + + Class: GRM::Args + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: GRM::Args + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/grm.rb
+
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Constructor Details

+ +
+

+ + #initialize(**args) ⇒ Args + + + + + +

+
+ +

Returns a new instance of Args.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+76
+77
+78
+79
+80
+81
+82
+83
+
+
# File 'lib/grm.rb', line 76
+
+def initialize(**args)
+  @args = GRM.args_new
+  @args.free = FFI["grm_args_delete"]
+  @references = []
+  args.each do |key, value|
+    push(key, value)
+  end
+end
+
+
+ +
+ + +
+

Class Method Details

+ + +
+

+ + .try_convert(value) ⇒ Object + + + + + +

+ + + + +
+
+
+
+66
+67
+68
+69
+70
+71
+72
+73
+
+
# File 'lib/grm.rb', line 66
+
+def try_convert(value)
+  case value
+  when Hash
+    new(**value)
+  else
+    nil
+  end
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #addressObject + + + + + +

+ + + + +
+
+
+
+142
+143
+144
+
+
# File 'lib/grm.rb', line 142
+
+def address
+  @args.to_i
+end
+
+
+ +
+

+ + #clearObject + + + + + +

+ + + + +
+
+
+
+137
+138
+139
+140
+
+
# File 'lib/grm.rb', line 137
+
+def clear
+  GRM.args_clear(@args)
+  @references.clear
+end
+
+
+ +
+

+ + #push(key, value) ⇒ Object + + + + + +

+ + + + +
+
+
+
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+
+
# File 'lib/grm.rb', line 85
+
+def push(key, value)
+  key = key.to_s if key.is_a?(Symbol)
+  case value
+  when String
+    GRM.args_push(@args, key, "s", :const_string, value)
+  when Integer
+    GRM.args_push(@args, key, "i", :int, value)
+  when Float
+    GRM.args_push(@args, key, "d", :double, value)
+  when Args
+    GRM.args_push(@args, key, "a", :voidp, value.address)
+    value.to_gr.free = nil
+  when Array
+    case value[0]
+    when String
+      addresses = value.collect {|v| Fiddle::Pointer[v].to_i}
+      GRM.args_push(@args, key, "nS",
+                    :int, value.size,
+                    :voidp, addresses.pack("J*"))
+    when Integer
+      GRM.args_push(@args, key, "nI",
+                    :int, value.size,
+                    :voidp, value.pack("i*"))
+    when Float
+      GRM.args_push(@args, key, "nD",
+                    :int, value.size,
+                    :voidp, value.pack("d*"))
+    when Args
+      GRM.args_push(@args, key, "nA",
+                    :int, value.size,
+                    :voidp, value.collect(&:address).pack("J*"))
+      value.each do |v|
+        v.to_gr.free = nil
+      end
+    else
+      vs = value.collect {|v| Args.new(**v)}
+      @references.concat(vs)
+      GRM.args_push(@args, key, "nA",
+                    :int, value.size,
+                    :voidp, vs.collect(&:address).pack("J*"))
+      vs.each do |v|
+        v.to_gr.free = nil
+      end
+    end
+  else
+    v = Args.new(**value)
+    @references << v
+    GRM.args_push(@args, key, "a", :voidp, v.address)
+    v.to_gr.free = nil
+  end
+end
+
+
+ +
+

+ + #to_grObject + + + + + +

+ + + + +
+
+
+
+146
+147
+148
+
+
# File 'lib/grm.rb', line 146
+
+def to_gr
+  @args
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/GRM/Error.html b/GRM/Error.html index eb2df49a..fdc8e302 100644 --- a/GRM/Error.html +++ b/GRM/Error.html @@ -118,7 +118,7 @@

Direct Known Subclasses

diff --git a/GRM/FFI.html b/GRM/FFI.html index f1647907..c24c1566 100644 --- a/GRM/FFI.html +++ b/GRM/FFI.html @@ -146,7 +146,7 @@

Methods included from - Generated on Sun Jul 21 01:41:23 2024 by + Generated on Tue Aug 6 03:27:52 2024 by yard 0.9.36 (ruby-3.3.4). diff --git a/GRM/FFI/Inspector.html b/GRM/FFI/Inspector.html index 643b2a9a..9cd7326e 100644 --- a/GRM/FFI/Inspector.html +++ b/GRM/FFI/Inspector.html @@ -100,7 +100,7 @@ diff --git a/GRM/NotFoundError.html b/GRM/NotFoundError.html index b9535b03..3d164398 100644 --- a/GRM/NotFoundError.html +++ b/GRM/NotFoundError.html @@ -122,7 +122,7 @@ diff --git a/_index.html b/_index.html index 22404c41..13e50457 100644 --- a/_index.html +++ b/_index.html @@ -76,6 +76,21 @@

Namespace Listing A-Z

+
    +
  • A
  • +
      + +
    • + Args + + (GRM) + +
    • + +
    +
+ +