Skip to content

rework domain api - #3367

Draft
mwestphal wants to merge 1 commit into
f3d-app:masterfrom
mwestphal:rework_domain_api
Draft

rework domain api#3367
mwestphal wants to merge 1 commit into
f3d-app:masterfrom
mwestphal:rework_domain_api

Conversation

@mwestphal

@mwestphal mwestphal commented Jul 12, 2026

Copy link
Copy Markdown
Member

Describe your changes

Issue ticket number and link if any

Fix #3365

Checklist for finalizing the PR

  • I have performed a self-review of my code
  • I have added tests for new features and bugfixes
  • I have added documentation for new features
  • If it is a modifying the libf3d API, I have updated bindings
  • If it is a modifying the .github/workflows/versions.json, I have updated docker_timestamp

AI Disclosure

  • I did not use AI to generate any of the content of that pull request
  • I used AI to generate code in that pull request, if yes please disclose which part of the code was generated and with which model.
  • ...

Continuous integration

Please write a comment to run CI, eg: \ci fast.
See here for more info.

@mwestphal mwestphal self-assigned this Jul 12, 2026
@github-actions

Copy link
Copy Markdown

You are modifying libf3d public API! ⚠️Please update bindings accordingly⚠️!
You can find them in their respective directories: c, python, java, webassembly.

@mwestphal
mwestphal force-pushed the rework_domain_api branch from 5b98b5c to 3bc5e81 Compare July 31, 2026 06:42
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

Style Checks CI failed:

diff --git a/library/private/options_generated.h.in b/library/private/options_generated.h.in
index 49ab07c..70ff756 100644
--- a/library/private/options_generated.h.in
+++ b/library/private/options_generated.h.in
@@ -165,7 +165,8 @@ f3d::options::DomainRange<f3d::option_variant_t> getRangeDomain(
 /**
  * Generated method, see `options::getEnumDomain`
  */
-f3d::options::DomainEnum<f3d::option_variant_t> getEnumDomain(const f3d::options& opt, std::string_view name)
+f3d::options::DomainEnum<f3d::option_variant_t> getEnumDomain(
+  const f3d::options& opt, std::string_view name)
 {
   // clang-format off
   ${_options_get_enum_domain};
diff --git a/library/private/options_tools.h b/library/private/options_tools.h
index 8139c06..a2d2cc0 100644
--- a/library/private/options_tools.h
+++ b/library/private/options_tools.h
@@ -923,7 +923,8 @@ f3d::options::DomainRange<f3d::option_variant_t> getRangeDomain(
  * Get provided domain_enum as a DomainEnum<option_variant_t>.
  * Only string is supported for now
  */
-f3d::options::DomainEnum<f3d::option_variant_t> getEnumDomain(const f3d::options::DomainEnum<std::string>& domain)
+f3d::options::DomainEnum<f3d::option_variant_t> getEnumDomain(
+  const f3d::options::DomainEnum<std::string>& domain)
 {
   f3d::options::DomainEnum<f3d::option_variant_t> ret;
   std::ranges::copy(domain.enumeration, ret.enumeration.begin());
diff --git a/library/src/interactor_impl.cxx b/library/src/interactor_impl.cxx
index e78f95f..0660d83 100644
--- a/library/src/interactor_impl.cxx
+++ b/library/src/interactor_impl.cxx
@@ -849,11 +849,11 @@ interactor& interactor_impl::initCommands()
         {
           // recover the enumeration
           // TODO
-          //std::vector<std::string> enumeration = this->Internals->Options.getEnumDomain(args[0]);
+          // std::vector<std::string> enumeration = this->Internals->Options.getEnumDomain(args[0]);
 
           // Transform potential values into found option
-//          std::ranges::transform(enumeration, std::back_inserter(candidates),
-//            [&](const auto& value) { return args[0] + " " + value; });
+          //          std::ranges::transform(enumeration, std::back_inserter(candidates),
+          //            [&](const auto& value) { return args[0] + " " + value; });
         }
         else
         {
@@ -874,11 +874,12 @@ interactor& interactor_impl::initCommands()
         this->Internals->Options.getDomainStyle(args[0]) == f3d::options::domain_style::ENUM)
       {
         // recover the enumeration
-//        std::vector<std::string> enumeration = this->Internals->Options.getEnumDomain(args[0]);
+        //        std::vector<std::string> enumeration =
+        //        this->Internals->Options.getEnumDomain(args[0]);
 
         // Complete the option value if possible
         // TODO
-//        return complNames(args, enumeration, 1);
+        //        return complNames(args, enumeration, 1);
       }
     }
 

You can copy the patch above and apply it locally with:

Platform Command
X xclip -o -selection clipboard | git apply -v
Wayland wl-paste | git apply -v
Powershell Get-Clipboard -Raw | git apply -v
macOS pbpaste | git apply -v

@mwestphal
mwestphal force-pushed the rework_domain_api branch from 3bc5e81 to d43a91d Compare July 31, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve getRangeDomain/getEnumDomain API

1 participant