Skip to content

(Discussion) Reducing boiler plate code #4

Description

@csparker247

Registration of ports and nodes is a pain. So much boiler plate!

// MyNode.hpp
class MyNode : public smgl::Node {
int val_;
public:
    smgl::InputPort<int> p{&val_};
    MyNode() : Node() {
        registerInputPort("p", p);
    }
};

// main.cpp
smgl::RegisterNode<MyNode>();

Suggested solutions:

  • Front-end preprocessor for converting smgl directives into compilable boiler plate (from R. Finkel)

Migrated from GitLab educelab/smgl#4. Originally opened by @csparker247 on 2020-10-07.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions