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

Could I serialize a class with some "recursive/tree-like" data? #26

Open
jkooooo99 opened this issue Feb 25, 2023 · 1 comment
Open

Comments

@jkooooo99
Copy link

Hi, I am a newbie in C++ and everything...

Could I use this library to serialize my class with some complex data like :

        struct BoneNode
	{
		std::string name;
		glm::mat4 transMatrix;
		std::vector<BoneNode> children;
		int meshBoneId = -1;
		int nonMeshBoneId = -1;
	};

and

std::unordered_map<std::string, size_t> boneExMap ?

The loading speed of FBX is driving me crazy and forcing me to learn some new words like "binary files" and "serialize"...

And sorry for my poor English...

@eieio
Copy link
Collaborator

eieio commented Apr 7, 2023

Hi!

Recursive types are supported. Here's an example based on your code: https://godbolt.org/z/K1WbMdKno

Cheers,
Corey

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

2 participants