Package mbdyn :: Module record :: Class Record
[hide private]

Class Record

source code

RecordBase --+
             |
            Record
Known Subclasses:
common.BasicObject

An object that is able to save some of its attributes. Those results are saved in the Results instance, part of mbdyn.quantity, and can be accessed by the res or results attribute. This class is always used as abstract, but the user is invited to inherit from it if he wants to save some attributes for its own object during the simulation.

Instance Methods [hide private]
 
__init__(self) source code
 
will_save_nothing(self)
Save no attributes during the simulation.
source code
 
will_save(self, *args)
Add a new attribute to be saved during the simulation.
source code
 
_try_to_add(self, attr_to_save)
Try to add a new attribute to save on the Results object.
source code
 
will_save_only(self, *args)
Only the quantities entered will be saved.
source code
 
common_init_results(self)
Initialize the results quantities, (erase the previous ones).
source code
 
init_results(self)
Initialize the results as in common_init_results.
source code
 
_save_results_with_actions(self)
Perform the call of a method before saving the object attribute
source code
 
_save_direct_results(self)
Directly save the results by accessing to the object attribute.
source code
 
save(self)
Save the results.
source code
 
set_own_parameters(self, para)
Set the object attributes from the para dictionary.
source code

Inherited from RecordBase: collect_own_parameters, collect_parameters, set_own_para, set_parameters

Inherited from RecordBase (private): _collect_own_para

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Overrides: RecordBase.__init__

will_save(self, *args)

source code 
Add a new attribute to be saved during the simulation. It will be executed in addition to the default ones or to the ones already present.

will_save_only(self, *args)

source code 
Only the quantities entered will be saved. The ones present by default are lost.

common_init_results(self)

source code 
Initialize the results quantities, (erase the previous ones). This method defined also

init_results(self)

source code 
Initialize the results as in common_init_results. This method is however tuned in the derived classes

save(self)

source code 
Save the results. This method is often tuned in the derived objects for performing specific actions when a new time step needs to be saved.

set_own_parameters(self, para)

source code 
Set the object attributes from the para dictionary.
Overrides: RecordBase.set_own_parameters