ComputeSingleObjectPerObject< TYPE > Class Template Reference
Last update: 16.07.2025a base class for algorithms that apply a simple algorithm to obtain a single object from another object More...
Public Types | |
| typedef boost::function< DataObject::ptr_type(DataObject::ptr_type input)> | TAlgorithmFunction |
| defines a function object More... | |
| typedef boost::function< DataObject::ptr_type(Structure database, DataObject::ptr_type input)> | TAlgorithmFunction2 |
| defines a function object More... | |
Public Member Functions | |
| check (Structure database) | |
| checks the settings on plausibility It throws an exception if there is a problem with the settings. Important: It tries to find out all problems with these settings and then exits the routine. More... | |
| compute (Structure database, DataObject::ptr_type data, string new_quantity_ident, string new_design_ident) | |
| performs the action for a single set of samples More... | |
| compute (Structure database) | |
| performs the action using the defined settings. More... | |
| ComputeSingleObjectPerObject (TAlgorithmFunction function, TAlgorithmFunction2 function2, string op_ident) | |
| constructor which assumes an empty selection It is mainly used to initialized the object and to provide a functional "compute()" method. More... | |
| ComputeSingleObjectPerObject (DataObjectContainer the_data, TAlgorithmFunction function, TAlgorithmFunction2 function2, string op_ident, string quantity_modifier) | |
| constructor which sets suitable defaults for all members More... | |
Public Attributes | |
| DataObjectContainer | data |
| the data set to be analyzed | |
| DataObjectContainer::string_vector_type | new_quantity_idents |
| the new idents for each quantity. The dimension and index space must fit the one of quantity_idents | |
| bool | overwrite_existing |
| is true if already existing output data objects will be replaced. In this case, also all depending objects of the already existing one will be deleted. | |
| DataObjectContainer::string_vector_type | quantity_idents |
| the quantities to be analyzed. If a quantity ident does not exist in data, no error appears. | |
Detailed Description
template<dataobject_types TYPE>
class ComputeSingleObjectPerObject< TYPE >
a base class for algorithms that apply a simple algorithm to obtain a single object from another object
- Template Parameters
-
TYPE the field data type
Member Typedef Documentation
◆ TAlgorithmFunction
| typedef boost::function<DataObject::ptr_type ( DataObject::ptr_type input)> TAlgorithmFunction |
defines a function object
- Parameters
-
input a single input object
- Returns
- the result of the operation
◆ TAlgorithmFunction2
| typedef boost::function<DataObject::ptr_type ( Structure database, DataObject::ptr_type input)> TAlgorithmFunction2 |
defines a function object
- Parameters
-
database the database we refer to input a single input object
- Returns
- the result of the operation
Constructor & Destructor Documentation
◆ ComputeSingleObjectPerObject() [1/2]
| ComputeSingleObjectPerObject | ( | TAlgorithmFunction | function, |
| TAlgorithmFunction2 | function2, | ||
| string | op_ident | ||
| ) |
constructor which assumes an empty selection It is mainly used to initialized the object and to provide a functional "compute()" method.
- Parameters
-
function defines the function to be executed function2 defines the function to be executed, if function is not initialized. op_ident the ident of the operation (for messages)
◆ ComputeSingleObjectPerObject() [2/2]
| ComputeSingleObjectPerObject | ( | DataObjectContainer | the_data, |
| TAlgorithmFunction | function, | ||
| TAlgorithmFunction2 | function2, | ||
| string | op_ident, | ||
| string | quantity_modifier | ||
| ) |
constructor which sets suitable defaults for all members
- Parameters
-
the_data the subset of field data to be token as input. All quantity idents are extracted. Then for each quantity a new result object will be created. function defines the function to be executed function2 defines the function to be executed, if function is not initialized. op_ident the ident of the operation (for messages) quantity_modifier if this string is not empty, then the new quantities will be named "quantity_modifier[old_quantity_ident]", else they are equal (which is an error!)
Member Function Documentation
◆ check()
| check | ( | Structure | database | ) |
checks the settings on plausibility It throws an exception if there is a problem with the settings. Important: It tries to find out all problems with these settings and then exits the routine.
- Parameters
-
database the SoS structure
◆ compute() [1/2]
| compute | ( | Structure | database, |
| DataObject::ptr_type | data, | ||
| string | new_quantity_ident, | ||
| string | new_design_ident | ||
| ) |
performs the action for a single set of samples
- Parameters
-
database the output object is to be inserted in this object data the input data object new_quantity_ident the quantity ident of the new object new_design_ident the design ident of the new object If the input object is active, then the output object will be active as well (or inactive, respectively).
◆ compute() [2/2]
| compute | ( | Structure | database | ) |
performs the action using the defined settings.
- Parameters
-
database the output object where new objects are added to