-
Notifications
You must be signed in to change notification settings - Fork 555
Closed
Labels
1. CodingCoding rules, trivial changes and misprintsCoding rules, trivial changes and misprints2. QuestionFurther information is requestedFurther information is requested3. Help wantedExtra attention is neededExtra attention is needed
Description
For example, for the interface-like class AdvApprox_ApproxAFunction
class AdvApprox_EvaluatorFunction
{
//! Function evaluation method to be defined by descendant
virtual void Evaluate (Standard_Integer *Dimension,
Standard_Real StartEnd[2],
Standard_Real *Parameter,
Standard_Integer *DerivativeRequest,
Standard_Real *Result, // [Dimension]
Standard_Integer *ErrorCode) = 0;
}This interface owns 17 descendants, and the virtual void Evaluate() statement are included in each sub-class.
and so on.
I am a developer of java/scala. It is amazed to see that we need to restate the abstract function/interface in the subclass.
interface AdvApprox_EvaluatorFunction {
void Evaluate (Standard_Integer Dimension,
Standard_Real StartEnd[2],
Standard_Real Parameter,
Standard_Integer DerivativeRequest[],
Standard_Real Result[], // [Dimension]
Standard_Integer ErrorCode);
}
class Approx_SweepApproximation_Eval implements AdvApprox_EvaluatorFunction {
@Override
void Evaluate (Standard_Integer Dimension,
Standard_Real StartEnd[2],
Standard_Real Parameter,
Standard_Integer DerivativeRequest[],
Standard_Real Result[], // [Dimension]
Standard_Integer ErrorCode) {
// implementation
// -------------------
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
1. CodingCoding rules, trivial changes and misprintsCoding rules, trivial changes and misprints2. QuestionFurther information is requestedFurther information is requested3. Help wantedExtra attention is neededExtra attention is needed


