deprec flag

Asked by Vasileios Angelidakis on 2020-03-03

Hi,

I want to rename the parameter KnKsPhys.viscousDamping to KnKsPhys.betan without breaking backwards compatibility.
I tried changing the macro to: YADE_CLASS_BASE_DOC_ATTRS_DEPREC_CTOR(KnKsPhys, ... ) and follow the docs, but I get a compilation error, where the attrs of the class are not recognised.

Is the "deprec" flag still in use? It is documented in [1], but the macro is no longer included in the options of [1] and I could only find a single use of deprec in the source code [2].

Many thanks, Vasileios

[1] https://yade-dem.org/doc/prog.html#yade-class-base-doc-macro-family
[2] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/pfv/FlowEngine.hpp.in#L314

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Bruno Chareyre
Solved:
2020-03-03
Last query:
2020-03-03
Last reply:
2020-03-03

Hi Vasileios, it is supposed to work. There must be a syntax problem on your side I guess.
Those macros are awesome but it is easy to forget a bracket or comma, and it is difficult to debug such thing.
B

Thanks Bruno, I will give it another go then. :)

All the best,
Vasileios

Hi again,

I found out why I couldn't use "deprec" properly; sharing it here in case someone else finds the same difficulty.
I was trying to define: YADE_CLASS_BASE_DOC_ATTRS_DEPREC_CTOR, but this doesn't exist in the available macros [1].
Thus, I defined my classes using the generic macro YADE_CLASS_BASE_DOC_ATTRS_DEPREC_INIT_CTOR_PY, leaving empty (with commas) the parts I didn't need, i.e. "init" and "py".

All the best,
Vasileios

[1] https://gitlab.com/yade-dev/trunk/-/blob/master/lib/serialization/Serializable.hpp#L251