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

C++ Rewrite/port? #62

Open
Rossmaxx opened this issue Oct 1, 2023 · 4 comments
Open

C++ Rewrite/port? #62

Rossmaxx opened this issue Oct 1, 2023 · 4 comments

Comments

@Rossmaxx
Copy link

Rossmaxx commented Oct 1, 2023

I really like what you guys are doing with DAWproject and the fact that you can have daw agnostic project files.

It would be nice if someone could port this codebase to C++. Most daws these days use C++ so it wouldn't make much sense to add a java based dependency to the daws. Also, it would make the work of daw maintainers easier to implement DAWproject compatibility.

Some of the developers at LMMS had a brief discussion on their discord related to project files and DAWproject popped up. One of the devs there had this concern of adding java to our project but they all agree on adding DAWproject support.

@git-moss
Copy link
Contributor

git-moss commented Oct 1, 2023

There is actually not much to port. This is plain XML compressed in a ZIP file (use your favorite ZIP library). You can also go with any simple XML de-/serializer (e.g. https://github.com/zeux/pugixml). If you need wrapper classes they can be generated from the XML schemas: Project.xsd and Metadata.xsd.

@Trinitou
Copy link

Trinitou commented Oct 2, 2023

issue relates to #39

@kurasu
Copy link
Member

kurasu commented Oct 2, 2023

What moss said.

Also there is no need to use java, just think of it as the reference implementation.

Making a C++ port depends on the approach though: if you just use off-the shelf ZIP and XML structures and read/write to a generic XML tree, I don't think writing a shared library will help you much as the majority of the code is about how to integrate with your own data structures. For validating the XML structure you can use the XSD files.

The other approach is to create a concrete wrapper classes resembling the element/attribute model which would then mirror the java version (which was used to generate the schemas in the first place). That could make sense as a deliverable others could reuse as it would be a bit more rigid and less error-prone than dealing with the generic model directly.

I did some experimentation on a branch (swift) to generate swift code from the java reflection, which is somewhat half-done, but that approach could be used to generate C++ classes. If somebody is interested in picking that up I'm happy to provide some guidance and eventually make that part of the main repo.

@Trinitou
Copy link

Trinitou commented Oct 4, 2023

I started some c++ glue stuff a while ago and now created a draft pull request: #66
(rather unfinished but just want to mention it here)

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

4 participants