opengate.element ================ .. py:module:: opengate.element Attributes ---------- .. autoapisummary:: opengate.element.element_builders Functions --------- .. autoapisummary:: opengate.element.get_element_class opengate.element.get_builder opengate.element.new_element opengate.element.copy_user_info Module Contents --------------- .. py:data:: element_builders .. py:function:: get_element_class(element_type, type_name) Return the class of the given type_name (in the element_type list) .. py:function:: get_builder(element_type, type_name) Return a function that build an element of the class type_name Check everything first. .. py:function:: new_element(user_info, simulation=None) Create a new element (Volume, Source, Actor, Filter), according to the type name - use the element_builders to find the class to build - create a new element, with the name as parameter to the constructor - initialize the default list of keys in the user_info - set a pointer to the Simulation object .. py:function:: copy_user_info(v1, v2) Copy all attributes from v1 to v2, except the name. v1 is assumed to be a UserInfo object with several attribute members. v2 must have the (at least) the same set of attributes. Values are (deep) copied.