// Copyright (C) 2019 by Joseph Mirabel, LAAS-CNRS.
//
// This file is part of the hpp-corbaserver.
//
// This software is provided "as is" without warranty of any kind,
// either expressed or implied, including but not limited to the
// implied warranties of fitness for a particular purpose.
//
// See the COPYING file for more information.

#ifndef HPP_CONSTRAINTS_CONSTRAINTS_IDL
#define HPP_CONSTRAINTS_CONSTRAINTS_IDL
#include <hpp/common.idl>

module hpp
{
  module constraints_idl {

  interface DifferentiableFunction
  {
      floatSeq value (in floatSeq arg) raises (Error);
      //* return corbaServer::vectorToFloatSeq (
      //*     (*get()) (corbaServer::floatSeqToVector(arg, get()->inputSize())).vector()
      //*     );

      floatSeqSeq jacobian (in floatSeq arg) raises (Error);
      //* constraints::matrix_t J (get()->outputDerivativeSize(), get()->inputDerivativeSize());
      //* get()->jacobian (J, corbaServer::floatSeqToVector(arg));
      //* return corbaServer::matrixToFloatSeqSeq (J);

      size_type inputSize () raises (Error);
      size_type inputDerivativeSize () raises (Error);
      size_type  outputSize () raises (Error);
      size_type  outputDerivativeSize () raises (Error);
      string name () raises (Error);

      string str () raises (Error);
  };

  interface Implicit
  {
    DifferentiableFunction function () raises (Error);
    //-> functionPtr

    size_type rightHandSideSize () raises (Error);

    size_type parameterSize () raises (Error);

    floatSeq rightHandSideAt (in value_type s) raises (Error);

    ComparisonTypes_t getComparisonType () raises (Error);
    //->comparisonType

    void setComparisonType (in ComparisonTypes_t compType) raises (Error);
    //->comparisonType
  }; // interface Implicit

  interface LockedJoint : Implicit
  {
    string jointName () raises (Error);
  }; // interface LockedJoint

  interface ConfigurationConstraint : DifferentiableFunction
  {
    floatSeq getWeights () raises (Error);
    //-> weights
    void setWeights (in floatSeq weights) raises (Error);
    //-> weights
    floatSeq getGoal () raises (Error);
    //* return corbaServer::vectorToFloatSeq(getT()->goal().vector());
  }; // interface ConfigurationConstraint

  }; // module core
}; // module hpp
//* #include <hpp/constraints/differentiable-function.hh>
//* #include <hpp/constraints/implicit.hh>
//* #include <hpp/constraints/locked-joint.hh>
//* #include <hpp/constraints/configuration-constraint.hh>

#endif // HPP_CORE_PATHS_IDL
