yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #01404
Re: [deprecated list] Special serialization treatment
Le 6 juil. 09 à 12:11, Janek Kozicki a écrit :
Are you trying to serialize a C array? It's not supported. And won't
ever be. You don't want to add support for it. Easiest if you switch
to std::vector<> and it will work straight away.
The class I want to serialize is GroupRelationData.
The problem come with a vector<double **>.
otherwise I don't see what is the problem. REGISTER_ATTRIBUTE works
for every type, except C array.
I could 'register' a vector<vecto<vector<double> > > but last time
you said me that it didn't work...
At this moment, I'm testing an alternative solution (currently, yade
is compiling):
I added the private string commands_ in the class GroupRelationData.
Only this string is 'REGISTER_ATTRIBUTED' .
In fact, the string is a kind of 'command stream' that can be
interpreted by the class to set the variables.
example of string:
"ngrp 2 ; parameter kn ; set all kn 1e6 ; parameter mu ; set mu 1 1
0.5 ; set mu 0 1 0.0"
Follow ups
References