Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LayerDescription::addHostFunction API inconsistency #1221

Open
ptheywood opened this issue Aug 12, 2024 · 0 comments
Open

LayerDescription::addHostFunction API inconsistency #1221

ptheywood opened this issue Aug 12, 2024 · 0 comments

Comments

@ptheywood
Copy link
Member

Unlike agent functions which can be added to a LayerDescrption using an overloaded method which can take:

  • CAgentFunctionDescription
  • AgentFunctionDescription
  • AgentFn a = AgentFn()
  • const std::string &agentName, const std::string &functionName
  • const char *agentName, const char *functionName

Host Functions can only be added by a function pointer.

    void addHostFunction(FLAMEGPU_HOST_FUNCTION_POINTER func_p);

Adding an overload which takes a HostFunctionDesciption object would improve API consistency.

(I believe this will have just been missed when HostFunctionDesciption was added during the DAG implementation)

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

No branches or pull requests

1 participant