About Yade Documentation, Release 2018-12-05

Asked by Mahdeyeh

HI

In Chapter 11. Class reference of Yade Documentation,Bodies, some bold words are in this way::

flags(=FLAG_BOUNDED)

groupMask(=1)

id(=Body::ID_NONE)

material(=uninitalized)

shape(=uninitalized)

state(=new State)

updateAttrs((dict)arg2) None

What is the meaning of words in PARENTHESIS? they refer to what?

What are the meaning of arg2 and none in line 7?

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jérôme Duriez
Solved:
Last query:
Last reply:
Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#1

Hi,
They are the default values, assigned by the constructor of Body.
Bruno

Revision history for this message
Mahdeyeh (mahdiye.sky) said :
#2

Thank you Bruno.

What is meant by these words in this default value:

uninitalized

arg2

Revision history for this message
Best Jérôme Duriez (jduriez) said :
#3

Hi,

unitialized means there is no default value defined by the constructor. See eg [*] together with the explanations at [**] for eg "shape(=uninitalized)"

As for "updateAttrs((dict)arg2) None", updateAttrs is a Python exposed C++ function (like most of YADE stuff) defined at [3] for almost any YADE class (including "Body").
It takes as argument a Python dictionary whose name is (for some reason I am not aware of) arg2, hence "(dict)arg2".
And it returns nothing, hence the "None"

[*] https://gitlab.com/yade-dev/trunk/blob/master/core/Body.hpp#L87
[**] https://yade-dev.gitlab.io/trunk/prog.html#yade-class-base-doc-macro-family
[3] https://gitlab.com/yade-dev/trunk/blob/master/lib/serialization/Serializable.cpp#L20

Revision history for this message
Mahdeyeh (mahdiye.sky) said :
#4

Thanks Jérôme Duriez, that solved my question.