GithubHelp home page GithubHelp logo

Comments (1)

eirrgang avatar eirrgang commented on August 23, 2024

The resources a plugin receives will either have to be templated on the plugin or have a whole lot of casting and/or run-time type stuff, I think, so I'm going to first explore templating. The early result will look like I am replacing the class that the developer previously defined with a class I cobble together with templating, I expect.

  • developer defines a struct to hold their state. The types it can hold are limited to types our API knows how to serialize.
  • developer writes the functions they want called. State variables are instead accessed through a member (with the struct type) of a (templated) resources argument passed in.
  • developer expresses a template to connect the pieces.
  • developer calls functions on the resulting object for each member of the state data structure to declare their keyword name, type, behavior, and initialization.

I don't know how to check for uninitialized struct members in this case. We might be able to build up a constructor call that would only compile if we are able to use the automatic POD aggregate constructor.

It isn't worth conjecturing further until I experiment a bit.

from gmxapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.