summaryrefslogtreecommitdiffhomepage
path: root/planning/dsl.mdown
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2022-07-20 06:29:06 -0400
committerrealtradam <[email protected]>2022-07-20 06:29:06 -0400
commite49eefc8ed66c905f13812941269e1b42c239871 (patch)
tree251f150aa713abef003e74d60790e7f4cb9f6bbd /planning/dsl.mdown
parent8f12cd1f31d991aeb36ba67a4d00e214b03cdac4 (diff)
downloadFelBind-e49eefc8ed66c905f13812941269e1b42c239871.tar.gz
FelBind-e49eefc8ed66c905f13812941269e1b42c239871.zip
wip planning
Diffstat (limited to 'planning/dsl.mdown')
-rw-r--r--planning/dsl.mdown34
1 files changed, 34 insertions, 0 deletions
diff --git a/planning/dsl.mdown b/planning/dsl.mdown
new file mode 100644
index 0000000..513153e
--- /dev/null
+++ b/planning/dsl.mdown
@@ -0,0 +1,34 @@
+# DSL
+
+Special DSL for configuring the resulting bindings. Allows you to change the name, change what class or module something belongs to, and change what it is named, or disable something from being bound at all.
+
+```ruby
+// setters
+fn[:MyCFunction].rename :my_new_method_name
+fn[:MyCFunction].klass :MyRubyClass // make this function belong to a ruby class
+fn[:MyCFunction].param_as_self :c_var // have the function use self instead of asking for that parameter
+fn[:MyCFunction].skip
+// getters
+fn{:MyCFunction].name
+fn{:MyCFunction].klass
+fn{:MyCFunction].param_as_self
+fn[:MyCFunction].skip?
+
+// setters
+struct[:MyCStruct].rename :MyRubyClass
+struct[:MyCStruct].klass :MyRubyClassTwo //make this struct class belong under another
+struct[:MyCStruct].skip
+struct[:MyCStruct].add_alias :MyCTypeDef //TODO: figure this out better
+// getters
+struct{:MyCStruct].name
+struct{:MyCStruct].klass
+struct{:MyCStruct].param_as_self
+struct[:MyCStruct].aliases
+
+config.define_method_naming_pattern do |c_function|
+ // your logic
+end
+config.define_class_naming_pattern do |c_struct|
+ // your logic
+end
+```